Library Version: com.github.Mindinventory:Lassi:1.5.0
Environment
Android version: Android 12
Device: sdk_gphone64_x86_64-userdebug 12 SE1A.220826.008 10564458 dev-keys
Kotlin/Java: Kotlin
Issue Description
We are encountering a crash when launching the Lassi VideoPreviewActivity. The crash seems related to a File object being constructed with a null path during initViews(), causing a NullPointerException and preventing the activity from starting.
Crash Log (Sentry)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vebuin.smartflow/com.lassi.presentation.videopreview.VideoPreviewActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.NullPointerException
at java.io.File.(File.java:283)
at com.lassi.presentation.videopreview.VideoPreviewActivity.initViews(VideoPreviewActivity.kt:51)
at com.lassi.presentation.common.LassiBaseActivity.onCreate(LassiBaseActivity.kt:30)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
Possible Cause
The crash originates from:
VideoPreviewActivity.initViews() at line 51
which suggests the video file path/URI passed to the activity is null, and File(path) is being called without a null check. This results in a NullPointerException from java.io.File. and the activity fails to start.
@sanjay-mi @BhavinVala18
Library Version: com.github.Mindinventory:Lassi:1.5.0
Environment
Android version: Android 12
Device: sdk_gphone64_x86_64-userdebug 12 SE1A.220826.008 10564458 dev-keys
Kotlin/Java: Kotlin
Issue Description
We are encountering a crash when launching the Lassi VideoPreviewActivity. The crash seems related to a File object being constructed with a null path during initViews(), causing a NullPointerException and preventing the activity from starting.
Crash Log (Sentry)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vebuin.smartflow/com.lassi.presentation.videopreview.VideoPreviewActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.NullPointerException
at java.io.File.(File.java:283)
at com.lassi.presentation.videopreview.VideoPreviewActivity.initViews(VideoPreviewActivity.kt:51)
at com.lassi.presentation.common.LassiBaseActivity.onCreate(LassiBaseActivity.kt:30)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
Possible Cause
The crash originates from:
VideoPreviewActivity.initViews() at line 51
which suggests the video file path/URI passed to the activity is null, and File(path) is being called without a null check. This results in a NullPointerException from java.io.File. and the activity fails to start.
@sanjay-mi @BhavinVala18