wx2.6.3: app exits on button click Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

wx2.6.3: app exits on button click

Post by Vexator »

my app worked fine with wx2.6.2. i've now upgraded to the latest build 2.6.3, it still compiles fine (i get these two warnings: "LINK : warning LNK4089: all references to 'ADVAPI32.dll' discarded by /OPT:REF" and "LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF" though), but if i run it and press any button on my toolbar, the app exits without an error - i i choose exit from the menu, it crashes.

any ideas?
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

If you build in release mode and do not handle exceptions (try /EHsc from the fop of my head) and an exception occurs, the app exits.

A snippet of code would be helpful, it might be that you are accessing a null pointer, uninitialized widget or what else.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Post by Vexator »

it seems to be a problem with wxaui which i am using for my gui.

Code: Select all

void Mainframe::OnToolbar( wxCommandEvent &event )
{
switch( event.GetId() )
    {
	case ID_WORLD:

            Manager.GetPane("World panel").Show();
            break;

	case ID_LIGHTING:

            Manager.GetPane("Lighting panel").Show();
            break;

	case ID_TRIGGERS:

            Manager.GetPane("Triggers panel").Show();
            break;

	case ID_PLAYERS:

            Manager.GetPane("Players panel").Show();
            break;

        case ID_WEAPONS:

            Manager.GetPane("Weapons panel").Show();
            break;

        case ID_PROJECTILES:

            Manager.GetPane("Projectiles panel").Show();
            break;

        case ID_ITEMS:

            Manager.GetPane("Items panel").Show();
            break;

	case ID_PROPERTIES:

            Manager.GetPane("Properties panel").Show();
            break;
}
so calling getpane() seems to cause the crash.. :/ no problems in debug mode, though.
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
phlox81
wxWorld Domination!
wxWorld Domination!
Posts: 1387
Joined: Thu Aug 18, 2005 7:49 pm
Location: Germany
Contact:

Post by phlox81 »

well, would be nice to know how GetPane looks like...
And, how do you store the panes ?
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Post by Vexator »

this is done by wxaui, not by myself. let me download the wxaui sample and look if it works with wx2.6.3..

EDIT: i'm a fool.. i just recompiled wxaui with wx2.6.3 and it all workd again -.- i totally forgot about that. sry for wasting your time.
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Hehe happens to the best of us ;-)

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Post Reply