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.
[NB 3.3.1 RC1] Select any field in gurded block. (E.g. examples.advanced.MemoryView.jPanel1) Invoke Property Sheet. Go to modifiers, click [...] -> Property Editor: Modifiers is opened. Set static and Push OK.
Passing to Jesse. Stacktrace will be attached later - IZ is tooooo slooow.
Created attachment 4210 [details] Thread dump
Looks like NbErrorManager does not check for exceptions which include themselves. Probably it should, though that in itself is not P1; only the actual behavior. My guess is that something the Java module does is causing this, but I have to investigate to see. I don't like the way rethrowException is written - the first call to copyAnnotation is gratuitous since SourceException.IO already includes the nested trace, and the second should be changed to annotate - but I don't see anything there which would cause this bug. Could also be propertysheet code, etc.
> Probably it should, though that in itself is not P1; only > the actual behavior. this is bad actual behavior. We should guard ourselves from faulty module code. NbErrorManager is meant to be used in erroneous situations. If all is nice and good there would be much less reasons to use the error manager.
I have a patch. 1. Improves NbErrorManager to detect cyclic or redundant stack trace annotations and print a message to log file and break the cycle. 2. There was a serious bug in Java Hierarchy code. It tried to use ErrorManager to annotate an InvocationTargetException. Not only is this useless - the exception itself includes a nested throwable, no need to add an annotation - but the code was written backwards and actually wound up throwing a ClassCastException, which managed to trigger the cyclic case somehow. 3. There was a minor bug in property sheet code - again no need to annotate ITE's, that will just cause redundant info to be printed to the log file. The patch solves all three problems. I will also file a separate patch for the java module (SourceText) which is probably not required for this bug and can go in for 3.4.
Created attachment 4232 [details] Proposed patch
Jesse, the diff look fine to me, please commit it to trunk, mark this one as fixed, set the 3.3.1_CANDIDATE keyword and wait for approvals to commit it to release33. [You have my approval.] Thanks a lot.
Fixed in the trunk. I would still appreciate some comment from Svata re. ElementNode, and from one of the prop sheet guys re. PropertyPanel (all three worked on the patched method at one time or another according to cvs annotate). committed * Up-To-Date 1.30 core/src/org/netbeans/core/NbErrorManager.java committed * Up-To-Date 1.91 openide/src/org/openide/explorer/propertysheet/PropertyPanel.java committed * Up-To-Date 1.44 openide/src/org/openide/src/nodes/ElementNode.java Note that I have tested the fix only against trunk code, I have not specifically tried it against release33 branch code yet in case there is any significant divergence already (though of course I would do so before committing to that branch). The bug is easy to reproduce as described; without the patch, the IDE freezes with 100% CPU and fills up the log file; with it, a nice Information dialog "Attempt to insert into guarded block..." is shown, the OK on the property editor dialog is cancelled (dialog stays open), some stuff is put into ide.log with details, and that is all.
PropertyPanel change seems fine from my point of view.
Checked and tested in the trunk continuous build # 20020117-1417. No problems found - Verified in the trunk.
Approved.
Approved by QA for 3.3.1.
Approved
In for 3.3.1, thanks everyone. committed * Up-To-Date 1.27.2.2 core/src/org/netbeans/core/NbErrorManager.java committed * Up-To-Date 1.89.2.4 openide/src/org/openide/explorer/propertysheet/PropertyPanel.java committed * Up-To-Date 1.42.12.2 openide/src/org/openide/src/nodes/ElementNode.java
Verified in build #200201180727.
Resolved for 3.4.x or earlier, no new info since then -> closing.