- From: Kamaraju S Kusumanchi <address@hidden>
- To: address@hidden
- Subject: Re: [TeXmacs] Texmacs segfaults when closing documents: Solved?
- Date: Sat, 04 Oct 2008 19:24:28 -0400
- Organization: Cornell University
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/
Archive powered by MHonArc 2.6.19.