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.
Build: NetBeans IDE Dev (Build 201103140400) VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07 OS: Windows XP User Comments: alied: I pressed nter, then I pressed Ctrl+Z a couple times (i didn't actually meant to press Enter) Stacktrace: java.lang.AssertionError: docViewEndOffset=2571 < endOffset=4882 at org.netbeans.modules.editor.lib2.view.ViewBuilder.<init>(ViewBuilder.java:153) at org.netbeans.modules.editor.lib2.view.ViewUpdates.buildViews(ViewUpdates.java:175) at org.netbeans.modules.editor.lib2.view.ViewUpdates.removeUpdate(ViewUpdates.java:476) at sun.reflect.GeneratedMethodAccessor227.invoke(GeneratedMethodAccessor227.java:0) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
Created attachment 107023 [details] stacktrace
Thanks for the report. Question: do you have code folding turned on by default or do you collapse folds during your work? I finally realized that the problem can be a view hierarchy constructed for a fold preview not the "main" view hierarchy for a document. The tooltip preview constructs an editor pane with the same document as the edited one and a client property that demarcates fold boundaries for a fold preview. Possible ongoing document modifications would get handled by that view hierarchy. But due to operation over just a part of a document the view updates are more complex and as my just added tests have shown there are certain problems in such case similar to the reported exceptions. I'll try to both improve stability of view updates for a document portion operation and also possibly deactivate the view hierarchy immediately after tooltip closing. Btw this all would also correspond to the randomness of the exception since the liveness of the tooltip pane (after it becomes invisible) is in fact determined by the garbage collector operation. Marking as P1 since this must be resolved into 7.0.
Yes, actually I automatically fold all but functions. besides, also functions not directly related to my current work get folded too. These type or error mostly happen while editing and I (temporaryly)break the sintax (hence the creation of a tooltip, a badge, etc.)
Created attachment 107085 [details] stacktrace anytime I change something in the GUI builder I get this exception
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=177485
I have implemented a fix that disables tooltip's view hierarchy updates once the tooltip gets invisible. Rest of the problem will be fixed in terms of issue 196814 but it's non-fatal for the current usage. A thorough fix would be complex and it could destabilize the code which is undesirable at this time prior 7.0 release. http://hg.netbeans.org/jet-main/rev/7e07e455c219
Integrated into 'main-golden', will be available in build *201103180400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7e07e455c219 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #196734 - AssertionError: docViewEndOffset=2571 < endOffset=4882 - View Hierarchy stops listening on document updates once fold tooltip preview gets closed.
alied, could you please test the 201103180400 build if it solves the problem? Thanks. Jara, if the last patch would fix the problem, I would like to transplant it to release70 on Monday. Is that OK with you? Thanks.
Since I don't have reproducible testcase I am not able to verify. If the reporter verifies the fix then I agree with integration to 7.0. alied, could you please verify that the issue is not reproducible in the build 201103180400 of the trunk? Thanks.
Still happening, but takes longer to biegin, however, once it hapens, keeps happening frequently. Also the Exception reporter is not working. It just shows the outer frame and nothing else(I guess this should be a new issue), not blocking and closes when you click on the X. I attach some logs. Product Version: NetBeans IDE Dev (Build 201103180400) Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b04 System: Windows XP version 5.1 running on x86; Cp1252; es_ES (nb)
:( I thought I've finally eliminated it. Anyway, alied, thanks for testing. Please attach the logs. In this stage (before FCS) I will attempt to recreate the view hierarchy completely once the particular exception gets thrown (and consume the exception silently).
alied, could you please attach the logs? The assertion for which the issue is entered java.lang.AssertionError: docViewEndOffset=2571 < endOffset=4882 org.netbeans.modules.editor.lib2.view.ViewBuilder.<init>(ViewBuilder.java:153) is no longer present in the code so unless you provide the logs I would have to close the issue as fixed. I'm wondering whether to integrate the fix into release70. You said that the issue takes longer to happen (how much approximately?) so probably it makes sense to integrate it, right?
IMHO it's desirable to port the fix into release70 since it can eliminate the cases caused by stale tooltip.
Integrated into release70: 7e07e455c219 transplanted as eaca59129d5c
*** Bug 196869 has been marked as a duplicate of this bug. ***
*** Bug 197056 has been marked as a duplicate of this bug. ***
No regression found so marking this issue as Verified.