Page 2 of 2
Re: Fatal exceptions logging
Posted: Sun Nov 24, 2019 3:49 pm
by alys666
it's ubuntu 16.04/Intel, desktop, not rasberry.
yes i've built wxWIdgets, but nothing special, with very common settings..just for dynamic link libraries.
compiler - g++.
Re: Fatal exceptions logging
Posted: Sun Nov 24, 2019 8:47 pm
by ONEEYEMAN
Hi,
What is your exact configure line?
Thank you.
Re: Fatal exceptions logging
Posted: Mon Nov 25, 2019 12:55 am
by alys666
muscle. i wrote a simple function of "native" stack dump using c++ stdlib.
Code: Select all
#include <execinfo.h>
void dumpStack(){
const int max_entries = 1000; //let we try to unwind 1000 frames deep stack
void* lbuf[max_entries]; //buffer for stack frames entries
int lcnt = backtrace(lbuf, max_entries); //get frames pointers
char **lstr = backtrace_symbols(lbuf,lcnt); //get symbolic info(text) for entries
if(!lstr) return; //if no success - return
for(int i=0; i<lcnt;++i){ //dump entries to stdout
std::cout<<"-->"<<lstr[i]<<"\n";
}
free(lstr); //free allocated buffer
}
wxWidgets use this functions to unwind the stack.
works well for my system.
Re: Fatal exceptions logging
Posted: Mon Nov 25, 2019 12:49 pm
by Big Muscle
I tested your function to generate the log on crash and the output is very similar. __default_sa_restorer is last line of the backtrace. I can now say that the issue is not WX-related.
./COurApp() [0x80acc]
./COurApp() [0x81cc4]
./COurApp() [0x400680]
/lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x75fb5120]
But when generated directly in the code (instead of crash) then it is different:
./COurApp() [0x6fac8]
./COurApp() [0x41d1e0]
./COurApp() [0x41ed4c]
./COurApp() [0x41f100]
./COurApp() [0x41f270]
./COurApp() [0x420c1c]
./COurApp() [0xdd3cc]
If it works in your case then it must be g++ ARM-specific issue. I have never seen this behaviour on any other platform either.
The WX build was configured with plain "./configure".
Even google returns lot of stack traces ending with __default_sa_restorer on ARM. Then I found this topic
https://stackoverflow.com/questions/315 ... m-platform - it advises to use "-funwind-tables -fasynchronous-unwind-tables" and it seems to be working!
Re: Fatal exceptions logging
Posted: Mon Nov 25, 2019 3:39 pm
by alys666
it looks like your gcc does not store unwinding info by default.
or may be you have some specific gcc options.
Re: Fatal exceptions logging
Posted: Mon Nov 25, 2019 5:33 pm
by Big Muscle
It is Raspbian, I have not change anything according to gcc.