You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
AndroidIDE crash report
Manufacturer: samsung
Device: SM-M526B
ABI: arm64-v8a
SDK version: 33
App version: v2.4.1-beta.internal.1+branch.dev.commit.402c3f6.timestamp.20230331184636 (241)
Stacktrace:
java.lang.StringIndexOutOfBoundsException: Column 48 out of bounds. line: 76 , column count (line separator included):10
at io.github.rosemoe.sora.text.Content.checkLineAndColumn(Content.java:1059)
at io.github.rosemoe.sora.text.Content.insertInternal(Content.java:357)
at io.github.rosemoe.sora.text.Content.insert(Content.java:350)
at com.itsaky.androidide.lsp.IDELanguageClientImpl.lambda$editInEditor$2(IDELanguageClientImpl.java:268)
at com.itsaky.androidide.lsp.IDELanguageClientImpl$$ExternalSyntheticLambda2.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Duplicate issues
This issue has not been reported yet.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
When the 'keepComments' flag is set, the compiler uses JavadocTokenizer for tokenizing the source code. While creating the LineMap instance, the JavadocTokenizer sets the 'expandTabs' flag to true which expands '\t' characters to spaces. This is needed while generating HTML pages for the Javadoc. However, if the tabs are expanded to spaces, then getPosition(...) and getColumnNumber(...) methods in the LineMap class return indices which cannot be directly used to insert text in the source code. This results in StringIndexOutOfBoundsException when trying to insert text in the editor (#1127, and probably #916 as well).
This commit adds the 'keepCommentsOverride' option to the compiler which is used by NBParserFactory to override the 'keepComments' flag. The CompileBatch class sets this option to 'ignore' which ignores the 'keepComments' flag so that JavadocTokenizer is not used for tokenization.
When the 'keepComments' flag is set, the compiler uses JavadocTokenizer for tokenizing the source code. While creating the LineMap instance, the JavadocTokenizer sets the 'expandTabs' flag to true which expands '\t' characters to spaces. This is needed while generating HTML pages for the Javadoc. However, if the tabs are expanded to spaces, then getPosition(...) and getColumnNumber(...) methods in the LineMap class return indices which cannot be directly used to insert text in the source code. This results in StringIndexOutOfBoundsException when trying to insert text in the editor (#1127, and probably #916 as well).
This commit adds the 'keepCommentsOverride' option to the compiler which is used by NBParserFactory to override the 'keepComments' flag. The CompileBatch class sets this option to 'ignore' which ignores the 'keepComments' flag so that JavadocTokenizer is not used for tokenization.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What happened?
Chased on implementing abstract methods
What's the expected behavior?
No crash
What version of AndroidIDE you're using?
v2.4.0 (debug builds)
Relevant log output
Duplicate issues
Code of Conduct
The text was updated successfully, but these errors were encountered: