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 219085 - [73cat] IllegalStateException: Attempt to use the fold [code-block] E1 <4251,10271>, desc='{...}', hash=0x214a88, [4252, 10270] {4252, 10270} with invalid fold operation org.netbeans.modules.editor.fold.FoldO
Summary: [73cat] IllegalStateException: Attempt to use the fold [code-block] E1 <4251,...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-26 20:05 UTC by theosib
Modified: 2012-10-02 05:35 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 192791


Attachments
stacktrace (2.08 KB, text/plain)
2012-09-26 20:05 UTC, theosib
Details
stacktrace (2.05 KB, text/plain)
2012-09-26 21:32 UTC, misterm
Details
stacktrace (2.05 KB, text/plain)
2012-09-26 21:35 UTC, misterm
Details
stacktrace (2.05 KB, text/plain)
2012-09-26 21:38 UTC, misterm
Details
stacktrace (1.95 KB, text/plain)
2012-09-26 22:14 UTC, Chiana
Details
stacktrace (1.95 KB, text/plain)
2012-09-26 22:17 UTC, Chiana
Details
stacktrace (1.95 KB, text/plain)
2012-09-26 22:20 UTC, Chiana
Details
stacktrace (2.07 KB, text/plain)
2012-10-01 17:44 UTC, javydreamercsw
Details
stacktrace (2.07 KB, text/plain)
2012-10-02 05:35 UTC, ehsavoie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theosib 2012-09-26 20:05:48 UTC
Build: NetBeans IDE Dev (Build 201209260001)
VM: Java HotSpot(TM) Client VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11
OS: Windows XP

User Comments:
dagguh: Every time I edit a class that has compilation errors, I get this exception.

theosib: Tried to delete some code

dagguh: Ok, I get this almost all the time.
I generated a getter and it appears that it does  not have a fold marker [-] [+]
The rest of methods, that existed when I started editing the class have those markers

theosib: Pasted some code

theosib: Typed a line with { at the end and then pressed return.




Stacktrace: 
java.lang.IllegalStateException: Attempt to use the fold [code-block] E1 <4251,10271>, desc='{...}', hash=0x214a88, [4252, 10270] {4252, 10270} with invalid fold operation org.netbeans.modules.editor.fold.FoldOperationImpl@4a9f5d instead of org.netbeans.modules.editor.fold.FoldOperationImpl@124a234
   at org.netbeans.modules.editor.fold.FoldOperationImpl.checkFoldOperation(FoldOperationImpl.java:242)
   at org.netbeans.modules.editor.fold.FoldOperationImpl.removeFromHierarchy(FoldOperationImpl.java:189)
   at org.netbeans.spi.editor.fold.FoldOperation.removeFromHierarchy(FoldOperation.java:182)
   at org.netbeans.modules.java.editor.fold.JavaElementFoldManager$CommitFolds.run(JavaElementFoldManager.java:372)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1353)
   at org.netbeans.modules.java.editor.fold.JavaElementFoldManager$CommitFolds.run(JavaElementFoldManager.java:347)
Comment 1 theosib 2012-09-26 20:05:51 UTC
Created attachment 124970 [details]
stacktrace
Comment 2 misterm 2012-09-26 21:32:11 UTC
Created attachment 124977 [details]
stacktrace
Comment 3 misterm 2012-09-26 21:35:10 UTC
Created attachment 124978 [details]
stacktrace
Comment 4 misterm 2012-09-26 21:38:10 UTC
Created attachment 124979 [details]
stacktrace
Comment 5 Chiana 2012-09-26 22:14:10 UTC
Created attachment 124980 [details]
stacktrace

Hit enter before last } in a class to be able to enter a new method.
Comment 6 Chiana 2012-09-26 22:17:10 UTC
Created attachment 124981 [details]
stacktrace

Started to type in a new method, started to type "public " and the exception occured when I hit "s" (as I was going to type "static")
Comment 7 Chiana 2012-09-26 22:19:28 UTC
Hmm... This occurs a little too often, a status change is in order I think...
Also note: there is no folded code in the source triggering this error! It is a
POJO!
Comment 8 Chiana 2012-09-26 22:20:11 UTC
Created attachment 124982 [details]
stacktrace

started to type "st" as in static, just after reporting #613796
Comment 9 Svata Dedic 2012-09-27 04:38:38 UTC
Changeset: 5aaa19c1b291
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-09-27 06:38
Message:   Issue #219085 - [73cat] IllegalStateException: Attempt to use the fold [code-block] E1 <4251,10271>, desc='{...}', hash=0x214a88, [4252, 10270] {4252, 10270} with invalid fold operation org.netbeans.modules.editor.fold.FoldO: fixed
FoldInfo must be copied because of backreference to Fold
Comment 10 Quality Engineering 2012-10-01 12:08:54 UTC
Integrated into 'main-golden', will be available in build *201210010929* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5aaa19c1b291
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #219085 - [73cat] IllegalStateException: Attempt to use the fold [code-block] E1 <4251,10271>, desc='{...}', hash=0x214a88, [4252, 10270] {4252, 10270} with invalid fold operation org.netbeans.modules.editor.fold.FoldO: fixed
FoldInfo must be copied because of backreference to Fold
Comment 11 javydreamercsw 2012-10-01 17:44:15 UTC
Created attachment 125169 [details]
stacktrace

Reverting changes from History. It refreshed the diff view after the first reverted change.
Comment 12 ehsavoie 2012-10-02 05:35:15 UTC
Created attachment 125182 [details]
stacktrace