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 226755 - IllegalArgumentException: Not in correct Phase. Required: Phase.RESOLVED, got: Phase.ELEMENTS_RESOLVED
Summary: IllegalArgumentException: Not in correct Phase. Required: Phase.RESOLVED, got...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-27 07:59 UTC by Chiana
Modified: 2013-03-01 02:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199087


Attachments
stacktrace (11.82 KB, text/plain)
2013-02-27 07:59 UTC, Chiana
Details
Showing exception and dialog about hint. (179.76 KB, image/jpeg)
2013-02-27 08:03 UTC, Chiana
Details
stacktrace (11.82 KB, text/plain)
2013-02-27 08:05 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2013-02-27 07:59:50 UTC
Build: NetBeans IDE Dev (Build 201302252300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20
OS: Windows 7

User Comments:
Chiana: Clicked on a hint to insert an @Override, this took some time for the system to figure out and also there was a small dialog saying "Length hint" (or similar) popping...




Stacktrace: 
java.lang.IllegalArgumentException: Not in correct Phase. Required: Phase.RESOLVED, got: Phase.ELEMENTS_RESOLVED
   at org.netbeans.api.java.source.TreeUtilities.getBreakContinueTarget(TreeUtilities.java:765)
   at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitBreak(NPECheck.java:771)
   at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitBreak(NPECheck.java:273)
   at com.sun.tools.javac.tree.JCTree$JCBreak.accept(JCTree.java:1324)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
   at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:94)
Comment 1 Chiana 2013-02-27 07:59:51 UTC
Created attachment 131939 [details]
stacktrace
Comment 2 Chiana 2013-02-27 08:03:43 UTC
Created attachment 131940 [details]
Showing exception and dialog about hint.

Tried clicking again and took a screendump of the result, worth noting is that after a while the "normal" hint popped up (the one that should have) but only after about 30 seconds.
Comment 3 Chiana 2013-02-27 08:05:14 UTC
Created attachment 131941 [details]
stacktrace

Clicked on the hint again after report #661413 (bug #226755). This is a SEVERE REGRESSION
Comment 4 Jan Lahoda 2013-02-27 12:27:23 UTC
Given the extremely low detail on how to reproduce, and extremely high priority, this is the only option I see:
http://hg.netbeans.org/jet-main/rev/7300fec84143
Comment 5 Chiana 2013-02-27 13:25:54 UTC
I agree, it seems this can only occur when source is invalid, it seems also it does only occur when you "hurry" to press the hint, if it goes something like 20-30 seconds from the change until you press the hint it wont occur.
Comment 6 Jan Lahoda 2013-02-27 13:43:18 UTC
Sorry, but it is unclear to me on what we are agreeing - I am pretty sure there is an underlying bug, that is not fixed. But given the only thing I got so far is an exception report (that does not even include full messages.log), with priority set to P1, I see no way to fix the actual root cause, and I am only fixing the symptoms.
Comment 7 Chiana 2013-02-27 14:07:55 UTC
Yes, that's what I agreed to B-)

And also I'm not entirely sure there is a "underlaying bug", it might (and probable is) caused by the same problem that causes #225686 & #226568.
Not saying it's a duplicate, but my guess is that they are related since they all appeared at approx the same time...
Comment 8 Quality Engineering 2013-03-01 02:01:46 UTC
Integrated into 'main-golden', will be available in build *201302282300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7300fec84143
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #226755: prevent running of hints refresh when the source cannot be pushed into the resolved state