|
From: JVZ <je...@fo...> - 2017-01-09 14:01:03
|
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. |
+----------------------------------------------------------------------------+
|