bugGNU TeXmacs - Bugs: bug #33171, Segfault on kill-buffer

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33171: Segfault on kill-buffer

Submitter:  Joris van der Hoeven <vdhoeven>
Submitted:  Wed 27 Apr 2011 05:06:44 PM UTC
   
 
Category:  User Interface Priority:  9 - Immediate
Item Group:  Error Status:  Works For Me
Privacy:  Public Assigned to:  mdbenito
Originator Name:  Open/Closed:  Closed
Release:  None Release:  1.0.7.10
Fixed Release:  None Fixed Release: 
Keywords: 

Jump to the original submission

Tue 28 Feb 2017 08:29:09 PM UTC, comment #10: 

It seems this is fixed. Closing.
Reopen if I' wrong.

Philippe Joyez <pjoyez>
Group Member
Mon 23 Mar 2015 10:07:23 AM UTC, comment #9: 

As of r9065 the line tm_delete (vw) is uncommented in delete_view() and the procedure described doesn't crash TeXmacs.

Notice that this is still the case after reverting commit 8043, which modified the DEC_COUNT_NULL macro to set the rep to NULL. See the discussion at https://savannah.gnu.org/bugs/index.php?40676.

Miguel de Benito <mdbenito>
Group Member
Mon 25 Nov 2013 02:38:42 PM UTC, comment #8: 

I still have the synchronization error from comment #6.

Also, when uncommenting the 'tm_delete (vw);' line, the following procedure leads to a segfault (in the Qt version):

- Open a buffer
- Type something
- Open a second buffer
- Kill the new buffer

Backtrace:

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread

  1.   libSystem.B.dylib             0x00007fff8792efe6 __kill + 10

1   libSystem.B.dylib             0x00007fff879cfe32 abort + 83
2   libSystem.B.dylib             0x00007fff878e7155 free + 128
3   texmacs.bin                   0x000000010001f781 fast_delete(void*) + 97
4   texmacs.bin                   0x0000000100087d25 QTMWidget::~QTMWidget() + 485 (fast_alloc.hpp:340)
5   QtCore                        0x0000000101de14be QObject::event(QEvent*) + 1118
6   QtGui                         0x000000010110e24e QWidget::event(QEvent*) + 78
7   QtGui                         0x000000010147a19c QFrame::event(QEvent*) + 44
8   QtGui                         0x000000010150722b QAbstractScrollArea::event(QEvent*) + 123
9   texmacs.bin                   0x0000000100083ae6 QTMScrollView::event(QEvent*) + 38 (QTMScrollView.cpp:252)
10  texmacs.bin                   0x00000001000868d0 QTMWidget::event(QEvent*) + 16 (QTMWidget.cpp:890)
11  QtGui                         0x00000001010b367d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
12  QtGui                         0x00000001010b9fad QApplication::notify(QObject*, QEvent*) + 349
13  texmacs.bin                   0x00000001009d1e99 TeXmacs_Application::notify(QObject*, QEvent*) + 25
14  QtCore                        0x0000000101cf96ac QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
15  QtCore                        0x0000000101dd459b QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 731
16  com.apple.CoreFoundation      0x00007fff8871a271 __CFRunLoopDoSources0 + 1361
17  com.apple.CoreFoundation      0x00007fff88718469 __CFRunLoopRun + 873
18  com.apple.CoreFoundation      0x00007fff88717c2f CFRunLoopRunSpecific + 575
...

Joris van der Hoeven <vdhoeven>
Group administrator
Sun 29 Jul 2012 02:15:42 PM UTC, comment #7: 

The last problem is fixed in QT at SVN rev 5549.

The bug with delete_view() is also not present in Qt. The X11 version does crash if the line is uncommented.

Miguel de Benito <mdbenito>
Group Member
Sun 22 Apr 2012 04:42:20 PM UTC, comment #6: 

There is also another problem:

  • Open a buffer
  • Open a second buffer
  • Type something in the second buffer
  • Kill the buffer (C-x k in emacs profile)
  • Answer yes when prompted


There is a synchronization error.
The last line in 'focus_on_editor' should be uncommented.

Joris van der Hoeven <vdhoeven>
Group administrator
Fri 20 Apr 2012 02:56:16 PM UTC, comment #5: 

In fact, the line 'tm_delete (vw);' was commented out in the routine 'delete_view'. The bug reappears if you uncomment this line. It remains a very annoying bug.

Joris van der Hoeven <vdhoeven>
Group administrator
Thu 08 Mar 2012 01:02:59 AM UTC, comment #4: 

I confirm I haven't had any crashes related to this for a while. Was it you or was it me? If I did it, it was a side effect... :)

Miguel de Benito <mdbenito>
Group Member
Thu 08 Mar 2012 12:39:28 AM UTC, comment #3: 

The bug seems disappeared in current svn (r4944). Joris are you still able to make TM crash when closing buffers?

Massimiliano Gubinelli <mgubi>
Group administrator
Wed 24 Aug 2011 05:06:50 PM UTC, comment #2: 

The bug seems to have various variants: it also occurs when
using multiple windows and closing certain ones of them.
In the Qt version, this is annoying, since people may easily
open multiple windows by clicking on several TeXmacs files from
a file browser (under MacOS, a single process is used in
this case).

Joris van der Hoeven <vdhoeven>
Group administrator
Thu 14 Jul 2011 08:31:02 PM UTC, comment #1: 

In my local copy I changed line 345 of tm_server.cpp to read:

  for (i=0; i<=N(bufs); i++) {

instead of

  for (i=0; i<N(bufs); i++) {

Intuition tells me this should cause a crash instead of fixing it. But I haven't had any more crashes when closing a buffer since I changed this. I haven't committed the "fix" because of its hackish I-dont-know-what-im-doing nature.

Miguel de Benito <mdbenito>
Group Member
Wed 27 Apr 2011 05:06:44 PM UTC, original submission:  

In the Qt version, killing the current buffer (C-x k, emacs mode)
yields a segmentation fault.

Joris van der Hoeven <vdhoeven>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pjoyez (Posted a comment)
  • -email is unavailable- added by mgubi (Posted a comment)
  • -email is unavailable- added by mdbenito (Posted a comment)
  • -email is unavailable- added by vdhoeven (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-28 pjoyez Open/ClosedOpen Closed
    2015-03-23 mdbenito StatusConfirmed Works For Me
        Assigned tovdhoeven mdbenito
    2012-07-29 mdbenito CategoryQt port User Interface
        StatusNeed Info Confirmed
        Assigned tomgubi vdhoeven
    2012-03-08 mgubi StatusConfirmed Need Info
    2011-08-24 vdhoeven Priority7 - High 9 - Immediate
    2011-08-24 vdhoeven Priority5 - Normal 7 - High

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code