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 8.0 (Build 201403101706) VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132 OS: Mac OS X User Comments: GUEST: Importing .grab files GUEST: importing .grab files to a MySQL database. The IDE freezes after 1 or 2 files. GUEST: importing .grab files to a MySQL database GUEST: Viewing JavaDB Table GUEST: Made a selection to copy a row in a database table. euswdwj: recreating table in derby database GUEST: Problem with Java FX GUEST: Was attempting to import a grab file into a derby DB. Stacktrace: org.netbeans.modules.deadlock.detector.Detector$DeadlockDetectedException: AWT-EventQueue-0 at java.awt.Component.invalidate(Component.java:2923) at java.awt.Container.invalidate(Container.java:1585) at javax.swing.JComponent.revalidate(JComponent.java:4847) at javax.swing.JTable.tableRowsInserted(JTable.java:4484) at javax.swing.JTable.tableChanged(JTable.java:4409) at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
Created attachment 146681 [details] stacktrace
IMHO the problem is on line org.netbeans.modules.db.explorer.action.RecreateTableAction$1.run(RecreateTableAction.java:129) being called in request processor thread instead of in AWT EDT. That causes deadlocks.
I was unable to reproduce. If somebody had sure steps to reproduce, please write it here. Also it's not easy to switch it to AWT EDT, cause there is a check on it.
Created attachment 149385 [details] stacktrace Used the "Recreate Table..." function for a h2 database.
Created attachment 152052 [details] stacktrace Deadlock appreared when I invoke Recreate table in DB explorer|Tables node. Found one Java-level deadlock: ============================= "Default RequestProcessor": waiting to lock monitor 0x00007feacca6f108 (object 0x00000007fe02eec0, a java.lang.Object), which is held by "AWT-EventQueue-0" "AWT-EventQueue-0": waiting to lock monitor 0x00007feaca576ed8 (object 0x00000007c0176730, a java.awt.Component$AWTTreeLock), which is held by "Default RequestProcessor" Java stack information for the threads listed above: =================================================== "Default RequestProcessor": at com.apple.laf.AquaFileSystemModel.getRowCount(AquaFileSystemModel.java:194) - waiting to lock <0x00000007fe02eec0> (a java.lang.Object) at javax.swing.JTable.getRowCount(JTable.java:2662) at javax.swing.plaf.basic.BasicTableUI.createTableSize(BasicTableUI.java:1692) at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(BasicTableUI.java:1733) at javax.swing.JComponent.getPreferredS
I just pushed this fix: http://hg.netbeans.org/core-main/rev/80aef89189c9 The stacktraces consistently point to the FileChooser code and indeed the file chooser is invoked outside the EDT. I reworked that code so that the Swing interaction happens on the EDT, while the DB tasks are dispatched off the EDT. This bug looks like it only affects Mac OS X (all stacktraces lock in com.apple.laf.AquaFileSystemModel.getRowCount) - so while I checked it to still work on linux, please verify on Mac OS X. Thank you!
Integrated into 'main-silver', will be available in build *201502230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/80aef89189c9 User: Matthias Blaesing <matthias42@netbeans.org> Log: #243747: correct swing EDT handling in RecreateTableAction and remove now uncessary helper class