Closed GoogleCodeExporter closed 9 years ago
demo lib and app: https://github.com/4ntoine/Acra-breakpad
Original comment by d...@antonsmirnov.name
on 11 Mar 2014 at 9:18
I am also getting the same error. From the behaviour, I believe breakpad is
catching signals per thread. Please correct me if I am wrong.
Do we need to init breakpad with dump callback in every thread or its just
something wrong with my set up?
Thanks for your help.
Original comment by rohit.wa...@gmail.com
on 13 Mar 2014 at 11:11
I do breakpad init in the same thread but it does not catch the signals (see
github repo above)
Original comment by d...@antonsmirnov.name
on 13 Mar 2014 at 11:12
I doubt that. You are initializing breakpad in the main application thread and
the crash is happening in a UI thread.
Original comment by rohit.wa...@gmail.com
on 13 Mar 2014 at 11:23
AFAIK there is no "app thread" and it's single UI thread.
Original comment by d...@antonsmirnov.name
on 13 Mar 2014 at 11:25
I've checked it and i'm absolutely sure it's the same UI thread:
// Application.onCreate()
"<1> main"@830 028 261 120 in group "main": RUNNING
// button clicked
"<1> main"@830 028 261 120 in group "main": RUNNING
testCatch():38, MainActivity {name.antonsmirnov.android.acra_breakpad.app}
access$000():8, MainActivity {name.antonsmirnov.android.acra_breakpad.app}
onClick():29, MainActivity$1 {name.antonsmirnov.android.acra_breakpad.app}
performClick():4171, View {android.view}
Original comment by d...@antonsmirnov.name
on 13 Mar 2014 at 11:41
breakpad init is done in Application.onCreate() (see app code)
Original comment by d...@antonsmirnov.name
on 13 Mar 2014 at 11:48
Breakpad simply initializes a POSIX signal handler. These are process-wide.
Your problem is that you are creating the ExceptionHandler class on the stack:
https://github.com/4ntoine/Acra-breakpad/blob/master/lib/jni/native_exception_ha
ndler.cpp#L72
The ExceptionHandler class is an RAII-type class, so it will install the signal
handlers in its constructor, and then remove them in a destructor. If you want
this to work you'll need to heap-allocate it and store it in a global variable
somewhere.
Original comment by ted.mielczarek
on 13 Mar 2014 at 12:22
it helped, thanks. Probably you should change your android app code to
demonstrate this as now it's misleading and i used the code from example.
Original comment by d...@antonsmirnov.name
on 13 Mar 2014 at 2:59
Original issue reported on code.google.com by
d...@antonsmirnov.name
on 10 Mar 2014 at 7:41