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

[Bug]: App Crash Due to Typing Comma Symbol in Method Parameter While Modifying Java Class #1447

Closed
2 tasks done
sb-codz opened this issue Nov 10, 2023 · 0 comments
Closed
2 tasks done
Labels
bug Something isn't working
Milestone

Comments

@sb-codz
Copy link

sb-codz commented Nov 10, 2023

What happened?

When I was modifying the Java class, I typed the comma symbol in the parameter of a method, and the app crashed immediately.

What's the expected behavior?

Expect dont crash when typing.

What version of AndroidIDE you're using?

v2.6.0 (debug builds)

Relevant log output

AndroidIDE Crash Report
Version : v2.6.0-beta (260)
CI Build : true
Branch : dev
Commit : b13e3d041
Variant : arm64-v8a (release)
SDK Version : 28
Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi]
Manufacturer : Xiaomi
Device : Redmi6Pro

Stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'openjdk.tools.javac.util.Name openjdk.tools.javac.util.Names.fromString(java.lang.String)' on a null object reference
	at openjdk.tools.javac.parser.JavaTokenizer.checkIdent(Unknown Source:8)
	at openjdk.tools.javac.parser.JavaTokenizer.scanIdent(Unknown Source:78)
	at openjdk.tools.javac.parser.JavaTokenizer.readToken(Unknown Source:136)
	at openjdk.tools.javac.parser.Scanner.nextToken(Unknown Source:24)
	at openjdk.tools.javac.parser.JavacParser.nextToken(Unknown Source:2)
	at openjdk.tools.javac.parser.JavacParser.<init>(SourceFile:2)
	at com.itsaky.androidide.javac.services.NBParserFactory$NBJavacParser.<init>(Unknown Source:0)
	at com.itsaky.androidide.javac.services.NBParserFactory.newParser(Unknown Source:39)
	at openjdk.tools.javac.main.JavaCompiler.parse(SourceFile:3)
	at com.itsaky.androidide.lsp.java.compiler.JavaCompilerImpl.parse(Unknown Source:538)
	at openjdk.tools.javac.main.JavaCompiler.parse(SourceFile:2)
	at openjdk.tools.javac.main.JavaCompiler.parseFiles(SourceFile:2)
	at openjdk.tools.javac.main.JavaCompiler.parseFiles(SourceFile:1)
	at openjdk.tools.javac.api.JavacTaskImpl.parseInternal(Unknown Source:12)
	at openjdk.tools.javac.api.JavacTaskImpl.$r8$lambda$NyapR5uJzfIp_YTm0DdwUsZ0idA(Unknown Source:0)
	at openjdk.tools.javac.api.JavacTaskImpl$$ExternalSyntheticLambda0.call(Unknown Source:13)
	at openjdk.tools.javac.api.JavacTaskImpl.invocationHelper(Unknown Source:13)
 Caused by: java.lang.IllegalStateException: java.lang.NullPointerException: Attempt to invoke virtual method 'openjdk.tools.javac.util.Name openjdk.tools.javac.util.Names.fromString(java.lang.String)' on a null object reference
	at openjdk.tools.javac.api.JavacTaskImpl.parse(SourceFile:1)
	at com.sun.jna.Native$1.process(Unknown Source:12)
	at com.itsaky.androidide.lsp.java.compiler.CompileBatch.<init>(Unknown Source:319)
 Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: java.lang.NullPointerException: Attempt to invoke virtual method 'openjdk.tools.javac.util.Name openjdk.tools.javac.util.Names.fromString(java.lang.String)' on a null object reference
	at com.itsaky.androidide.lsp.java.compiler.CompileBatch.<init>(Unknown Source:329)
	at com.itsaky.androidide.lsp.java.compiler.JavaCompilerService.performCompilation(Unknown Source:10)
	at com.itsaky.androidide.lsp.java.compiler.JavaCompilerService.recompile(Unknown Source:12)
	at androidx.work.impl.WorkerWrapper$$ExternalSyntheticLambda0.run(Unknown Source:247)
	at com.itsaky.androidide.lsp.java.compiler.SynchronizedTask.post(Unknown Source:11)
	at com.itsaky.androidide.lsp.java.compiler.CompilerProvider.compile(Unknown Source:50)
	at com.itsaky.androidide.lsp.java.JavaLanguageServer.signatureHelp(Unknown Source:32)
	at com.itsaky.androidide.editor.ui.IDEEditor$signatureHelp$1.invokeSuspend(Unknown Source:62)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
	at kotlinx.coroutines.DispatchedTask.run(Unknown Source:109)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:93)

Duplicate issues

  • This issue has not been reported yet.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@sb-codz sb-codz added the bug Something isn't working label Nov 10, 2023
@itsaky itsaky added this to the v2.6.2-beta milestone Nov 16, 2023
@itsaky itsaky modified the milestones: v2.6.2-beta, v2.7.0-beta Dec 15, 2023
@itsaky itsaky closed this as completed in 4622634 Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants