Closed antong closed 6 years ago
Awesome, thanks for sending this. Can't promise a timeline immediately, but this will be helpful!
@antong we'll try to fix this soon. For our own notes:
I've seen two ways to trigger this crash:
(Reliably) Open the audio recording screen, start an audio recording, and kill the app from the task switcher (without stopping the recording first). Then tap the notification again.
(Occasionally) Don't open the app for a few hours, and then tap the audio recording notification.
Here's the most relevant part of the stack trace:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getString(int)' on a null object reference
at org.beiwe.app.storage.PersistentData.getSurveySubmitSuccessToastText(PersistentData.java:283)
at org.beiwe.app.survey.AudioRecorderCommon.<init>(AudioRecorderCommon.java:47)
at org.beiwe.app.survey.AudioRecorderActivity.<init>(AudioRecorderActivity.java:14)
@zagorsky, yes your number 2 is what I'm experiencing regularly. With our setup, I get daily survey and audio recording requests. So, I usually get two notifications, one for the survey and one for the audio recording. When I first tap the audio recording notification I get this crash but when I tap the survey notification I get the password prompt and then get the survey. If I first do the survey, then the audio recording doesn't crash.
@antong, this should be fixed in commit 9278f16. I'll push a new version of the app soon so you can test it.
@antong, this should be fixed in Beiwe version 2.2.6 and higher. If you're compiling the app yourself, it should be fixed in commit 9278f16, which is on master. For anyone who's installing the app from Google Play, you can install Beiwe (currently 2.2.7) by opening the Google Play app on an Android phone, finding the Beiwe2 app, scrolling down to "Become a beta tester", and enrolling in the beta test.
Repeating crash when touching the audio recording notification occurred about two hours after installation and initial logon. The notification did not go away, but the app crashed every time when tapping the notification. When I opened the app from the launcher, the logon screen appeared. After logon, tapping the notification worked as expected and the audio recording interface opened.
A log excerpt follows.
Android version 6.0.1