Menu

#166 Problems destroying node inside a document

C/C++ Module
open
TclDOM (91)
5
2006-11-08
2006-09-17
No

I create a libxml2 document and add some nodes. I then
try to destroy one of those nodes. The first attempt
yields a return value of "token "::dom::doc2::node3" is
not a libxml2 document". I think this should have been
a TCL error but instead it is returned as the result of
the destroy command. If I then try to destroy that
same node again, I get a seg fault:

(gdb) bt
#0 0x7862696c in ?? ()
#1 0x0051c2ad in Tcl_DeleteCommandFromToken () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#2 0x00eb1276 in TclDOM_libxml2_DestroyNode () from
/usr/local/ActiveTcl/lib/tcldom_libxml23.1/libtcldom_libxml23.1.so
#3 0x00ea6b22 in TclDOMDestroyCommand () from
/usr/local/ActiveTcl/lib/tcldom_libxml23.1/libtcldom_libxml23.1.so
#4 0x0051cac7 in TclEvalObjvInternal () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#5 0x005411ca in TclExecuteByteCode () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#6 0x00540685 in TclCompEvalObj () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#7 0x00570820 in TclObjInterpProc () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#8 0x0051cac7 in TclEvalObjvInternal () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#9 0x005411ca in TclExecuteByteCode () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#10 0x00540685 in TclCompEvalObj () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#11 0x0051db87 in Tcl_EvalObjEx () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#12 0x0054d934 in Tcl_RecordAndEvalObj () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#13 0x00561945 in Tcl_Main () from
/usr/local/ActiveTcl/lib/libtcl8.4.so
#14 0x080488aa in main ()

This same script works fine if I use the dom::tcl
package instead.

Discussion

  • Calvin Bascom

    Calvin Bascom - 2006-09-17

    Sample script that shows the problems

     
  • Calvin Bascom

    Calvin Bascom - 2006-09-18

    Logged In: YES
    user_id=1600284

    Don't know if this is really the correct fix or not, but it
    is working for me so far... so the diff for the patch is
    attached.

     
  • Calvin Bascom

    Calvin Bascom - 2006-09-18

    Diff for patch

     
  • Steve Ball

    Steve Ball - 2006-11-08
    • assigned_to: nobody --> balls
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.