Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

[Bug]: Unexpected crash when using a for loop code snippet #1380

@JohnOlowe

Description

@JohnOlowe

What happened?

I tried out the for loop code snippet. When I tried to edit the variable from the default "I", the app crashed.

What's the expected behavior?

The app was meant run fine with the for loop snippet, not crash

What version of AndroidIDE you're using?

v2.5.3 (debug builds)

Relevant log output

AndroidIDE Crash Report
Version : v2.5.3-beta (253)
CI Build : true
Branch : dev
Commit : 8901e2b56
Variant : armeabi-v7a (debug)
SDK Version : 31
Supported ABIs : [armeabi-v7a, armeabi]
Manufacturer : ITEL
Device : itelA662L

Stacktrace:
java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at java.lang.String.charAt(Native Method)
	at com.itsaky.androidide.editor.ui.IDEEditor.checkForSignatureHelp(IDEEditor.kt:962)
	at com.itsaky.androidide.editor.ui.IDEEditor.access$checkForSignatureHelp(IDEEditor.kt:107)
	at com.itsaky.androidide.editor.ui.IDEEditor$initEditor$2$1.invokeSuspend(IDEEditor.kt:753)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Duplicate issues

  • This issue has not been reported yet.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions