| Ticket UUID: | d602d5a1e039336882ac812735a816e779215325 | |||
| Title: | Text widget segfaults on peer destroy | |||
| Type: | Bug | Version: | trunk | |
| Submitter: | fvogel | Created on: | 2017-01-29 08:25:09 | |
| Subsystem: | 18. [text] | Assigned To: | fvogel | |
| Priority: | 8 | Severity: | Critical | |
| Status: | Closed | Last Modified: | 2017-01-29 14:21:13 | |
| Resolution: | Invalid | Closed By: | fvogel | |
| Closed on: | 2017-01-29 14:21:13 | |||
| Description: |
In trunk on Linux, the following segfaults:
text .t
.t peer create .tt
destroy .t .tt
Does not happen in either of the following cases: - on Windows, with either trunk or core-8-6-branch - on Linux with core-8-6-branch - if .t and .tt are swapped in the destroy line | |||
| User Comments: |
fvogel added on 2017-01-29 14:21:13:
Problem disappears after 'make clean'. The bisected commit [e45568b5] changed the size of the TkSharedText structure, which was not propagated in the compilation result from tkTextBTree.c on my Linux machine. Sigh... nothing to see here. Been bitten several times by this already... Sorry for the false alarm. fvogel added on 2017-01-29 10:28:08: First segfaulting commit is: [e45568b5] The undo marks identifier is now a member of textPtr->sharedTextPtr. This makes results of test text-8.22 independant of previous undo/redo actions on other text widgets. (that is: from trunk-based [d0aea8f2], reverting the above removes the segfault) fvogel added on 2017-01-29 10:11:01: Backtrace:
<verbatim>
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b20d49 in TkBTreeRemoveClient (tree=0x689e20, textPtr=0x66b090) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkTextBTree.c:578
578 if (adjustPtr->pixelReference == treePtr->pixelReferences-1) {
(gdb) bt
#0 0x00007ffff7b20d49 in TkBTreeRemoveClient (tree=0x689e20, textPtr=0x66b090) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkTextBTree.c:578
#1 0x00007ffff7b17d76 in DestroyText (textPtr=0x66b090) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkText.c:1970
#2 0x00007ffff7b18fb7 in TextEventProc (clientData=0x66b090, eventPtr=0x7fffffffd930) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkText.c:2522
#3 0x00007ffff7a77ed4 in Tk_HandleEvent (eventPtr=0x7fffffffd930) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkEvent.c:1341
#4 0x00007ffff7aa1bb6 in Tk_DestroyWindow (tkwin=0x7dfbd0) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkWindow.c:1386
#5 0x00007ffff7a6c331 in Tk_DestroyObjCmd (clientData=0x667680, interp=0x618ca0, objc=3, objv=0x61cd50) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkCmds.c:497
#6 0x00007ffff7642d75 in Dispatch (data=0x706428, interp=0x618ca0, result=0) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclBasic.c:4365
#7 0x00007ffff7642dfe in TclNRRunCallbacks (interp=0x618ca0, result=0, rootPtr=0x0) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclBasic.c:4398
#8 0x00007ffff7645949 in TclEvalObjEx (interp=0x618ca0, objPtr=0x74d9a0, flags=131072, invoker=0x0, word=0) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclBasic.c:5963
#9 0x00007ffff76458df in Tcl_EvalObjEx (interp=0x618ca0, objPtr=0x1, flags=131072) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclBasic.c:5944
#10 0x00007ffff7733982 in Tcl_RecordAndEvalObj (interp=0x618ca0, cmdPtr=0x703f90, flags=131072) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclHistory.c:190
#11 0x00007ffff7733647 in Tcl_RecordAndEval (interp=0x618ca0, cmd=0x7fffffffdec0 " destroy .t .tt\n", flags=131072) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclHistory.c:75
#12 0x00007ffff7a8d5f0 in StdinProc (clientData=0x7fffffffdea0, mask=2) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkMain.c:456
#13 0x00007ffff7746e0f in Tcl_NotifyChannel (channel=0x70efb0, mask=2) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclIO.c:8360
#14 0x00007ffff77be71a in FileHandlerEventProc (evPtr=0x74da20, flags=-3) at /home/francois/Documents/tcltk/fossil/tcl/unix/tclUnixNotfy.c:805
#15 0x00007ffff776b6af in Tcl_ServiceEvent (flags=-3) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclNotify.c:670
#16 0x00007ffff776baeb in Tcl_DoOneEvent (flags=-3) at /home/francois/Documents/tcltk/fossil/tcl/generic/tclNotify.c:967
#17 0x00007ffff7a78b74 in Tk_MainLoop () at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkEvent.c:2137
#18 0x00007ffff7a8d3ba in Tk_MainEx (argc=-1, argv=0x7fffffffe1e0, appInitProc=0x400aeb <Tcl_AppInit>, interp=0x618ca0) at /home/francois/Documents/tcltk/fossil/tk/unix/../generic/tkMain.c:390
#19 0x0000000000400ae4 in main (argc=1, argv=0x7fffffffe1d8) at /home/francois/Documents/tcltk/fossil/tk/unix/../unix/tkAppInit.c:78
</verbatim>
fvogel added on 2017-01-29 09:48:58: Bisecting points at: [177f5ee6] Merged implementation of TIP #449 - [text] undo/redo to Return Range of Characters. This explains why the issue is not seen in 8.6 branch, but not why it does not affect Windows (this commit changes platform independent files only). | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki