texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Re: [TeXmacs] Texmacs segfaults when closing documents: So


From: Alvaro Tejero Cantero
Subject: [Texmacs-dev] Re: [TeXmacs] Texmacs segfaults when closing documents: Solved?
Date: Sun, 5 Oct 2008 23:38:41 +0200

Actually, you're right: closing documents doesn't shut down the editor
on 1.0.6.15 nor on latest CVS (included QT).

However, the patch fixed the issue for me on 1.0.6.14. I attach the
patch from Enrique with the correct line-breaking. Thank you very much
Enrique for all the explanations regarding the patch format.

Álvaro.

PS. I move the thread to texmacs-dev


On Sun, Oct 5, 2008 at 01:24, Kamaraju S Kusumanchi
<address@hidden> wrote:
> Enrique Perez-Terron wrote:
>
>> I have had a look at the source code. Widgets are ref-counted, and
>> automatically deleted when the refcount comes down to zero.
>>
>> Setting a breakpoint in the destructor for edit_interface_rep, I found
>> the refcount was zero. However, when if calls is_attached(this) a new
>> reference is created, and when this reference is deleted as it goes out
>> of scope, the reference count goes to zero again. This initiates a
>> second call to the destructor for the same object.
>>
>> The reference is created because is_attached() is declared to take a
>> 'widget' object, ie a reference-counting pointer. The 'this' pointer is
>> just a pointer, but the compiler constructs a temporary 'widget' object.
>>
>> I tried to add a boolean "is_dying" to the base class holding the
>> reference counter, and an additional condition before deleting, so it
>> only deletes if the refcount becomes zero and is_dying is false.
>>
>
> One Debian user reported a similar problem on
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496355 . It seemed to have
> been fixed in 1.0.6.15 according to that report. Could you please upgrade
> to 1.0.6.15 and check the crash again?
>
> thanks
> raju
> --
> Kamaraju S Kusumanchi
> http://www.people.cornell.edu/pages/kk288/
> http://malayamaarutham.blogspot.com/
>
>

Attachment: closedocument.patch
Description: application/shellscript


reply via email to

[Prev in Thread] Current Thread [Next in Thread]