-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I've noticed that the app sometimes crashes (force close by Android) when a recording finishes. The recording file is complete and valid but the crash gives a bad impression of the app.
Here is the stack from logcat:
E/AndroidRuntime(11593): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=file:///sdcard/.../whatever.wav }} to activity {kaljurand_at_gmail_dot_com.diktofon/kaljurand_at_gmail_dot_com.diktofon.activity.RecordingListActivity}: java.lang.NullPointerException
E/AndroidRuntime(11593): at android.app.ActivityThread.deliverResults(ActivityThread.java:3389)
E/AndroidRuntime(11593): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3432)
E/AndroidRuntime(11593): at android.app.ActivityThread.access$1300(ActivityThread.java:144)
E/AndroidRuntime(11593): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1253)
E/AndroidRuntime(11593): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(11593): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(11593): at android.app.ActivityThread.main(ActivityThread.java:5146)
E/AndroidRuntime(11593): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11593): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(11593): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
E/AndroidRuntime(11593): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime(11593): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(11593): Caused by: java.lang.NullPointerException
E/AndroidRuntime(11593): at kaljurand_at_gmail_dot_com.diktofon.activity.RecordingListActivity.a(Unknown Source)
E/AndroidRuntime(11593): at kaljurand_at_gmail_dot_com.diktofon.activity.RecordingListActivity.onActivityResult(Unknown Source)
E/AndroidRuntime(11593): at android.app.Activity.dispatchActivityResult(Activity.java:5423)
E/AndroidRuntime(11593): at android.app.ActivityThread.deliverResults(ActivityThread.java:3385)
E/AndroidRuntime(11593): ... 11 more
W/ActivityManager( 684): Force finishing activity kaljurand_at_gmail_dot_com.diktofon/.activity.RecordingListActivity
The crash appears to be in the method RecordingListActivity.addRecording(File file)
I use the internal recorder mode MY_ACTIVITY_RECORD_SOUND
It looks like the argument file is already checked for null in onActivityResult
Maybe mRecordings == null because the AsyncTask for loadRecordingsInBackground hasn't finished?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels