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: M10 I was editing Java code inside the Java editor when I suddenly found myself unable to use any of the error keys and delete keys to make edits. Hitting those keys causes no response whatsoever even though I could continue typing characters. So, I shut down the IDE and restarted it. In the middle of loading modules, before the IDE frame even opens, the NetBeans logo box disappears, and in its place is a small dialogue box that is titled "Unexpected Exception". It says, "A java.lang.AssertionError exception has occurred. Please report this at..."
Created attachment 45808 [details] Attaching messages.log
This has to be a P1 now. All subsequent attempts to restart NetBeans lead to the aforementioned "Unexpected Exception" dialog box. WTF????
Startup aborts upon encountering the exception, which appears when "Done loading modules" appears in the logo. Clicking "Close" simply closes the exception window and then nothing. Opening the Windows Task Manager > Processes tab shows a java.exe running, taking up 135,588 K of memory and 60 GDI objects.
In my original description, I mistakenly wrote "error keys" when I actually meant to write "arrow keys". None of the arrow keys worked.
Reassigning to "debugger" for evaluation...
It's some undescribed AssertionError comming from javac. Moving to java for evaluation... java.lang.AssertionError at com.sun.tools.javac.api.JavacTaskImpl.parse(JavacTaskImpl.java:231) at org.netbeans.modules.java.source.TreeLoader.loadTreeFor(TreeLoader.java:70)
Honzo, can you dispatch it?
Wade Chandler made the suggestion that I delete var/cache directory under the netbeans userdir. Doing so does allow NB to restart. However, the same error returns upon the next restart unless I once again delete the var/cache directory. This is the case now at every restart.
Created attachment 45836 [details] Attaching messages.log
Also, not only would I need to delete the var/cache folder, I would also need to kill the orphaned java.exe process via Windows Task Manager > Processes tab.
Eversince this incident, I'm noticing that certain functions stop working in NB. So far, I'm observing the following: 1. Auto indentation not working at all; I need to manually indent and format every line. 2. Errors are not being displayed when I make syntax or punctuation errors in the Java editor.
While I cannot reproduce and while exact details are still a bit unclear to me, I think that the principal problem is that EditorContextImpl.getFieldLineNumber (as well as getMethodLineNumber) does not properly call toPhase inside the runUserActionTask. Reporter, I will attach corrected version of the corresponding module (org-netbeans-modules-debugger-jpda-projects.jar). Could you please test it? Backup the original from ${NETBEANS_INSTALL_DIR}/java1/modules/org-netbeans-modules-debugger-jpda-projects.jar, and replace it by the attached version and try to reproduce the problem. Thanks.
Created attachment 45843 [details] Patched module.
The patch seems to be working. Also, the indentation problem is not reappearing. Thanks. I'm wondering whether the breakage might have occurred when I did a hard shutdown (via Windows Task Manager). I think what happened was that I forgot that I had been running the remote debugger, and I proceeded to run an ant target from the Navigator window. Seeing the build process continued to be queued, I then realized that the remote debugger was still running. I stopped the debugger, but the queued ant build would remain queued. Now that I was stuck, I could only do the hard shutdown. The next startup of the IDE seemed to be fine, though, as I continued to work with no apparent problems until I found the arrow keys and delete key non-functional at all (this has happened before with NB 6--see issue 108563). Then I soft-shutdown the IDE. The assertion error started to appeared after that.
By the way, the queued ant process was stuck; it would not run after I killed the debugger and I could not cancel it out of the queue. I tried. I've experienced the same problem with many queued processes in NetBeans. My project is a web project with existing ant script, using JDK 1.4.2 and J2EE 1.3 compliant.
Ok, thanks. I have committed the changes corresponding to the binary patch that I have attached. I do not think this was caused by killing NetBeans or any other process, but rather some combination of field/method breakpoints and opened/not-opened files in the editor. Please file separate issues for the problems with canceling the processes as necessary. Thanks. BTW: There is also issue in Java infrastructure (issue #104612), which, when fixed, should make consequences of forgotten CompilationController.toPhase less fatal. Checking in EditorContextImpl.java; /cvs/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java,v <-- EditorContextImpl.java new revision: 1.29; previous revision: 1.28 done
Fixed.
Verified