App stopped running suddenly

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
sly_chandan
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Sep 25, 2015 2:33 pm

App stopped running suddenly

Post by sly_chandan » Mon Dec 10, 2018 4:51 pm

My App was working fine when suddenly it stopped running


I have attached the debug operation giving a segmentation fault.


I have attached the screenshot
Attachments
Untitled.png

User avatar
doublemax
Moderator
Moderator
Posts: 13179
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: App stopped running suddenly

Post by doublemax » Mon Dec 10, 2018 5:20 pm

It's impossible to say something specific with this little information. Especially we'd need a complete call stack that also shows the last location in your code that was called. You should use a debug build of your application.

Most likely there is a logical error in your code. The crash itself could point to a bad wxSizer pointer assigned to a wxWindow. But that's all i could say.
Use the source, Luke!

sly_chandan
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Sep 25, 2015 2:33 pm

Re: App stopped running suddenly

Post by sly_chandan » Mon Dec 10, 2018 5:37 pm

I just had it running yesterday and for some reason it stopped working!


Maybe a little tweaking in the designer and source code.

But no change was done without any broken compile.

That's all I have in the call stack.

How am I supposed to debug with that info of call stack?

User avatar
doublemax
Moderator
Moderator
Posts: 13179
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: App stopped running suddenly

Post by doublemax » Mon Dec 10, 2018 8:59 pm

How am I supposed to debug with that info of call stack?
You are creating a release build (which does not contain debug information). You need to create a debug build.

But as i don't know Code:Blocks, i can't tell you exactly how to do that.
Use the source, Luke!

sly_chandan
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Sep 25, 2015 2:33 pm

Re: App stopped running suddenly

Post by sly_chandan » Wed Dec 12, 2018 2:08 pm

Got That!!!

So I need to create a Debug Build. That makes sense now.

But how in the world am I supposed to change the wxwidgets Compiled project with an existing application.

Because when I created the application I had to select the compiled wxwidgets code.

Is there a way to change the build debug to an existing application?

Please help!!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1882
Joined: Sun Jan 03, 2010 5:45 pm

Re: App stopped running suddenly

Post by PB » Wed Dec 12, 2018 6:08 pm

I would advise to have (at least) two configurations builds in your application - Debug and Release.

Code::Blocks makes this easy as it allows you to have multiple build targets where you can set build option for each target independently.
buildtargets.png
buildtargets.png (17.15 KiB) Viewed 156 times

Post Reply