Open gabschne opened 3 years ago
@gabschne
I am not 100% sure. The error message seems indicate that the JSON file that stores the collection of radio stations is broken. /Android/data/org.y20k.transistor/files/Collection/collection.json
You may need to remove/rename that file to get Transistor to start correctly.
I am super sorry that your stations are lost. I will try to find out what happened here. I you know of any other steps to recreate the problem, please let me know. I will publish a new version of Transistor today. That one fixes another serious bug, but that seems to be unrelated.
Oh I'm sorry, I forgot to mention in the bug description, that I've already tried to delete or reset all of the data with the help of the the standard Android app settings, because I thought it would help, too. But I also just double checked and there is no collection.json
exisiting at all. (But the app still crashes.)
Don't worry about the deleted radio stations. To be honest, I didn't check the file before manually deleting all the app data, so it could be that the radio stations were not deleted, but just not displayed before the app crashed.
I'm afraid, there're really no steps I could provide to reproduce the problem, it just started to happen after the update to v. 4.0.11 so it might be a regression or something.
Edit: I just downgraded to v. 4.0.10 and the app works again.
Hi @gabschne
Thanks for providing more information. I am really puzzled, because I am not able to get the crash on any of my devices. And your description to reproduce it is super simple:
I wonder if we oversaw something here.
Is there maybe a debug version of the app available that outputs detailed logs or that uses (better) source maps for the stack trace? The one I posted in my description looks a bit obfuscated to me.
Here is a test APK where obfuscation and minifying is disabled.
It would be great, if you post your findings!! 👍
Thank you!
Here's the output from logcat:
--------- beginning of crash 03-19 18:03:21.912 2615 2654 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-2 03-19 18:03:21.912 2615 2654 E AndroidRuntime: Process: org.y20k.transistor, PID: 2615 03-19 18:03:21.912 2615 2654 E AndroidRuntime: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[Dispatchers.Default, Continuation at org.y20k.transistor.collection.CollectionViewModel$loadCollection$1$deferred$1.invokeSuspend(CollectionViewModel.kt:91)@9f64a7]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:144) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: Caused by: java.lang.StackOverflowError: stack size 1037KB 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.MainCoroutineDispatcher.toStringInternalImpl(MainCoroutineDispatcher.kt:61) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.android.HandlerContext.toString(HandlerDispatcher.kt:152) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.internal.DispatchedContinuation.toString(DispatchedContinuation.kt:251) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DebugStringsKt.toDebugString(DebugStrings.kt:16) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DisposeOnCancel.toString(CancellableContinuation.kt:385) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CompletedContinuation.toString(Unknown Source:25) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DisposeOnCancel.toString(CancellableContinuation.kt:385) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CompletedContinuation.toString(Unknown Source:25) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DisposeOnCancel.toString(CancellableContinuation.kt:385) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CompletedContinuation.toString(Unknown Source:25) 03-19 18:03:21.912 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) [...] 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at java.lang.String.valueOf(String.java:2827) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at java.lang.StringBuilder.append(StringBuilder.java:132) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:320) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:853) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111) 03-19 18:03:21.928 2615 2654 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
This happens more or less right before the crash:
03-19 18:03:21.827 2615 2615 W transistor_DateTimeHelper: Unable to parse. Trying an alternative Date format. java.text.ParseException: Unparseable date: "" 03-19 18:03:21.827 2615 2615 W transistor_DateTimeHelper: Unable to parse. Trying an alternative Date format. java.text.ParseException: Unparseable date: "" 03-19 18:03:21.828 2615 2615 E transistor_DateTimeHelper: Unable to parse. Returning a default date. java.text.ParseException: Unparseable date: ""
But this looks like caught and handled to me, if I'm interpreting the log correctly.
I must say, that I am still a bit lost here, even after reading the new Logcat.
I pushed some minor changes to the app yesterday and today. Both could probably be related to the error. But I was just guessing and searching the internet for related errors.
I compiled a fresh test apk. Does the app still crash on your device?
Note: This is again a normal apk with obfuscation and minifying activated - just like a normal release would be.
Yeah, I had already looked into the corresponding file earlier, and as you had already written or the stack trace says, the collection is read in the reported line. However, according to git blame, nothing big seems to have changed between 4.0.10 and 4.0.11 at this section of the code. Very strange.
But some good news: The new version does NOT crash anymore, so one of the minor changes seems to have fixed the problem. If there were several and you are interested in which one exactly or debugging it, feel free to upload different versions of the app and I'll test them one by one.
Describe the bug After the update to version 4.0.11 the app crashes 99% of the time on start up. (One time the app actually managed to start without crashing directly.) Also all of my saved radio stations were deleted.
To Reproduce Steps to reproduce the behavior:
Expected behavior The app shouldn't crash after the start.
Screenshots -
Device:
Additional context Here is the (truncated) stack trace: