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.
Created attachment 103387 [details] Thread dump Create a Java application add a persistence unit try and edit the xml code netbeans locks up and has to be shut down using task manager
dup of issue 192558 ?
yes possibly i havent used netbeans 7 with JDK6 yet, so dont know if its a just a JDK7 problem
*** This bug has been marked as a duplicate of bug 192558 ***
I have just tried Netbeans 7 with JDK 1.6.0_22 and have the same problem, so have reopened the bug.
bug 192558 was to do with javadoc comments this is an issue with editing XML code, so not a duplicate anyway
*** Bug 192964 has been marked as a duplicate of this bug. ***
Milo, should replaceAndRepaintViews(ViewBuilder.java:598) be run in AWT EDT? Or just the repaint itself? Thanks a lot for looking at this.
*** Bug 192840 has been marked as a duplicate of this bug. ***
For a long time Component.repaint() used to be thread-safe see e.g. http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html With the latest changes to jdk7 and jdk6 update 22 it's no longer true due to repaint()'s call to getLocationOnScreen() which acquires AWT tree lock: java.awt.Component.getLocationOnScreen(Component.java:1995) javax.swing.SwingUtilities.convertPointToScreen(SwingUtilities.java:380) javax.swing.SwingUtilities.convertPoint(SwingUtilities.java:182) javax.swing.SwingUtilities.convertRectangle(SwingUtilities.java:219) javax.swing.RepaintManager.addDirtyRegion(RepaintManager.java:455) javax.swing.JComponent.repaint(JComponent.java:4791) java.awt.Component.repaint(Component.java:3264) This causes deadlocks. Even in JDK's code itself - the JEditorPane.PageLoader may get deadlocked in the same way. Since painting code executed in EDT first acquires AWT-treelock and then some Monitor2/Lock2 (e.g. document's read-lock etc.) we need to eliminate any call to repaint() in any thread that would first acquire Monitor2/Lock2. So IMHO mostly we will wrap repaint()'s call with SwingUtilities.invokeLater() where possible.
http://hg.netbeans.org/jet-main/rev/7aeb7cd8f1d0
*** Bug 193267 has been marked as a duplicate of this bug. ***
*** Bug 192643 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201012230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7aeb7cd8f1d0 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #192548 - Netbeans 7 locking up when opening some source code - JComponent.repaint() is no longer thread-safe.
*** Bug 193734 has been marked as a duplicate of this bug. ***
*** Bug 196174 has been marked as a duplicate of this bug. ***