This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268834

Summary: IllegalStateException: Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
Product: java Reporter: javatlacati <javatlacati>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: jockel, ksrini, petrk, theshadow27, wooowre
Priority: P3    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 219579
Bug Depends on:    
Bug Blocks: 271673    
Attachments: stacktrace
stacktrace
stacktrace

Description javatlacati 2016-11-04 15:40:44 UTC
Build: NetBeans IDE Dev (Build 201610040002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.77-b03, Java(TM) SE Runtime Environment, 1.8.0_77-b03
OS: Windows 10

User Comments:
javatlacati: opened Java web project

GUEST: Sadly I cant say what went wrong. I was making a clean and build project when I noticed the error message. I didnt notice anything wrong in the program itself other than the message

GUEST: I did nothing, IDE was open while being AFK and then this error occured.

ksrini: Scrolling

ksrini: Just browsing langtools test sources

petrk: Switched to a tab with search results




Stacktrace: 
java.lang.IllegalStateException: Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
   at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getCompilationUnit(CompilationInfoImpl.java:222)
   at org.netbeans.api.java.source.CompilationInfo.getCompilationUnit(CompilationInfo.java:186)
   at org.netbeans.modules.java.JavaNode$IconTask$SourceIcon$1.run(JavaNode.java:469)
   at org.netbeans.modules.java.JavaNode$IconTask$SourceIcon$1.run(JavaNode.java:465)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:518)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
Comment 1 javatlacati 2016-11-04 15:40:46 UTC
Created attachment 162777 [details]
stacktrace
Comment 2 wooowre 2016-12-04 23:30:08 UTC
Created attachment 163144 [details]
stacktrace

<Please provide a description of the problem or the steps to reproduce>
am working in my code and after netBeans no correct the errors and now it?s not good, i don't speack english
Comment 3 Exceptions Reporter 2017-02-09 15:24:23 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=219579
Comment 4 theshadow27 2017-10-19 20:56:54 UTC
Created attachment 165320 [details]
stacktrace

Opened the same project from iz #271672 and report id 230636 (in transfer)