Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Downloading images sometimes crashes the app #77

Open
Tunous opened this issue Sep 8, 2019 · 1 comment
Open

Downloading images sometimes crashes the app #77

Tunous opened this issue Sep 8, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Tunous
Copy link
Owner

Tunous commented Sep 8, 2019

Error in Dank

java.lang.RuntimeException in MediaAlbumViewerActivity
Can't create handler inside thread Thread[RxCachedThreadScheduler-28,5,main] that has not called Looper.prepare()

View on Bugsnag

Stacktrace

java.lang.RuntimeException: Can't create handler inside thread Thread[RxCachedThreadScheduler-28,5,main] that has not called Looper.prepare()
	at android.os.Handler.<init>(Handler.java:205)
	at android.os.Handler.<init>(Handler.java:118)
	at me.saket.dank.notifs.MediaDownloadService.lambda$null$12$MediaDownloadService(MediaDownloadService.java:502)
	at me.saket.dank.notifs.-$$Lambda$MediaDownloadService$H-1UbqGtQJepc-ZJFswNvk5NvYI.cancel(Unknown Source:4)
	at io.reactivex.internal.disposables.CancellableDisposable.dispose(CancellableDisposable.java:49)
	at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
	at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.dispose(ObservableCreate.java:122)
	at io.reactivex.internal.operators.observable.ObservableUnsubscribeOn$UnsubscribeObserver$DisposeTask.run(ObservableUnsubscribeOn.java:95)
	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)

View full stacktrace

Created automatically via Bugsnag

@Tunous
Copy link
Owner Author

Tunous commented Sep 8, 2019

Caused by Glide clear which is called when downloading images not always running from main thread.

@Tunous Tunous added the bug Something isn't working label Sep 8, 2019
@Tunous Tunous changed the title java.lang.RuntimeException in MediaAlbumViewerActivity Downloading images sometimes crashes the app Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant