FLTK logo

Re: [fltk.coredev] Double free of groups

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Double free of groups Rob McDonald Mar 15, 2023  
 
On Wednesday, March 15, 2023 at 7:12:16 AM UTC-7 Albrecht Schlosser wrote:
Sigh. I was afraid that this could happen but did it anyway (to improve speed) in the hope it wouldn't. It's difficult...

Understood.  Sometimes we get lucky, sometimes we don't. 

Given your stack trace below, which one is your subclass? I assume it is Vsp_Group, is this correct?

Correct.

The definition of VspGroup is here.  The implementation is here

The particular group that is crashing (they don't all seem to) includes widgets from Cartesian, a now apparently defunct 2D plotting library for FLTK developed by Roman Kantor.

OK, for my understanding, what do you mean with "now apparently defunct" ? Do you say this because your application crashes (with double free) or for any other reason?

By 'now apparently defunct', I just meant that Cartesian is no longer a maintained / supported project.  Its website is down and I believe the only references to it on the internet are some abandoned SourceForge pages.  We have occasionally had to make small changes to Cartesian to keep it going.

 
Hard to say, but without seeing your code I suspect that your Vsp_Group *can* cause the issue. As you know, I'm responsible for the change that appears to cause it, and I have some ideas how this can happen. But to explain it I need more details, so ...

Is your code public, can I see it somewhere? Although it's maybe not a good idea to investigate in someone else's full code, I have some ideas what to look for, hence I could maybe try to do it. I would also be interested in testing the code so I could analyze it better. However, there shouldn't be too many dependencies.

I can certainly help you look through OpenVSP, but you probably don't want to compile it and use it as a debugging platform.  You've found the Cartesian project and can replicate the issue with its test case -- that should be a better way to go.
 
 
That said, I wonder why I see 'Vsp_Group::~Vsp_Group' twice in the stack trace. Just to be sure, do you have nested Vsp_Group's, or is this maybe a recursion? Nested groups would be OK, a recursion probably not.

I believe it is recursing. 

I think the rest of the questions are answered / superseded by your followup.

Thanks a ton for your attention to this and for all you do with FLTK.

Rob



--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/ba164653-dd35-4ba6-9029-ba3cc86b6875n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.