Capturing call-stack wx
Capturing call-stack wx
Hi,
I wonder if there is a way to capture a call-stack with the wxwidgets.
At the moment, we made a software with 3rd part library, and it is normally works fine, but sometimes, we get an assertion and the program crash.
To debug it, we were asked by the support, to capture a stack call when the software crash.
We have an idea where the possible crash could happen, and I would like to know if there is a way in the wxwidgets to catch this call-stack or i need to use c++ instead.
Thanks for your support, and sorry in case the question is not on topic.
Best Regards,
Nicola.
I wonder if there is a way to capture a call-stack with the wxwidgets.
At the moment, we made a software with 3rd part library, and it is normally works fine, but sometimes, we get an assertion and the program crash.
To debug it, we were asked by the support, to capture a stack call when the software crash.
We have an idea where the possible crash could happen, and I would like to know if there is a way in the wxwidgets to catch this call-stack or i need to use c++ instead.
Thanks for your support, and sorry in case the question is not on topic.
Best Regards,
Nicola.
Re: Capturing call-stack wx
Hi,
1. Can you reproduce a crash in you environment?
2. What OS the program is running on?
3. What language it is written on?
Thank you.
1. Can you reproduce a crash in you environment?
2. What OS the program is running on?
3. What language it is written on?
Thank you.
Re: Capturing call-stack wx
Adding to oneeyeman....
Sorry for asking the obvious, but did you look into these classes: http://docs.wxwidgets.org/3.1/group__gr ... gging.html. The use of the classes is demonstrated in the debugrpt sample.
Sorry for asking the obvious, but did you look into these classes: http://docs.wxwidgets.org/3.1/group__gr ... gging.html. The use of the classes is demonstrated in the debugrpt sample.
Re: Capturing call-stack wx
Hi,
1) We can try to reproduce and error, but it is depends on the data input, we are trying to identify the source of the problem, but the error is showing at a random time of running (until we found out the source of the problem).
2)We are currently running the application on CentOs 7
3)We are using wxWidgets 2.8.12-Linux-Unicode build, and a SDK for the 3rdp part library c++.
@PB We should look at the sample, maybe it can help to undestand what is wrong with the code, I asked for the call-stack, because the 3rdp-part want some more information after we sent the type of assertion.
Thanks you,
Nicola.
1) We can try to reproduce and error, but it is depends on the data input, we are trying to identify the source of the problem, but the error is showing at a random time of running (until we found out the source of the problem).
2)We are currently running the application on CentOs 7
3)We are using wxWidgets 2.8.12-Linux-Unicode build, and a SDK for the 3rdp part library c++.
@PB We should look at the sample, maybe it can help to undestand what is wrong with the code, I asked for the call-stack, because the 3rdp-part want some more information after we sent the type of assertion.
Thanks you,
Nicola.
Re: Capturing call-stack wx
Usually it's the debugger that gives you the call stack.
Use the source, Luke!
Re: Capturing call-stack wx
Hi doublemax,
should I compile the project with the debug flag active to see the call stack? At the moment it is in release mode, I'm using the codeblock (13.12) as project manager.
Thanks you all for the support,
Nicola.
should I compile the project with the debug flag active to see the call stack? At the moment it is in release mode, I'm using the codeblock (13.12) as project manager.
Thanks you all for the support,
Nicola.
Re: Capturing call-stack wx
Hi,
Yes, you need to compile in debug mode, or even better - move to 3.1.
Thank you.
Yes, you need to compile in debug mode, or even better - move to 3.1.
Thank you.
Re: Capturing call-stack wx
Hi,
thanks you for the quick answer.
We can try to compile the project in debug mode and look for further informations.
We can also try to move on 3.1 if this could help to solve the issue.
Thanks again for the support,
Nicola.
thanks you for the quick answer.
We can try to compile the project in debug mode and look for further informations.
We can also try to move on 3.1 if this could help to solve the issue.
Thanks again for the support,
Nicola.
Re: Capturing call-stack wx
Hi,
we have rebuilt the project in debug mode, so we should have more info about the crash.
when the software has a crash, another application relaunch the software with wxExecute (async), is there a way to open the software with the shell, so we can see the debug message from if (avoiding the closing of the shell)?
Thanks,
Nicola.
we have rebuilt the project in debug mode, so we should have more info about the crash.
when the software has a crash, another application relaunch the software with wxExecute (async), is there a way to open the software with the shell, so we can see the debug message from if (avoiding the closing of the shell)?
Thanks,
Nicola.
Re: Capturing call-stack wx
under windows, you can use dbg view https://technet.microsoft.com/en-us/sys ... gview.aspx to capture all data written to the console.
Re: Capturing call-stack wx
Hi,
IIUC you are running 'crashing_software' from another program. If so, instead of running:
wxExecute( " /path/to/crashing_software --any --options" );
perhaps you could run:
wxExecute( "gdb --args /path/to/crashing_software --any --options" );
You should then be able to get useful information from gdb when the crash occurs.
Alternatively, you could use the wxExecute (const wxString &command, wxArrayString &output, wxArrayString &errors) version of wxExecute, which might provide helpful information in the errors array.
Regards,
David
IIUC you are running 'crashing_software' from another program. If so, instead of running:
wxExecute( " /path/to/crashing_software --any --options" );
perhaps you could run:
wxExecute( "gdb --args /path/to/crashing_software --any --options" );
You should then be able to get useful information from gdb when the crash occurs.
Alternatively, you could use the wxExecute (const wxString &command, wxArrayString &output, wxArrayString &errors) version of wxExecute, which might provide helpful information in the errors array.
Regards,
David
Re: Capturing call-stack wx
Hi,
thanks for the useful suggestion.
I will try on a computer with the k option, and on another one with the gdb command.
I'll come back as soon as I got some new report.
Thanks again,
Best Regards,
Nicola
thanks for the useful suggestion.
I will try on a computer with the k option, and on another one with the gdb command.
I'll come back as soon as I got some new report.
Thanks again,
Best Regards,
Nicola