[wxMac] fix for app.cpp when using wx in embedded situations

Chad Wagner chad at chadawagner.com
Fri Nov 3 05:48:30 PST 2006


Thanks Stefan, I was having issues with that as well.  Is it changed  
in the downloadable tar of wxMac, or do I need to go to CVS?

I have another issue which may be related.  When I unload I call  
wxEntryCleanup, which calls wxClassInfo::CleanUp, but then if I load  
the plugin again while the host app is still running, it doesn't  
reload the library file (it is already in memory) so the static  
initialization e.g. IMPLEMENT_CLASS macros are not performed, and I'm  
left with a null wxClassInfo::sm_classTable.  Conceptually, the  
problem seems to be that wxEntryCleanup is undoing more than  
wxEntryStart had done.  Is there a way for me to force the host app  
to re-source the library, or another wx function I can call to  
rebuild the class info?  Otherwise I'm stuck with the sloppy option  
of not deleting it on exit.

Thanks,
Chad

On Oct 20, 2006, at 1:32 AM, Stefan Csomor wrote:

> Hi
>
> all who are using wx in an embedded situation and unload wx before the
> host app terminates might have had sporadic bug reports ending in
> something like
>
> Thread 0 Crashed:
> 0   mywxcontaining.dylib                 	0x113f0160
> macPostedEventCallback + 28
> 1   com.apple.CoreFoundation       	0x907dd4cc __CFRunLoopDoSources0
> + 384
> 2   com.apple.CoreFoundation       	0x907dc9fc __CFRunLoopRun + 452
> 3   com.apple.CoreFoundation       	0x907dc47c CFRunLoopRunSpecific
> + 268
> 4   com.apple.HIToolbox            	0x93208740
> RunCurrentEventLoopInMode + 264
>
> after wx has already been unloaded
>
> this comes from an incomplete cleanup in app.cpp of a CFRunLoopSource,
> I've fixed app.cpp in CVS HEAD and WX_2_6_BRANCH, so please update
> app.cpp in your code, test and report if this somehow causes problems
>
> Thanks to Richard Oehlinger for sending me the crashlog
>
> Stefan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>





More information about the wx-users mailing list