question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ADVANCED mode java.lang.IllegalStateException

See original GitHub issue

Version: v20220502 I use closure-compiler in ADVANCED mode and get java.lang.IllegalStateException

0 error(s), 223 warning(s), 60.6% typed java.lang.IllegalStateException at com.google.common.base.Preconditions.checkState(Preconditions.java:486) at com.google.javascript.rhino.Node.getOnlyChild(Node.java:563) at com.google.javascript.jscomp.NodeUtil.getRValueOfLValue(NodeUtil.java:5190) at com.google.javascript.jscomp.PureFunctionIdentifier.populateFunctionDefinitions(PureFunctionIdentifier.java:423) at java.util.Map.forEach(Map.java:661) at com.google.javascript.jscomp.PureFunctionIdentifier.populateDatastructuresForAnalysisTraversal(PureFunctionIdentifier.java:399) at com.google.javascript.jscomp.PureFunctionIdentifier.process(PureFunctionIdentifier.java:157) at com.google.javascript.jscomp.OptimizeCalls.process(OptimizeCalls.java:124) at com.google.javascript.jscomp.PureFunctionIdentifier$Driver.process(PureFunctionIdentifier.java:1364) at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:267) at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:186) at com.google.javascript.jscomp.Compiler.performTranspilationAndOptimizations(Compiler.java:2572) at com.google.javascript.jscomp.Compiler.lambda$stage2Passes$5(Compiler.java:936) at com.google.javascript.jscomp.CompilerExecutor.lambda$runInCompilerThread$0(CompilerExecutor.java:101) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang.Thread.run(Thread.java:829) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:597) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:194)

Have no idea how to debug this problem and is there any problems in my code (12000 lines of code) I will be grateful for your help

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jtarriocommented, May 20, 2022

I encountered the same error and managed to reduce it to this:

class Data {
  dt;
  constructor(data) {
    this.dt = data;
  }
  value() {
    return this.dt;
  }
}

let j = new Data(3);
console.log(j.value());

The culprit seems to be the uninitialized instance field declaration and the fact that it’s accessed inside the value() function.

If I remove the field or initialize it to undefined or remove the access in value(), the error goes away.

1reaction
ribrdbcommented, May 17, 2022

FYI I used https://github.com/wala/jsdelta to find a reduced version of my crash. It was very fast and simplified it from 500k to only a few lines.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix The IllegalStateException in Java - Rollbar
An IllegalStateException is a runtime exception in Java that is thrown to indicate that a method has been invoked at the wrong time....
Read more >
java.lang.IllegalStateException: Activity has been destroyed ...
No. My VideoPlayerActivity can rotate according to device orientation. If I start VideoPlayerActivity in portrait mode. It's ok. But If I start ...
Read more >
java.lang.IllegalStateException: endPosTable already set ...
I trying to compile the latest android source code and I am using the most current jdk available (jdk-8u5-linux-x64.gz) and very late in...
Read more >
EAP6 throws java.lang.IllegalStateException while starting ...
EAP6 throws java.lang.IllegalStateException while starting JBoss using CLI in Domain Mode. Solution Unverified - Updated July 24 2014 at ...
Read more >
Java.lang.illegalstateexception - MuleSoft Help Center
Hi. Im Getiing Java.lang.illegalstateexception and java class not found error. after the completion of execution im getting this.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found