Thanks for the report Fulvio
In that case I will download a clean version of plplot tomorrow and check how
it works with that. Unfortunately I do almost all my coding on a windows
environment - mostly because the debugging tools are so good.
Speak soon
Phil
________________________________
From: fulvio ciriaco <[email protected]>
To: [email protected]
Cc: [email protected]; [email protected]
Sent: Thursday, 21 February 2013, 20:41
Subject: Re: [Plplot-devel] [ plplot-Bugs-3604554 ] wxwidgets window
Hallo,
thank you,
but the patch does not work here, i.e. debian.
I applied it to plplot latest from sourceforge:
a. it still segfaults as soon as drawing after calling plinit second time
b. does not correctly tidy up, i.e. close the window after plend
Fulvio
From: phil rosenberg <[email protected]>
Subject: Re: [Plplot-devel] [ plplot-Bugs-3604554 ] wxwidgets window
Date: Thu, 21 Feb 2013 09:52:51 -0800 (PST)
> I just tweaked example 00c so that after plend() the gui the plot creation is
> repeated starting with plinit().
> The segfault problem is caused by the static install_buffer function in
> wxwidgets.cpp. There is a static bool called initApp which is set to true on
> the first call to plinit(). Because the variable is local it can't be reset
> to false by plend() so wxWidgets does its tidying, destroys the wxApp but on
> the second call to plinit the wxApp is not recreated giving a segfault when
> the top level frame tries to access it.
>
> I've move initApp into wxPLDevBase and the segfault is now avoided.
>
> I've attached a patch, but my copy of PLplot currently has a few
> modifications and isn't quite up to date so if it won't apply please let me
> know and I'll download a fresh copy to patch instead.
>
> Phil
>
>
> ________________________________
> From: phil rosenberg <[email protected]>
> To: "[email protected]"
> <[email protected]>; "[email protected]"
> <[email protected]>
> Sent: Thursday, 21 February 2013, 15:31
> Subject: [Plplot-devel] [ plplot-Bugs-3604554 ] wxwidgets window
>
>
> I think there are a few complexities around when closing the final windows in
> wxWidgets. I don't know if you remember some months ago a user reporting
> memory leaks with the wxWidgets examples. I think this came down to the fact
> that wxWidgets ends the program when its final window is closed without
> passing control back to the example code meaning that memory allocated there
> was never released. Perhaps the issues are linked - something to do with
> wxwidgets have done all its cleaning up, but PLplot expecting to be able to
> reinitiate something?
> If you would like me to have a look into it then if you drop me the segfault
> example I'll see what it does on my (Windows) system.
>
> Phil
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel