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.
While typing the code, suddenly AIOOBE was thrown for no apparent reason. NB IDE stopped responding afterwards and I had to kill the process manually. IMHO this is P1 because NB stopped responding and I lost my changes in the edited file.
Created attachment 34017 [details] NB log file
bug of draw engine? reassigning to editor
I have searched both our and JDK bug databases but did not find any similar problem. Do you have any idea how to reproduce the problem? Was that a specific source that you could attach to the issue etc. ? Thanks in advance.
I do not have any idea how to reproduce the problem in a deterministic way. It however happened again (on a different source file, with new NB userdir). I am attaching the log file again.
Created attachment 34160 [details] Zipped log file with the exception
Now the exception occured when presing right arrow on the last character on the line. Attaching the log again.
Created attachment 34581 [details] Zipped log file with the exception
Again!!! Currently it happened when I was trying to declare and initialize a private field. So I typed something like: private static final PolicyModelMarshaller defaultXmlMarshaller = new XmlPolicyModelMarshaller(false) When I typed the closing bracket ')' the exception occured. I would really appreciate if somebody tried to explore the problem in more detail, because it is pretty annoying if NB gets frozen and must be killed 2 times in 5 minutes and all the new code gets lost again and again. I am currenlty using build from 25/09/2006.
The exception in the second log is different (similar to the one in the issue #67757) but the two could possibly be related. I'm still unable to reproduce and there is no direct indication what could cause this :( The rendering code was not touched for a long time so it must be caused by some related code. Or it could be a threading issue which is however unlikely. One thing that could theoretically be possible could be that the rendering fragment offset is computed from the Syntax object being used during painting. The Syntax objects get acquired and released and if someone would continue to use the Syntax after releasing it could possibly cause this problem. Could you please test the attached patch for some time whether it makes any difference? Thanks. If the patch does not help please try to run the IDE with -J-Dnetbeans.debug.editor.draw=true -J-Dnetbeans.debug.editor.draw.fragment=true it will output the fragments being rendered and it could give a clue why this happens. Thanks.
Created attachment 34600 [details] Possible patch to be tested
OK, I've applied the patch to the trunk. I've also simplified SegmentCache impl to not do any caching as it's superflous with present JVMs: Checking in libsrc/org/netbeans/editor/BaseDocument.java; /cvs/editor/libsrc/org/netbeans/editor/BaseDocument.java,v <-- BaseDocument.java new revision: 1.133; previous revision: 1.132 done Checking in libsrc/org/netbeans/editor/SegmentCache.java; /cvs/editor/libsrc/org/netbeans/editor/SegmentCache.java,v <-- SegmentCache.java new revision: 1.6; previous revision: 1.5
*** Issue 67757 has been marked as a duplicate of this issue. ***
Created attachment 34823 [details] stacktrace
happend with build 061003 -the IDE didn't freeze -not able to reproduce -I resized IDE, Editor, Explorer. Then I edited a line of the document with errors.
Created attachment 34824 [details] unfortunatelly I was wrong. Deadlock appeared... I'm attaching thread dump
The deadlock seems strange, there is no thread that would hold the document's read/write lock that the AWT waits on. Marku and Lukasi, I'm wondering whether this could be caused by a particular JDK version. Could you please test on 1.5.0_07 or 1.5.0_06? Thanks in advance.
It happened to me with 5.5 RC1 + jdk1.5.0_09-b01 I'm sorry but I will not to test with jdk1.5.0_06/7 it would be step back for me. I don't know how to reproduce it :(
Hi Milo, currently I am using jdk1.5.0_08. I will try to switch to _07. Btw. I didn't find a better way how to download older revision of JDK than to take the link http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0_08-oth-JPR&SiteId=JSC&TransactionId=noreg and manualy modify "jdk-1.5.0_08" to "jdk-1.5.0_07".
http://java.sun.com/products/archive/ could be used as well.
Reproduced by another user on NB RC1 java version "1.6.0-beta2" Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
I believe that this exception is connected to the issue. I was running NB5.5 RC1. Attaching messages log, console output and thread dump.
Created attachment 35042 [details] messages log + console output + thread dump
Thanks for the last dump. I've noticed that the code in DrawEngine:1088 is executing finally code block so it might be possible that there was an exception thrown inside the block before the finally clause that was hidden by the exception thrown in the finally clause. I'll make a patch that will do setting of a null buffer before the finally clause. It is more correct to not attempt to continue rendering through DrawGraphics if an exception occurs. That could help us to discover the original exception if there is a one.
Possible fix in trunk: Checking in DrawGraphics.java; /cvs/editor/libsrc/org/netbeans/editor/DrawGraphics.java,v <-- DrawGraphics.java new revision: 1.26; previous revision: 1.25 done Checking in DrawEngine.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngine.java,v <-- DrawEngine.java new revision: 1.46; previous revision: 1.45 Graphical diffs: http://www.netbeans.org/source/browse/editor/libsrc/org/netbeans/editor/DrawGraphics.java.diff?r1=1.25&r2=1.26 http://www.netbeans.org/source/browse/editor/libsrc/org/netbeans/editor/DrawEngine.java.diff?r1=1.45&r2=1.46
IMHO we could safely integrate the above patch into release55 as it should be completely non-harming.
+1 for integrating the patch into release55. Also, if you have the patch in a form of binary jar, please let me know. Thanks.
The patch seems OK to me.
Integrated the last fix into release55: Checking in libsrc/org/netbeans/editor/DrawEngine.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngine.java,v <-- DrawEngine.java new revision: 1.42.2.1.2.2; previous revision: 1.42.2.1.2.1 done Checking in libsrc/org/netbeans/editor/DrawGraphics.java; /cvs/editor/libsrc/org/netbeans/editor/DrawGraphics.java,v <-- DrawGraphics.java new revision: 1.22.2.1.2.2; previous revision: 1.22.2.1.2.1 Marking as fixed. If the problem would reappear please reopen the issue.
*** Issue 86805 has been marked as a duplicate of this issue. ***
Integrated into release55_dev: Checking in libsrc/org/netbeans/editor/DrawEngine.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngine.java,v <-- DrawEngine.java new revision: 1.42.2.1.2.1.14.1; previous revision: 1.42.2.1.2.1 done Checking in libsrc/org/netbeans/editor/DrawGraphics.java; /cvs/editor/libsrc/org/netbeans/editor/DrawGraphics.java,v <-- DrawGraphics.java new revision: 1.22.2.1.2.1.14.1; previous revision: 1.22.2.1.2.1