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

Submitted by:  Joris van der Hoeven <vdhoeven>
Submitted on:  Wed 27 Apr 2011 05:06:44 PM UTC  
 
Category: User InterfacePriority: 9 - Immediate
Item Group: ErrorStatus: Works For Me
Privacy: PublicAssigned to: Miguel de Benito <mdbenito>
Originator Name: Open/Closed: Closed
Release: 1.0.7.10Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

(Jump to the original submission 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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project 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>
Project MemberIn charge of this item.
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>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Feb 2017 08:29:09 PM UTCpjoyezOpen/ClosedOpen=>Closed
    Mon 23 Mar 2015 10:07:23 AM UTCmdbenitoStatusConfirmed=>Works For Me
      Assigned tovdhoeven=>mdbenito
    Sun 29 Jul 2012 02:15:42 PM UTCmdbenitoCategoryQt port=>User Interface
      StatusNeed Info=>Confirmed
      Assigned tomgubi=>vdhoeven
    Thu 08 Mar 2012 12:39:28 AM UTCmgubiStatusConfirmed=>Need Info
    Wed 24 Aug 2011 05:07:02 PM UTCvdhoevenPriority7 - High=>9 - Immediate
    Wed 24 Aug 2011 05:06:50 PM UTCvdhoevenPriority5 - Normal=>7 - High

    Back to the top


    Powered by Savane 3.1-cleanup1