Open cihadturhan opened 3 years ago
@jelenalecic & @lecicdjuro,
I guess these lines causes null pointer exception but I don't have any prior experience with Kotlin. https://github.com/CarnegieTechnologies/gallery_saver/blob/master/android/src/main/kotlin/carnegietechnologies/gallery_saver/GallerySaver.kt#L78-L86
Any guesses why I see this crash?
@jelenalecic & @lecicdjuro,
I guess these lines causes null pointer exception but I don't have any prior experience with Kotlin. https://github.com/CarnegieTechnologies/gallery_saver/blob/master/android/src/main/kotlin/carnegietechnologies/gallery_saver/GallerySaver.kt#L78-L86
Any guesses why I see this crash?
I am facing the same issue here, I guess the problem is that on some phones, callback with native code happens to be null. Changing "!!" to ? will solve the problem but there will be no feedback to indicate whether the operation succeeded or not.
Same problem, with the same stacktrace and the app crashes.
E/AndroidRuntime(22502): FATAL EXCEPTION: main E/AndroidRuntime(22502): Process: br.com.soupilar.mobile, PID: 22502 E/AndroidRuntime(22502): java.lang.NullPointerException E/AndroidRuntime(22502): at carnegietechnologies.gallery_saver.GallerySaver.finishWithSuccess(GallerySaver.kt:79) E/AndroidRuntime(22502): at carnegietechnologies.gallery_saver.GallerySaver.access$finishWithSuccess(GallerySaver.kt:16) E/AndroidRuntime(22502): at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1.invokeSuspend(GallerySaver.kt:74) E/AndroidRuntime(22502): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) E/AndroidRuntime(22502): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) E/AndroidRuntime(22502): at android.os.Handler.handleCallback(Handler.java:938) E/AndroidRuntime(22502): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(22502): at android.os.Looper.loop(Looper.java:223) E/AndroidRuntime(22502): at android.app.ActivityThread.main(ActivityThread.java:7656) E/AndroidRuntime(22502): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(22502): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/AndroidRuntime(22502): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) I/Process (22502): Sending signal. PID: 22502 SIG: 9 Lost connection to device. Exited (sigterm)
Facing the same crash too.
+1 consider #206, this library is discontinued, right?
is there any update ?
I couldn’t reproduce this on my phone and emulators but this affects my users on google play. Sending stacktrace from gplay console:
Android 8.0 (SDK 26)