On 05/29/2016 08:40 PM, jp charras wrote:
[snip]
> Hi, Orson,
> 
> About the crash which happens in OPENGL_GAL dtor, when executing delete 
> OPENGL_GAL::glContext;, I am
> now pretty sure the crash is due to an use after delete issue.
> 
> If it is called when exiting the application, no problem.
> 
> The issue certainly depends on the OS and the WM, so it explains why on some 
> OS there is no crash.
> 
> I had a look at the wxWidgets opengl sample cube.cpp.
> 
> The sample deletes also the wxGLContext in wxApp:OnExit, not in wxGLCanvas 
> dtor.
> There is surely a reason.
> 
> I attached a patch which shows my changes. Please have a look at it and feel 
> free to use and enhance it.
> 
> I noticed a wxClientDC initialized but never used in Opengl_gal class. I 
> removed it.
> I also noticed an other thing: in DRAW_PANEL_GAL::OnPaint event, a wxPaintDC 
> is never created.
> This is mandatory in OnPaint events, even if the wxDC is not used (this is in 
> wxWidgets doc).
> I added it.
> (See the wxWidgets opengl sample cube.cpp for these problems).
> 
> Thanks.

Hi Jean-Pierre,

Thank you for looking into the problem, I never really had a crash on
Windows, so it was hard to find the cause.

Apparently, there are two issues: the first one described by you, the
second one discovered by Mario. I am quite sure I will reuse majority of
your patch, but I would like to implement a few things in a different
way to solve both problems at once. I should have it ready by the end of
the week.

Regards,
Orson


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to