You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made my own crash handler which makes a dump on the signal handler, I want to be able to inform the user and prompt them to upload the dump file but since I can't access the JVM from a signal handler (because of signal safety) I'm forced to report and upload the crash in a new instance of my app.
Right now whenever the user opens up the app again it prompts the user for this but I wanna know if it's possible to use "execv" to maybe launch app_process to spawn a new instance of the app before killing the previous one?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've made my own crash handler which makes a dump on the signal handler, I want to be able to inform the user and prompt them to upload the dump file but since I can't access the JVM from a signal handler (because of signal safety) I'm forced to report and upload the crash in a new instance of my app.
Right now whenever the user opens up the app again it prompts the user for this but I wanna know if it's possible to use "execv" to maybe launch app_process to spawn a new instance of the app before killing the previous one?
I have seen something similar in https://github.com/chromium/crashpad/blob/c4c71b80c6a2e02544172ff5a4e2568631f0ab59/client/crashpad_client_linux.cc#L522 but I don't know if this even works or not? I tried executing app_process from adb shell to try to run my app (app_process /system/bin --application com.example.app.MainActivity) (I used run-as as well) but app_process is aborted and it's unable to find my "com.example.app.MainActivity" (FindClass failed)
I tried having a look over the crashlytics source code since I found no other open source project using the crashpad's StartJavaHandlerAtCrash, they apprently set some environment variable before executing app_process: https://github.com/firebase/firebase-android-sdk/blob/dc5f291b8b6fb10d478972ec64928e345b6c70b6/firebase-crashlytics-ndk/src/main/jni/libcrashlytics/src/handler/install.cpp#L211 but even when I tried to do the same, app_process is still aborting with the same message.
I'd like to say that unfortunately due to some limitations I'm unable to use crashlytics so I'll be glad if I receive some assistance in this case.
Beta Was this translation helpful? Give feedback.
All reactions