[Debichem-devel] RFH: drawxtl seg-faulting (#853829)

Ben Hutchings ben at decadent.org.uk
Mon Dec 23 01:23:57 GMT 2019


On Mon, 2019-12-23 at 00:58 +0100, Daniel Leidert wrote:
> Hi,
> 
> I'm in need of assistance to fix #853829. The issue is that drawxtl segfaults
> on exit. The offending lines are 350 and/or 356 (and similar) in
> source/DRAWxtl55/CrystalView.cxx. I get the gut feeling that calling the
> delete() function on the Fl_Window objects (Configure->ConfigWindow), for which
> the destructor (~Fl_Window()) already has been called, might be the issue here:
> 
> >      if (Configure) {
> >         Configure->ConfigWindow->~Fl_Window ();
> >         delete (Configure->ConfigWindow);
> >         delete (Configure);
> >         Configure = NULL;
> > 
> 
> But I'm not experienced with FLTK and I even cannot find a description of the
> delete() function to judge,

That's because delete is an operator, not a function.

> if this method is safe or unsafe to call here. If
> I'm right, the fix is as easy as commenting out the relevant delete() calls.
> 
> Any help is appreciated.

If Configure->ConfigWindow has been allocated with the new operator,
the direct call to the destructor is wrong and the delete is correct.

If it has been allocated in some unusual way, then the direct call to
the destructor is probably correct and the delete is wrong.

Ben.

-- 
Ben Hutchings
Lowery's Law:
        If it jams, force it. If it breaks, it needed replacing anyway.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/debichem-devel/attachments/20191223/579ac459/attachment.sig>


More information about the Debichem-devel mailing list