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 # : 080728 ] [ JDK VERSION : other ] [JDK1.6.0_u10b-25] When an error occurs in creation of a new table, the Please Wait window comes infocus over the database creation error dialog. This makes the IDE hang, since the please wait window can't be closed. This is an extremely unusual bug that has been occuring on a variety of use-case when creating a table on a connection. I havent found any other way to reproduce the bug each time, but the following way will always reproduce the bug: 1.) In Services Window, Connect to any available database 2.) Right-click on the Tables folder and select Create Table 3.) change the name of the table to anything (say. userAcc) and add column name user 4.) Double click on the comment field and keep the backspace key pressed 5.) Keeping the backspace key pressed, click the OK button. Did your IDE hang?? If not try again... I know this is a pretty bad use-case, but there have been number of time that this has happened when doing a lot of things, but none of those use-cases are definitive. One solution is to allow closing this please wait window and rollback any changes made if it is manually closed... or waiting for sometime so that the error window can be brought to focus.
Thanks for reporting the issue. Sounds pretty ugly. It's weird I've never seen this before. I don't believe this is a P1 because it doesn't happen all the time and because there is a workaround (if an onerous one): restart the IDE and try again.
Created attachment 65984 [details] The screenshot of what happens with thhe please wait
OK, I can't reproduce on the Mac. Can you please go to the About box for NetBeans and copy/paste your environment information? Also can you please get the thread dump and attach it? See http://wiki.netbeans.org/GenerateThreadDump Meanwhile I'll try on Windows.
Created attachment 66371 [details] The thread dump on netbeans created from visualvm
Product Version: NetBeans IDE Dev (Build 080802) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b12 System: Windows Vista version 6.0 running on x86; Cp1252; en_IN (nb) Userdir: C:\Users\Sunbon\.netbeans\dev It could also be an issue with JDK6u10 on Vista that windows are not correctly in focus or something related to keyboard input/focus in JDK... But either ways I think its solvable through Netbeans by either waiting for sometime to bring to focus or allowing to close that please wait window.
Created attachment 66372 [details] The screenshot of ther bug with the new looking dialog. I have reproduced the bug each time after 2 tries of having the backspace key pressed and pressing OK button
Wow, thanks for the *very* fast response! I see two threads that the DB explorer owns that are waiting, so that's a good place to start investigating. This definitely doesn't seem related to the stack trace I saw, I think that's a different bug. Thread traces below. Meanwhile, can you try it with JDK 1.5 and see if it behaves any differently? Just trying to gather data... Thanks. THREAD 1: "Default RequestProcessor" daemon prio=2 tid=0x32bc3400 nid=0xc in Object.wait() [0x3205f000..0x3205fbe8] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at java.awt.EventQueue.invokeAndWait(EventQueue.java:992) - locked <0x0c43de70> (a java.awt.EventQueue$1AWTInvocationLock) at org.openide.util.Mutex.doEventAccess(Mutex.java:1384) at org.openide.util.Mutex.readAccess(Mutex.java:268) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:870) at java.awt.Component.show(Component.java:1447) at java.awt.Component.setVisible(Component.java:1400) at java.awt.Window.setVisible(Window.java:824) at java.awt.Dialog.setVisible(Dialog.java:986) at org.netbeans.modules.db.explorer.dlg.CreateTableDialog.run(CreateTableDialog.java:340) at org.netbeans.modules.db.explorer.actions.CreateTableAction$1.run(CreateTableAction.java:75) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) THREAD 2: "Default RequestProcessor" daemon prio=2 tid=0x32bc2800 nid=0xd38 in Object.wait() [0x3275f000..0x3275fb68] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at java.awt.EventQueue.invokeAndWait(EventQueue.java:992) - locked <0x06340438> (a java.awt.EventQueue$1AWTInvocationLock) at org.openide.util.Mutex.doEventAccess(Mutex.java:1384) at org.openide.util.Mutex.readAccess(Mutex.java:268) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:870) at java.awt.Component.show(Component.java:1447) at java.awt.Component.setVisible(Component.java:1400) at java.awt.Window.setVisible(Window.java:824) at java.awt.Dialog.setVisible(Dialog.java:986) at org.netbeans.modules.db.explorer.ProgressPanel.open(ProgressPanel.java:104) at org.netbeans.modules.db.explorer.DbUtilities.doWithProgress(DbUtilities.java:110) at org.netbeans.modules.db.explorer.dlg.CreateTableDialog$3$1.run(CreateTableDialog.java:293) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
I see from the screenshot that (a) you are using MySQL and (b) you hit a syntax error. Useful information...
Reproduced on XP! Yay!
Are you using Java5 or Java6 on WinXP?? Do you want me to try with Java5.. coz I don't have Java 5 installed ATM.
The reason the beast is hung is because it is waiting for the command to finish executing, but it won't indicate it's finished until you press "OK" on the error message, and you can't press "OK" on the error message because the modal "Please wait" dialog won't let you navigate to the error message dialog. Catch 22. I checked in the following change bdcac546fbd3 but the more I work with it the more I'm not happy with it. It makes the progress dialog non-modal. But that opens up a whole can of worms because now it's possible to execute the command multiple times, which means multiple create table statements being shot off to the database. Not good. I'll see if I can get this progress dialog to be closable even though the execution of the command is not complete. I'm turning into a pumpkin for the weekend and am off Monday, so I'll get back to this on Tuesday.
Status update: I have had to put this on the back burner while trying to get Sakila work done. I will return to this as soon as I can. If someone else wants to take this over just let me know.
Taking over.
Fixed in #24f90768d3d3. David, you seem to have not yet pushed changeset #bdcac546fbd3 mentioned in desc12. Please do not push it anymore, it is not needed.