From: SourceForge.net <no...@so...> - 2010-02-17 16:16:27
|
Bugs item #2952745, was opened at 2010-02-16 07:34 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2952745&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: 23. Option Parsing Group: development: 8.6b1.1 Status: Open Resolution: None >Priority: 9 Private: No Submitted By: Jan Nijtmans (nijtmans) >Assigned to: Joe English (jenglish) Summary: Crash in menu.test on Win32 Initial Comment: Running the standard Tk test suite on HEAD, using VC++ 6.0 or mingw (either debug or release), I am experiencing a crash. On Linux, everything works fine, but not on Windows (XP). I managed to generate the following stack trace, pointing to tkConfig.c, line 1629. The visual studio debugger indicates that specPtr here has the value 0xcdcdef00, while optionPtr points to 0x00d25a4c, so it looks like specPtr is used after it is freed somewhere. Is anyone aware of recent changes which might have causes this? Stack trace: =========================================== Tk_FreeConfigOptions(char * 0x01a44f70, Tk_OptionTable_ * 0x00d2edd8, Tk_Window_ * 0x01a44170) line 1629 + 3 bytes DestroyMenuInstance(TkMenu * 0x01a44f70) line 1237 + 27 bytes TkDestroyMenu(TkMenu * 0x01a44f70) line 1318 + 9 bytes TkMenuEventProc(void * 0x01a44f70, _XEvent * 0x0012e534) line 764 + 9 bytes Tk_HandleEvent(_XEvent * 0x0012e534) line 1344 + 17 bytes Tk_DestroyWindow(Tk_Window_ * 0x01a44170) line 1415 + 9 bytes Tk_DestroyWindow(Tk_Window_ * 0x018fd9d8) line 1356 + 9 bytes FrameCmdDeletedProc(void * 0x01fa0d78) line 1730 + 9 bytes Tcl_DeleteCommandFromToken(Tcl_Interp * 0x01fd0c60, Tcl_Command_ * 0x01fa0cf8) line 2980 + 13 bytes TclTeardownNamespace(Namespace * 0x01ffc5c8) line 1062 + 13 bytes DeleteInterpProc(Tcl_Interp * 0x01fd0c60) line 1390 + 12 bytes Tcl_EventuallyFree(void * 0x01fd0c60, void (char *)* 0x0058fb11 DeleteInterpProc(Tcl_Interp *)) line 299 + 7 bytes Tcl_DeleteInterp(Tcl_Interp * 0x01fd0c60) line 1280 + 14 bytes SlaveObjCmdDeleteProc(void * 0x01fd0c60) line 2582 + 12 bytes Tcl_DeleteCommandFromToken(Tcl_Interp * 0x00d058a8, Tcl_Command_ * 0x018ebac0) line 2980 + 13 bytes Tcl_InterpObjCmd(void * 0x00000000, Tcl_Interp * 0x00d058a8, int 3, Tcl_Obj * const * 0x00df0bbc) line 797 + 25 bytes NRRunObjProc(void * * 0x01a844bc, Tcl_Interp * 0x00d058a8, int 0) line 4348 + 19 bytes TclNRRunCallbacks(Tcl_Interp * 0x00d058a8, int 0, TEOV_callback * 0x02049290, int 1) line 4295 + 18 bytes TclExecuteByteCode(Tcl_Interp * 0x00d058a8, ByteCode * 0x019548a0) line 2803 + 22 bytes NRCallTEBC(void * * 0x016f139c, Tcl_Interp * 0x00d058a8, int 0) line 4371 + 16 bytes TclNRRunCallbacks(Tcl_Interp * 0x00d058a8, int 0, TEOV_callback * 0x00000000, int 0) line 4295 + 18 bytes Tcl_EvalObjv(Tcl_Interp * 0x00d058a8, int 1, Tcl_Obj * const * 0x00df0280, int 2097152) line 4067 + 19 bytes TclEvalEx(Tcl_Interp * 0x00d058a8, const char * 0x01581c90, int 783, int 0, int 22, int * 0x00000000, const char * 0x01581c90) line 5237 + 22 bytes Tcl_EvalEx(Tcl_Interp * 0x00d058a8, const char * 0x01581c90, int 783, int 0) line 4893 + 29 bytes Tcl_FSEvalFileEx(Tcl_Interp * 0x00d058a8, Tcl_Obj * 0x00d0b7e0, const char * 0x00000000) line 1746 + 19 bytes Tk_MainEx(int -1, char * * 0x00bc15c8, int (Tcl_Interp *)* 0x00401005 _Tcl_AppInit, Tcl_Interp * 0x00d058a8) line 270 + 26 bytes WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00152331, int 10) line 135 + 26 bytes WinMainCRTStartup() line 330 + 54 bytes KERNEL32! 7c817077() ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2010-02-17 11:16 Message: Looks like it. Here's a somewhat better stack trace: Program received signal SIGSEGV, Segmentation fault. 0x081299a3 in Tk_FreeConfigOptions ( recordPtr=0x9a45220 "p\222�\t�JD\th�\215\t\030\207�\t\b��\t", optionTable=0x61616161, tkwin=0x9a79270) at /home/dgp/cvs/tk/unix/../generic/tkConfig.c:1626 1626 for (optionPtr = tablePtr->options, count = tablePtr->numOptions; (gdb) bt #0 0x081299a3 in Tk_FreeConfigOptions ( recordPtr=0x9a45220 "p\222�\t�JD\th�\215\t\030\207�\t\b��\t", optionTable=0x61616161, tkwin=0x9a79270) at /home/dgp/cvs/tk/unix/../generic/tkConfig.c:1626 #1 0x0807316d in DestroyMenuInstance (menuPtr=0x9a45220) at /home/dgp/cvs/tk/unix/../generic/tkMenu.c:1236 #2 0x0807328a in TkDestroyMenu (menuPtr=0x9a45220) at /home/dgp/cvs/tk/unix/../generic/tkMenu.c:1318 #3 0x080790a9 in TkMenuEventProc (clientData=0x9a45220, eventPtr=0xbfde3f74) at /home/dgp/cvs/tk/unix/../generic/tkMenuDraw.c:764 #4 0x0812d94d in Tk_HandleEvent (eventPtr=0xbfde3f74) at /home/dgp/cvs/tk/unix/../generic/tkEvent.c:1344 #5 0x0805dbe1 in Tk_DestroyWindow (tkwin=0x9a79270) at /home/dgp/cvs/tk/unix/../generic/tkWindow.c:1415 #6 0x0805dad7 in Tk_DestroyWindow (tkwin=0x98fd840) at /home/dgp/cvs/tk/unix/../generic/tkWindow.c:1356 #7 0x0806bedf in FrameCmdDeletedProc (clientData=0x991c120) at /home/dgp/cvs/tk/unix/../generic/tkFrame.c:1730 #8 0x08164c01 in Tcl_DeleteCommandFromToken (interp=0x98db268, cmd=0x98eacc0) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:2980 #9 0x0822a52c in TclTeardownNamespace (nsPtr=0x98dbef0) at /home/dgp/cvs/tcl-only/generic/tclNamesp.c:1062 #10 0x08162ec1 in DeleteInterpProc (interp=0x98db268) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:1390 #11 0x0824131e in Tcl_EventuallyFree (clientData=0x98db268, freeProc=0x8162d03 <DeleteInterpProc>) at /home/dgp/cvs/tcl-only/generic/tclPreserve.c:299 #12 0x08162cfd in Tcl_DeleteInterp (interp=0x98db268) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:1280 #13 0x08205ff4 in SlaveObjCmdDeleteProc (clientData=0x98db268) at /home/dgp/cvs/tcl-only/generic/tclInterp.c:2582 #14 0x08164c01 in Tcl_DeleteCommandFromToken (interp=0x93f4628, cmd=0x98e4018) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:2980 #15 0x08202e0a in Tcl_InterpObjCmd (clientData=0x0, interp=0x93f4628, objc=3, objv=0x95169e4) at /home/dgp/cvs/tcl-only/generic/tclInterp.c:796 #16 0x08166957 in NRRunObjProc (data=0x98db18c, interp=0x93f4628, result=0) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4348 #17 0x0816670a in TclNRRunCallbacks (interp=0x93f4628, result=0, rootPtr=0x98dad18, tebcCall=1) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4295 #18 0x081d9477 in TclExecuteByteCode (interp=0x93f4628, codePtr=0x98daff0) at /home/dgp/cvs/tcl-only/generic/tclExecute.c:2803 #19 0x081669ef in NRCallTEBC (data=0x95c175c, interp=0x93f4628, result=0) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4371 #20 0x0816670a in TclNRRunCallbacks (interp=0x93f4628, result=0, rootPtr=0x0, tebcCall=0) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4295 #21 0x081660aa in Tcl_EvalObjv (interp=0x93f4628, objc=1, objv=0x9516108, flags=2097152) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4067 #22 0x08168321 in TclEvalEx (interp=0x93f4628, script=0x96242d0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tk\n# tests. Execute it by invoking \"source all.tcl\" when running tktest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Sc"..., numBytes=783, flags=0, line=22, clNextOuter=0x0, outerScript=0x96242d0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tk\n# tests. Execute it by invoking \"source all.tcl\" when running tktest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Sc"...) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:5237 #23 0x0816786f in Tcl_EvalEx (interp=0x93f4628, script=0x96242d0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tk\n# tests. Execute it by invoking \"source all.tcl\" when running tktest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Sc"..., numBytes=783, flags=0) at /home/dgp/cvs/tcl-only/generic/tclBasic.c:4893 #24 0x0821edff in Tcl_FSEvalFileEx (interp=0x93f4628, pathPtr=0x94291f0, encodingName=0x0) at /home/dgp/cvs/tcl-only/generic/tclIOUtil.c:1750 #25 0x0805bd2a in Tk_MainEx (argc=-1, argv=0xbfde605c, appInitProc=0x805b6c8 <Tcl_AppInit>, interp=0x93f4628) at /home/dgp/cvs/tk/unix/../generic/tkMain.c:270 #26 0x0805b6b8 in main (argc=2, argv=0xbfde6054) at /home/dgp/cvs/tk/unix/../unix/tkAppInit.c:71 Passing to jenglish, who I think has a good handle on the flaws of tkConfig.c. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2010-02-17 10:57 Message: Is this tests menu-26.1 and menu-27.1 ? ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-02-16 18:30 Message: Going back in history, the crash first occurred 2010-01-04. Tk on 20010-01-03 didn't crash but hangs, but that might be caused because I ran it against Tcl HEAD. So, the suspicious commit is : 2010-01-03 Pat Thoyts <pat...@us...> * generic/tkMenu.h: [Patch 2848897]: Support the system keyboard * win/tkWinMenu.c: cues option on Windows. This system parameter hides the underlines on menu items unless the keyboard is used to open the menu. (kovalenko, thoyts) Pat, do you see the same crash? The clean-up code for menu's is not easy to be understood, probably the problem exists longer but was masked by other changes.... any ideas? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2952745&group_id=12997 |