|
From: Olivier B. <per...@gm...> - 2017-01-09 14:21:38
|
Does constructing the app on the heap do the same?
Or are you sure are not constructing an other FXApp in your
mainWindows or the code it triggers? FXApp has some static data. You
seem to be able to build multiple ones, but the second deletion
doesn't work well
2017-01-09 15:00 GMT+01:00 JVZ <je...@fo...>:
> On Sat, 7 Jan 2017 20:11:33 +0100
> Roland Plüss <ro...@rp...> wrote:
>
>>This is along problem I skimmed around by now deleting the FXApp. I
>>would like to clean up things to get it working properly but it just
>>ain't working. The following situation:
>>
>>int main( int argc, char **argv ){
>> FXApp *app = NULL;
>> app = new FXApp( "Drag[en]gine Integrated Game Development
>>Environment", "Drag[en]gine" );
>> app->init( argc, argv );
>> FXToolTip *tooltip = new FXToolTip( app );
>> app->create();
>> igdeWindowMain *windowMain = new igdeWindowMain( app, &cmdArgs );
>> windowMain->create();
>> // main loop... once finished
>> delete app;
>> return 0;
>>}
>>
>>Doing this I always get a segfault.
>>
>>Program received signal SIGSEGV, Segmentation fault.
>>0x00007ffff7757c9b in FX::FXComposite::~FXComposite() () from
>>/usr/lib64/libFOX-1.7.so.0
>>(gdb) bt
>>#0 0x00007ffff7757c9b in FX::FXComposite::~FXComposite() () from
>>/usr/lib64/libFOX-1.7.so.0
>>#1 0x00007ffff782ea09 in FX::FXRootWindow::~FXRootWindow() () from
>>/usr/lib64/libFOX-1.7.so.0
>>#2 0x00007ffff773a94e in FX::FXApp::~FXApp() () from
>>/usr/lib64/libFOX-1.7.so.0
>>#3 0x00007ffff773aee9 in FX::FXApp::~FXApp() () from
>>/usr/lib64/libFOX-1.7.so.0
>>#4 0x000000000040c452 in main (argc=1, argv=<optimized out>) at
>>src/tools/linux/deigde/src/deigde.cpp:117
>>
>>Any ideas why FXApp fails like this? Did I not understand something on
>>FXApp inner workings?
>
> This ought to work, under normal circumstances; it is the same sequence
> as most of my own apps.
>
> I would try run a memory checker like valgrind and see if there is potentially
> some heap-corruption going on elsewhere in the code; this could happen, and
> (depending on what it touches), manifest itself at a much later time.
>
>
>
> -- JVZ
>
>
>
> +----------------------------------------------------------------------------+
> | Copyright (C) 17:00 01/ 6/2017 Jeroen van der Zijp. All Rights Reserved. |
> +----------------------------------------------------------------------------+
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Foxgui-users mailing list
> Fox...@li...
> https://lists.sourceforge.net/lists/listinfo/foxgui-users
|