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

[REPORT] closing the image view #778

Closed
K1rakishou opened this issue Feb 29, 2020 · 8 comments
Closed

[REPORT] closing the image view #778

K1rakishou opened this issue Feb 29, 2020 · 8 comments
Labels
bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual)

Comments

@K1rakishou
Copy link

K1rakishou commented Feb 29, 2020

UUID: 6b12a189d5688b7410caa86b39792c0e
Build flavor: stable
Version name: v4.11.2
OS info: Android 9, sdk version: 28
Report description: after watching some webm and images the back button won't close the image abd would get stuck
Logs:

E/Kuroba | MultiImageView: getWidth() or getHeight() returned 0, or view not laid out, not loading
E/Kuroba | AndroidUtils: view.getViewTreeObserver() is another viewtreeobserver! replacing with the new one

literally hundres of lines

E/Kuroba | MultiImageView: getWidth() or getHeight() returned 0, or view not laid out, not loading
I/Kuroba | FilterWatchManager: Processing filter loaders, started at 02:27:36
@K1rakishou K1rakishou added bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual) labels Feb 29, 2020
@K1rakishou
Copy link
Author

K1rakishou commented Mar 14, 2020

Here is another one with an actual stack trace

=== LOGS(2020-03-14 21:32:30 UTC) ===
E/Kuroba | MultiImageView: getWidth() or getHeight() returned 0, or view not laid out, not loading
E/Kuroba | AndroidUtils: view.getViewTreeObserver() is another viewtreeobserver! replacing with the new one
E/Kuroba | MultiImageView: getWidth() or getHeight() returned 0, or view not laid out, not loading
E/Kuroba | AndroidUtils: view.getViewTreeObserver() is another viewtreeobserver! replacing with the new one
E/Kuroba | MultiImageView: getWidth() or getHeight() returned 0, or view not laid out, not loading
I/Kuroba | FilterWatchManager: Processing filter loaders, started at 22:32:17
E/Kuroba | UNCAUGHT: Called from unhandled exception handler.
E/Kuroba | UNCAUGHT: java.lang.RuntimeException: Canvas: trying to draw too large(400000000bytes) bitmap.
E/Kuroba | UNCAUGHT: 	at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229)
E/Kuroba | UNCAUGHT: 	at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:98)
E/Kuroba | UNCAUGHT: 	at pl.droidsonroids.gif.GifDrawable.draw(GifDrawable.java:786)
E/Kuroba | UNCAUGHT: 	at android.widget.ImageView.onDraw(ImageView.java:1360)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:20207)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19082)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:20210)
E/Kuroba | UNCAUGHT: 	at androidx.viewpager.widget.ViewPager.draw(ViewPager.java:2426)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19082)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.controller.ui.NavigationControllerContainerLayout.dispatchDraw(NavigationControllerContainerLayout.java:243)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:20210)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19082)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:19935)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/Kuroba | UNCAUGHT: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/Kuroba | UNCAUGHT: 	at android.view.View.draw(View.java:20210)
E/Kuroba | UNCAUGHT: 	at com.android.internal.policy.DecorView.draw(DecorView.java:780)
E/Kuroba | UNCAUGHT: 	at android.view.View.updateDisplayListIfDirty(View.java:19082)
E/Kuroba | UNCAUGHT: 	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
E/Kuroba | UNCAUGHT: 	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
E/Kuroba | UNCAUGHT: 	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
E/Kuroba | UNCAUGHT: 	at android.view.ViewRootImpl.draw(ViewRootImpl.java:3318)
E/Kuroba | UNCAUGHT: 	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3122)
E/Kuroba | UNCAUGHT: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2481)
E/Kuroba | UNCAUGHT: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1463)
E/Kuroba | UNCAUGHT: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7190)
E/Kuroba | UNCAUGHT: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
E/Kuroba | UNCAUGHT: 	at android.view.Choreographer.doCallbacks(Choreographer.java:761)
E/Kuroba | UNCAUGHT: 	at android.view.Choreographer.doFrame(Choreographer.java:696)
E/Kuroba | UNCAUGHT: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
E/Kuroba | UNCAUGHT: 	
E/Kuroba | UNCAUGHT: ------------------------------
E/Kuroba | UNCAUGHT: END OF CURRENT RUNTIME MESSAGES
E/Kuroba | UNCAUGHT: ------------------------------
E/Kuroba | UNCAUGHT: Android API Level: 28
E/Kuroba | UNCAUGHT: App Version: v4.11.2
E/Kuroba | UNCAUGHT: Development Build: No
E/Kuroba | UNCAUGHT: Phone Model: HTC One


=== SETTINGS ===
Prefetching enabled: false
Thread downloading enabled: true, active downloads = 0
Hi-res thumbnails enabled: false
Youtube titles parsing enabled: true
Youtube durations parsing enabled: false
Concurrent file loading chunks count: 2
WEBM streaming enabled: false
Saved files base dir info: Java API location: /storage/emulated/0/Kuroba/files, SAF location: , active: Java API
Local threads base dir info: Java API location: /storage/emulated/0/Kuroba/saved_threads, SAF location: , active: Java API
Phone layout mode: PHONE

@K1rakishou
Copy link
Author

@Adamantcheese
Copy link
Owner

The fixes in that link doesn't apply because it's the GIF being drawn that's erroring out. We don't have control over what information is inside GIF files beforehand. Also it's unrelated to the first stack trace.

@Adamantcheese
Copy link
Owner

Looks like #723 has a similar stack trace in it that should also be fixed by 558c5f6.

@K1rakishou
Copy link
Author

Here is another one with an actual stacktrace:

E/Kuroba | MultiImageView: OOM while trying to set a gif file
E/Kuroba | MultiImageView: java.lang.OutOfMemoryError
E/Kuroba | MultiImageView: 	at android.graphics.Bitmap.nativeCreate(Native Method)
E/Kuroba | MultiImageView: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:1266)
E/Kuroba | MultiImageView: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:1219)
E/Kuroba | MultiImageView: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:1169)
E/Kuroba | MultiImageView: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:1130)
E/Kuroba | MultiImageView: 	at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:249)
E/Kuroba | MultiImageView: 	at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:125)
E/Kuroba | MultiImageView: 	at com.github.adamantcheese.chan.ui.view.MultiImageView.setGifFile(MultiImageView.java:471)
E/Kuroba | MultiImageView: 	at com.github.adamantcheese.chan.ui.view.MultiImageView.access$1000(MultiImageView.java:89)
E/Kuroba | MultiImageView: 	at com.github.adamantcheese.chan.ui.view.MultiImageView$3.onSuccess(MultiImageView.java:438)
E/Kuroba | MultiImageView: 	at com.github.adamantcheese.chan.core.cache.FileCacheV2$handleFileImmediatelyAvailable$1$1.run(FileCacheV2.kt:546)
E/Kuroba | MultiImageView: 	at android.os.Handler.handleCallback(Handler.java:907)
E/Kuroba | MultiImageView: 	at android.os.Handler.dispatchMessage(Handler.java:105)
E/Kuroba | MultiImageView: 	at android.os.Looper.loop(Looper.java:216)
E/Kuroba | MultiImageView: 	at android.app.ActivityThread.main(ActivityThread.java:7625)
E/Kuroba | MultiImageView: 	at java.lang.reflect.Method.invoke(Native Method)
E/Kuroba | MultiImageView: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
E/Kuroba | MultiImageView: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

@Adamantcheese
Copy link
Owner

That is an OOM which should be in #723. Also it's not particularly helpful.

@K1rakishou
Copy link
Author

There is also this one:

E/Kuroba | UNCAUGHT: Called from unhandled exception handler.
E/Kuroba | UNCAUGHT: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.setHasAlpha(boolean)' on a null object reference
E/Kuroba | UNCAUGHT: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:981)
E/Kuroba | UNCAUGHT: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:948)
E/Kuroba | UNCAUGHT: 	at android.graphics.Bitmap.createBitmap(Bitmap.java:915)
E/Kuroba | UNCAUGHT: 	at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:249)
E/Kuroba | UNCAUGHT: 	at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:125)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.view.MultiImageView.setGifFile(MultiImageView.java:471)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.view.MultiImageView.access$1000(MultiImageView.java:89)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.ui.view.MultiImageView$3.onSuccess(MultiImageView.java:438)
E/Kuroba | UNCAUGHT: 	at com.github.adamantcheese.chan.core.cache.FileCacheV2$handleFileImmediatelyAvailable$1$1.run(FileCacheV2.kt:546)
E/Kuroba | UNCAUGHT: 	at android.os.Handler.handleCallback(Handler.java:751)
E/Kuroba | UNCAUGHT: 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/Kuroba | UNCAUGHT: 	at android.os.Looper.loop(Looper.java:154)
E/Kuroba | UNCAUGHT: 	at android.app.ActivityThread.main(ActivityThread.java:6780)
E/Kuroba | UNCAUGHT: 	at java.lang.reflect.Method.invoke(Native Method)
E/Kuroba | UNCAUGHT: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500)
E/Kuroba | UNCAUGHT: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390)
E/Kuroba | UNCAUGHT: ------------------------------
E/Kuroba | UNCAUGHT: END OF CURRENT RUNTIME MESSAGES
E/Kuroba | UNCAUGHT: ------------------------------
E/Kuroba | UNCAUGHT: Android API Level: 24
E/Kuroba | UNCAUGHT: App Version: v4.11.2
E/Kuroba | UNCAUGHT: Development Build: No
E/Kuroba | UNCAUGHT: Phone Model: samsung SM-T813

@Adamantcheese
Copy link
Owner

Nothing I can do about that report, makes no sense how the bitmap was just gone in the middle of a function call, at least from the Android code I'm looking at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual)
Projects
None yet
Development

No branches or pull requests

2 participants