From: James B. <jk...@mr...> - 2002-02-07 10:21:12
|
I'm not sure if this is a Tk or Itk bug. I'll put some more analysis into it to see if I can figure it out some more. (Hence this isn't in sourceforge bugs yet.) I seem able to get nested loops within the ArrangePacking (and other) functions when trying to create a window. Eg: iwidgets::tabnotebook .nb pack .nb Using grid instead has the same problems. This causes a recursive loop which quickly crashes the interpreter due to insufficient stack space. ... #1921 0x00b7adf0 in ArrangePacking (clientData=0xa8dec0) at ../generic/tkPack.c:817 #1922 0x0039ef34 in TclServiceIdle () at /Users/jkb/tcl/macosx/../unix/../generic/tclTimer.c:692 #1923 0x00386db0 in Tcl_DoOneEvent (flags=34) at /Users/jkb/tcl/macosx/../unix/../generic/tclNotify.c:936 #1924 0x00b2e150 in Tk_UpdateObjCmd (clientData=0xb3230, interp=0x8cfe0, objc=2, objv=0x8dd18) at ../generic/tkCmds.c:950 #1925 0x0034e648 in TclExecuteByteCode (interp=0x8cfe0, codePtr=0xaa4ec0) at /Users/jkb/tcl/macosx/../unix/../generic/tclExecute.c:869 #1926 0x0031ed0c in Tcl_EvalObjEx (interp=0x8cfe0, objPtr=0xa3f7e8, flags=0) at /Users/jkb/tcl/macosx/../unix/../generic/tclBasic.c:2951 #1927 0x009c8bc8 in Itcl_EvalMemberCode () #1928 0x009c9920 in Itcl_ExecMethod () #1929 0x009d3130 in Itcl_EvalArgs () #1930 0x009cc168 in Itcl_HandleInstance () #1931 0x0034e648 in TclExecuteByteCode (interp=0x8cfe0, codePtr=0xa923b0) at /Users/jkb/tcl/macosx/../unix/../generic/tclExecute.c:869 #1932 0x0031ed0c in Tcl_EvalObjEx (interp=0x8cfe0, objPtr=0x967d8, flags=0) at /Users/jkb/tcl/macosx/../unix/../generic/tclBasic.c:2951 #1933 0x003852d8 in NamespaceInscopeCmd (dummy=0x0, interp=0x8cfe0, objc=4, objv=0xbfffd77c) at /Users/jkb/tcl/macosx/../unix/../generic/tclNamesp.c:3356 #1934 0x0038426c in Tcl_NamespaceObjCmd (clientData=0x0, interp=0x8cfe0, objc=4, objv=0xbfffd77c) at /Users/jkb/tcl/macosx/../unix/../generic/tclNamesp.c:2525 #1935 0x0038a610 in EvalObjv (interp=0x8cfe0, objc=4, objv=0xbfffd77c, command=0xbfffd930 "namespace inscope ::iwidgets::Tabnotebook {::.nb _resize 292 142}", length=65, flags=0) at /Users/jkb/tcl/macosx/../unix/../generic/tclParse.c:932 #1936 0x0038b13c in Tcl_EvalEx (interp=0x8cfe0, script=0xbfffd930 "namespace inscope ::iwidgets::Tabnotebook {::.nb _resize 292 142}", numBytes=65, flags=0) at /Users/jkb/tcl/macosx/../unix/../generic/tclParse.c:1450 #1937 0x0038b5c0 in Tcl_Eval (interp=0x8cfe0, string=0xbfffd930 "namespace inscope ::iwidgets::Tabnotebook {::.nb _resize 292 142}") at /Users/jkb/tcl/macosx/../unix/../generic/tclParse.c:1605 #1938 0x00321094 in Tcl_GlobalEval (interp=0x8cfe0, command=0xbfffd930 "namespace inscope ::iwidgets::Tabnotebook {::.nb _resize 292 142}") at /Users/jkb/tcl/macosx/../unix/../generic/tclBasic.c:4367 #1939 0x00afd298 in Tk_BindEvent (bindingTable=0x2b2670, eventPtr=0xbfffdcb8, tkwin=0xa480f0, numObjects=0, objectPtr=0xbfffdb8c) at ../generic/tkBind.c:1780 #1940 0x00b2cea4 in TkBindEventProc (winPtr=0xa480f0, eventPtr=0xbfffdcb8) at ../generic/tkCmds.c:287 #1941 0x00b3d84c in Tk_HandleEvent (eventPtr=0xbfffdcb8) at ../generic/tkEvent.c:864 #1942 0x00baa440 in TkDoConfigureNotify (winPtr=0xa480f0) at ../generic/tkWindow.c:2125 #1943 0x00ba9db8 in Tk_MoveResizeWindow (tkwin=0xa480f0, x=4, y=4, width=292, height=142) at ../generic/tkWindow.c:1821 #1944 0x00b7adf0 in ArrangePacking (clientData=0xa8dec0) at ../generic/tkPack.c:817 #1945 0x0039ef34 in TclServiceIdle () at /Users/jkb/tcl/macosx/../unix/../generic/tclTimer.c:692 Clearly there's going to be one (or possibly two) rounds of resizing and shuffling while the widgets are initially packed, but why does this recurse forever? I've seen the same action with one of own own C-coded widgets and a scrollbar. Removing the scrollbar cured the loop, as did leaving the scrollbar but setting its borderwidth to 1. I'll try and reconstruct a case using pure tcl/tk... James -- James Bonfield (jk...@mr...) Fax: (+44) 01223 213556 Medical Research Council - Laboratory of Molecular Biology, Hills Road, Cambridge, CB2 2QH, England. Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/ |