#1005 SafeTk with -use crashes wish

obsolete: 8.4a2
closed-fixed
Jeffrey Hobbs
5
2002-10-08
2001-04-06
Anonymous
No

Using safeTk with -use crashes Wish on Windows 95 and
98. Works fine on Linux.
The problem does not occur when -use is not used.

The following script exercises the bug.

pack [frame .f]
wm geom . 300x30
pack .f -fill both -expand y
set slave [safe::interpCreate]
safe::loadTk $slave -use .f

The seg fault occurs in Tk_GeometryRequest,
where winPtr is NULL. It appears that this is from
containerPtr->parentPtr referenced in
EmbedGeometryRequest which is NULL. Perhaps
window isn't mapped???

(gdb) bt
#0 0x556e00 in Tk_GeometryRequest (tkwin=0x0,
reqWidth=258, reqHeight=489)
at ./../generic/tkGeometry.c:154
#1 0x58543c in EmbedGeometryRequest
(containerPtr=0x5b1e6c8, width=258,
height=489) at tkWinEmbed.c:444
#2 0x585400 in TkWinEmbeddedEventProc (hwnd=0xc74,
message=1025, wParam=258,
lParam=489) at tkWinEmbed.c:400
#3 0x542ce1 in TkWinChildProc (hwnd=0xc74,
message=1025, wParam=258,
lParam=489) at tkWinX.c:550
#4 0xbff958f8 in _size_of_stack_reserve__ ()
#5 0x54b621 in Tk_HandleEvent (eventPtr=0x34a04d0)
at ./../generic/tkEvent.c:849
#6 0x54bb63 in WindowEventProc (evPtr=0x34a04c8,
flags=-1)
at ./../generic/tkEvent.c:1199
#7 0x6ae359 in Tcl_ServiceEvent (flags=-1) at
./../generic/tclNotify.c:607
#8 0x6ae610 in Tcl_DoOneEvent (flags=-1) at
./../generic/tclNotify.c:846
#9 0x581408 in Tk_UpdateObjCmd (clientData=0xb308d0,
interp=0xb280c4, objc=1,
objv=0xb3815c) at ./../generic/tkCmds.c:949
#10 0x67e909 in TclExecuteByteCode (interp=0xb280c4,
codePtr=0x5a8281c)
at ./../generic/tclExecute.c:858
#11 0x647d84 in Tcl_EvalObjEx (interp=0xb280c4,
objPtr=0x3423a00, flags=0)
at ./../generic/tclBasic.c:2837
#12 0x67a7c3 in TclObjInterpProc (clientData=0x3458ae8,
interp=0xb280c4,
objc=5, objv=0xb38148) at
./../generic/tclProc.c:1014
---Type <return> to continue, or q <return> to quit---

Discussion

  • Don Porter
    Don Porter
    2001-11-29

    • assigned_to: nobody --> hobbs
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2002-10-08

    Logged In: YES
    user_id=72656

    This seems to be corrected in 8.4.0 in that the above returns
    a Tcl syntax error "this isn't a Tk applicationwindow ".f"
    doesn't have -container option set", which is correct. If I add -
    container 1 to the frame instantiation, it works.

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2002-10-08

    • status: open --> closed-fixed