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

Crash on start or in random time #1182

Closed
SrgkS opened this issue Dec 22, 2021 · 10 comments
Closed

Crash on start or in random time #1182

SrgkS opened this issue Dec 22, 2021 · 10 comments
Labels
Projects

Comments

@SrgkS
Copy link

SrgkS commented Dec 22, 2021

Describe the bug
crash and close randomly and often (from version 3.0.3!)

To Reproduce
just start app

KeePassDX :

  • Version: from 3.0.3 - 3.0.4
  • Build: free
  • Language: ru

Android:

  • Device: xiomi mi5
  • Version: 8
    ...show me bug report:
    kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[Dispatchers.IO, Continuation at com.kunzisoft.keepass.app.database.IOActionTask$execute$1$1$asyncResult$1.invokeSuspend(IOActionTask.kt)@a393590]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:144) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: java.lang.StackOverflowError: stack size 1037KB at kotlinx.coroutines.android.HandlerContext.toString(HandlerDispatcher.kt:152) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuilder.append(StringBuilder.java:132) at kotlinx.coroutines.internal.DispatchedContinuation.toString(DispatchedContinuation.kt:251) at kotlinx.coroutines.DebugStringsKt.toDebugString(DebugStrings.kt:16) at kotlinx.coroutines.CompletedContinuation.toString(Unknown Source:22) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuilder.append(StringBuilder.java:132) at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuilder.append(StringBuilder.java:132) at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuilder.append(StringBuilder.java:132) at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:320) at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:295) at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:853) at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:825) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ... 4 more
@SrgkS SrgkS added the bug label Dec 22, 2021
@J-Jamet
Copy link
Member

J-Jamet commented Dec 22, 2021

I had a Google Play user report on this problem but was never able to reproduce it.
I have several theories:

But the main problem is that I can't reproduce it, so I updated the Kotlin libraries and plugins for the next build but I don't even know if that will really solve the issue.

@J-Jamet
Copy link
Member

J-Jamet commented Dec 22, 2021

Maybe the bug is related to #509 (comment) because the definition of a complex XML drawable does not work on Android 8 and loops the internal image parser.

@J-Jamet
Copy link
Member

J-Jamet commented Dec 22, 2021

I also removed the request for write permissions, which is normally unnecessary with SAF. I will create a test version and upload it here and you will tell me if the crashes happen again.

@J-Jamet J-Jamet added this to To do in 3.1.0 via automation Dec 22, 2021
@J-Jamet
Copy link
Member

J-Jamet commented Dec 22, 2021

KeePassDX_test_202122171417.zip
Can you tell me if it works with this test build?

@J-Jamet J-Jamet moved this from To do to In progress in 3.1.0 Dec 22, 2021
@SrgkS
Copy link
Author

SrgkS commented Dec 23, 2021

The databases are not opened (probably due to unavailability of write-permission).
Crashes continue randomly, trace log:
`kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[Dispatchers.IO, Continuation at com.kunzisoft.keepass.app.database.IOActionTask$execute$1$1$asyncResult$1.invokeSuspend(IOActionTask.kt)@a95cc89]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:144)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.StackOverflowError: stack size 1037KB
at kotlinx.coroutines.MainCoroutineDispatcher.toStringInternalImpl(MainCoroutineDispatcher.kt:61)
at kotlinx.coroutines.android.HandlerContext.toString(HandlerDispatcher.kt:152)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at kotlinx.coroutines.internal.DispatchedContinuation.toString(DispatchedContinuation.kt:251)
at kotlinx.coroutines.DebugStringsKt.toDebugString(DebugStrings.kt:16)
at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at kotlinx.coroutines.ResumeAwaitOnCompletion.toString(JobSupport.kt:1414)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at kotlinx.coroutines.DisposeOnCancel.toString(CancellableContinuation.kt:385)

....at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:320)
at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:295)
at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:853)
at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:825)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
... 4 more`

@SrgkS
Copy link
Author

SrgkS commented Dec 23, 2021

Version 3.0.2 works fine, what changed in 3.0.3 (3.0.4)?

@J-Jamet
Copy link
Member

J-Jamet commented Dec 27, 2021

git diff 3.0.2 3.0.3

@J-Jamet
Copy link
Member

J-Jamet commented Jan 4, 2022

The databases are not opened (probably due to unavailability of write-permission).

Permissions don't normally change anything, so the fact that there are no permission shouldn't prevent opening.

@J-Jamet J-Jamet moved this from In progress to To do in 3.1.0 Jan 13, 2022
@J-Jamet J-Jamet moved this from To do to In progress in 3.1.0 Jan 18, 2022
@J-Jamet J-Jamet moved this from In progress to Done in 3.1.0 Jan 18, 2022
@J-Jamet
Copy link
Member

J-Jamet commented Jan 18, 2022

Can you tell me if it's fixed with version 3.1? https://github.com/Kunzisoft/KeePassDX/releases/tag/3.1.0

@J-Jamet
Copy link
Member

J-Jamet commented Jan 21, 2022

I have no more crash feedback in the play store console so I guess it's resolved for you.

@J-Jamet J-Jamet closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
3.1.0
Done
Development

No branches or pull requests

2 participants