caydey / ffshare

An android app to compress image, video and audio files through ffmpeg before sharing them
GNU General Public License v3.0
615 stars 30 forks source link

Constant crashes when handling larger video files #87

Closed HarriBuh closed 5 months ago

HarriBuh commented 5 months ago

Describe the bug As the description says. As long as selected files are small (tested with 3-80 MB), there weren't any issues. But when selecting larger files (145 MB), the app will instantly crash.

Settings applied Clean install, vanilla settings App Logs

[Device Brand]: google
[Device Model]: Pixel 7
[Android Version]: 14
[Android API Level]: 34
[CPU ABI]: arm64-v8a
[Package Name]: com.caydey.ffshare
[Version Name]: 1.3.0
[Version Code]: 19
[Target SDK]: 32
[Min SDK]: 26
[Error Type]: JVM
[Crash Time]: 2024-06-24T14:24:50.992
[Stack Trace]:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.caydey.ffshare/com.caydey.ffshare.HandleMediaActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3993)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4173)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114)
    at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:231)
    at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:152)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
    at k1.j.c(Unknown Source:2173)
    at com.caydey.ffshare.HandleMediaActivity.C(Unknown Source:198)
    at com.caydey.ffshare.HandleMediaActivity.onCreate(Unknown Source:52)
    at android.app.Activity.performCreate(Activity.java:8960)
    at android.app.Activity.performCreate(Activity.java:8938)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3975)
    ... 13 more

File used _Uploading the file to help replicate the bug is very helpful however if it is not possible, run the following command on the file ffprobe -v quiet -print_format json -show_format -show_streams FILE and include its output_

I didn't understand how exactly I should do this.

caydey commented 5 months ago

I think this issue is caused by #85. I've just published those changes in a new release, try downloading the latest APK in the releases page and check if the issue persists

HarriBuh commented 5 months ago

Yep, the latest release indeed fixed my issue. Thanks, closing the issue.