Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing With Videos #82

Closed
seniorm0ment opened this issue Jan 13, 2024 · 25 comments
Closed

Crashing With Videos #82

seniorm0ment opened this issue Jan 13, 2024 · 25 comments
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software

Comments

@seniorm0ment
Copy link

seniorm0ment commented Jan 13, 2024

Checklist

  • [X ] I can reproduce the bug with the latest version.
  • [ X] I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
  • [X ] I have read the FAQ and my problem isn't listed.
  • [ X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [ X] This issue contains only one bug.
  • [ X] I have read and understood the contribution guidelines.

Describe the bug
App keeps crashing when viewing different videos. Not all videos.
I watched a full movie on the app no issues yesterday on the plane, however when I tried playing a few 8sec videos I recorded months ago the app kept crashing without error.

Crashes when you click into the video from the thumbnail after it plays a few seconds.

One of the files for example
3840 x 2160 (8.3MP)
Size: 33.3MB

Fdroid v1.1.1, Pixel 8 Pro GrapheneOS

To Reproduce
Steps to reproduce the behavior:

  1. Go to gallery
  2. Click on video
  3. Video opens up and plays a few seconds
  4. App crashes or the app just flickers and goes back to the gallery thumbnail screen

Expected behavior
Video plays smoothly without issue

Device info (please complete the following information):

  • Model: Pixel 8 Pro
  • OS: Android 14, GrapheneOS
  • Version F-Droid 1.1.1
@seniorm0ment
Copy link
Author

Likely related to #81

@Aga-C
Copy link
Member

Aga-C commented Jan 13, 2024

Please adjust your bug report to the issue template.

@Aga-C Aga-C added device/software specific Issues that only happen on some devices or with some specific hardware/software bug Something is not working needs triage Issue is not yet ready for PR authors to take up template ignored The user didn't follow the template/instructions (or removed them) labels Jan 13, 2024
@seniorm0ment
Copy link
Author

@Aga-C oops sorry Fasthub on Android is half broken and doesn't show templates. Will fix

@Aga-C Aga-C removed needs triage Issue is not yet ready for PR authors to take up template ignored The user didn't follow the template/instructions (or removed them) labels Jan 13, 2024
@Aga-C
Copy link
Member

Aga-C commented Jan 13, 2024

Thanks! Can you add some more info?

  • Was this video working in Gallery without problems earlier?
  • If it was working, have you modified anything in your OS?

@seniorm0ment
Copy link
Author

This has been an issue before the fork. Although not forever. I first started noticing it maybe beginning of December.
And no it is just GrapheneOS I changed nothing with it

@seniorm0ment
Copy link
Author

Was able to retrieve this from one of the crashes, hope it helps

type: crash
osVersion: google/husky/husky:14/UQ1A.240105.004/2024010400:user/release-keys
package: org.fossify.gallery:5
process: org.fossify.gallery
processUptime: 15792 + 255 ms
installer: com.android.packageinstaller

java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$4.done(AsyncTask.java:415)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
	at java.util.concurrent.FutureTask.run(FutureTask.java:269)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 131088 byte allocation with 60856 free bytes and 59KB until OOM, target footprint 268435456, growth limit 268435456
	at java.util.HashMap.resize(HashMap.java:700)
	at java.util.HashMap.putVal(HashMap.java:625)
	at java.util.HashMap.putMapEntries(HashMap.java:512)
	at java.util.HashMap.clone(HashMap.java:1467)
	at org.fossify.gallery.helpers.MediaFetcher.getFilesFrom(SourceFile:250)
	at org.fossify.gallery.asynctasks.GetMediaAsynctask.doInBackground(SourceFile:16)
	at org.fossify.gallery.asynctasks.GetMediaAsynctask.doInBackground(SourceFile:1)
	at android.os.AsyncTask$3.call(AsyncTask.java:394)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 4 more

@Derkades
Copy link

Derkades commented Jan 20, 2024

Possibly similar issue when rotating the device while playing a video:

type: crash
osVersion: google/bluejay/bluejay:14/UQ1A.240105.002/2024011600:user/release-keys
package: org.fossify.gallery:5
process: org.fossify.gallery
processUptime: 21734 + 948 ms
installer: com.looker.droidify

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.fossify.gallery/org.fossify.gallery.activities.ViewPagerActivity}: android.view.InflateException: Binary XML file line #38 in org.fossify.gallery:layout/activity_medium: Binary XML file line #38 in org.fossify.gallery:layout/activity_medium: Error inflating class <unknown>
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3833)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3974)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6013)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5909)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:76)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2475)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8279)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: android.view.InflateException: Binary XML file line #38 in org.fossify.gallery:layout/activity_medium: Binary XML file line #38 in org.fossify.gallery:layout/activity_medium: Error inflating class <unknown>
Caused by: android.view.InflateException: Binary XML file line #38 in org.fossify.gallery:layout/activity_medium: Error inflating class <unknown>
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Constructor.newInstance0(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
	at android.view.LayoutInflater.createView(LayoutInflater.java:866)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1018)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:973)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1135)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1138)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:694)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
	at org.fossify.gallery.databinding.ActivityMediumBinding.inflate(SourceFile:2)
	at org.fossify.gallery.databinding.ActivityMediumBinding.inflate(SourceFile:1)
	at org.fossify.gallery.activities.ViewPagerActivity$special$$inlined$viewBinding$1.invoke(SourceFile:3)
	at org.fossify.gallery.activities.ViewPagerActivity$special$$inlined$viewBinding$1.invoke(SourceFile:1)
	at za.n.getValue(SourceFile:12)
	at org.fossify.gallery.activities.ViewPagerActivity.getBinding(SourceFile:3)
	at org.fossify.gallery.activities.ViewPagerActivity.onCreate(SourceFile:8)
	at android.app.Activity.performCreate(Activity.java:8674)
	at android.app.Activity.performCreate(Activity.java:8652)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1461)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3815)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3974)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6013)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5909)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:76)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2475)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8279)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 5392 free bytes and 5392B until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at libcore.util.NativeAllocationRegistry.registerNativeAllocation(NativeAllocationRegistry.java:270)
	at android.graphics.Path.<init>(Path.java:52)
	at l9.a.<init>(SourceFile:6)
	at m9.h.<init>(SourceFile:15)
	at m9.h.<init>(SourceFile:3)
	at m9.h.<init>(SourceFile:1)
	at com.google.android.material.appbar.MaterialToolbar.<init>(SourceFile:109)
	... 39 more

@naveensingh
Copy link
Member

@seniorm0ment Do you have a lot of media files?

@seniorm0ment
Copy link
Author

seniorm0ment commented Jan 20, 2024

Yes, although that is kinda subjective

@naveensingh
Copy link
Member

Crashes when you click into the video from the thumbnail after it plays a few seconds.

Caused by: java.lang.OutOfMemoryError: Failed to allocate a 131088 byte allocation with 60856 free bytes and 59KB until OOM, target footprint 268435456, growth limit 268435456
at java.util.HashMap.resize(HashMap.java:700)
at java.util.HashMap.putVal(HashMap.java:625)
at java.util.HashMap.putMapEntries(HashMap.java:512)
at java.util.HashMap.clone(HashMap.java:1467)
at org.fossify.gallery.helpers.MediaFetcher.getFilesFrom(SourceFile:250)

I think the crash happens because the app initiates a refresh while the video is being played and since there are a lot of media files, it might take a few seconds to lead to an OOM error. I should be able to reproduce this but I don't have enough media files at the moment.

Yes, although that is kinda subjective

Can you provide us with a range? How many files do you have? In the Gallery app, you can select all and tap the ⓘ (Properties) button to get the file count. And no, the number of files on your device is objective as it is always the same no matter the observer :)

@seniorm0ment
Copy link
Author

Say roughly 7200 files
Also I meant "a lot" is subjective haha. What you consider a lot may be 1000 and what I consider a lot could be 20000 :p

@naveensingh
Copy link
Member

Say roughly 7200 files

That is 'a lot'.

Also I meant "a lot" is subjective

Makes sense now :)

@Aga-C Aga-C mentioned this issue Mar 5, 2024
7 tasks
@Lppsoeht
Copy link

Lppsoeht commented Mar 5, 2024

So there's no fix to this atm?

@naveensingh
Copy link
Member

@Lppsoeht I'm yet to work on it.

@Lppsoeht
Copy link

Lppsoeht commented Mar 7, 2024

@Lppsoeht I'm yet to work on it.

To me it doesn't happen with all videos. It seem to happen only to long videos or videos edited in android app

@naveensingh
Copy link
Member

@Lppsoeht If you can, please share one of the videos that led to the crash in your case.

@naveensingh
Copy link
Member

@Lppsoeht do you also have "Play videos automatically" enabled?

@naveensingh
Copy link
Member

Should be fixed in the next update, reopen if it isn't.

@friendlyflame
Copy link

Should be fixed in the next update, reopen if it isn't.

I am on the latest version of Fossify Gallery (i.e 1.1.3), the issue still persists when playing "some" high-resolution videos. One of a video file for example, won't play and thumbnail doesn't appear
1440 x 1978 (2.8MP)
6.3 MB

@Lppsoeht
Copy link

Does it crash? Sometimes when videos don't open try using media players like vlc

@naveensingh
Copy link
Member

@friendlyflame please provide the following info:

  • Device model and OS version
  • Number of media files on your device
  • If possible, video file(s) that caused this crash

@friendlyflame
Copy link

friendlyflame commented Jun 1, 2024

@friendlyflame please provide the following info:

  • Device model and OS version
  • Number of media files on your device
  • If possible, video file(s) that caused this crash
  • Motorola Moto g42 on Android 13
  • 1280 media files
  • Can't provide, but any 2k potrait/ 4k landscape video

@friendlyflame
Copy link

Any updates in this?

@naveensingh
Copy link
Member

No updates but I plan to check it soon.

@naveensingh
Copy link
Member

@seniorm0ment Hi! Are you also able to reproduce this with the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software
Projects
None yet
Development

No branches or pull requests

6 participants