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.

Bug 156845 - Attempt to reconnect to MySQL hangs IDE
Summary: Attempt to reconnect to MySQL hangs IDE
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Mac OS X
: P1 blocker (vote)
Assignee: Rob Englander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-14 23:15 UTC by David Vancouvering
Modified: 2009-02-19 20:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Vancouvering 2009-01-14 23:15:26 UTC
This happens when you call ConnectionManager.showConnectionDialog() and all the parameters are already provided
(username, password, url).  

I tried to reproduce with the SQL editor, but this doesn't seem to even try to reconnect any more, which is another bug...

This didn't happen before, but what happens is the dialog shows briefly saying "reconnecting
to database" and then it disappears, but the IDE *hangs* for about 1 minute while we attempt to connect to the database.
 Try this with MySQL it's very easy to reproduce.

Finally an error dialog comes back saying unable to connect, and the dialog to specify user and password is also brought
up.  But there are *three* error dialogs that come up, so you have to say "OK" three times.

Really pretty broken, and I suspect this is due to explorer changes.
Comment 1 Rob Englander 2009-01-14 23:23:24 UTC
Not due to the explorer changes, but certainly exposed by the new explorer.  I believe
this I fixed this today in my local build.

This is what happens when someone writes code that calls out while holding a lock.  And after the
scary spaghetti of calls and event handlers ends up making a call a NB api (dialog displayer) that 
clearly states that you should not call it while holding a lock.

Please try not to use the new explorer as the first guess at where a mistake is made ;)
Comment 2 David Vancouvering 2009-01-14 23:30:50 UTC
Well, back at me.  Thanks for fixing this (hopefully).
Comment 3 Rob Englander 2009-01-14 23:47:43 UTC
If it doesn't, it's right back at me again :)

I hope to commit again tomorrow.  I ran up against this bug, the one where you
get multiple messages about connection errors, and I think a few others, while working
on the properties stuff for the connection node.  Tomorrow's commit may not be the complete fix
for this stuff, but it's a step in the right direction.

I've also encountered what appears to be timing issues, which I think may have something to do with
connections not being re-established from the sql editor.  I'm trying to determine if this has to
do with our use of the default RequestProcessor, which uses multiple threads and therefore does not
guarantee that tasks submitted to the processor will be processed in the order they were submitted.
Comment 4 Rob Englander 2009-01-15 00:47:42 UTC
I'll be committing a fix tonight.  I'll follow up with the changeset when it's committed.

BTW I can easily reproduce this in 6.5.
Comment 5 Rob Englander 2009-01-15 02:45:04 UTC
Please verify that this fix works.  My testing shows it does, but I want someone else
to validate it before I mark it as fixed.

The changeset is 652504110492
Comment 6 David Vancouvering 2009-01-15 03:40:30 UTC
I'll do a pull tonight and try to verify.  It's disturbing that this is reproducible in 6.5.  How did we miss that?
Comment 7 David Vancouvering 2009-01-15 17:17:04 UTC
Fixed, works for me now, thanks.
Comment 8 David Vancouvering 2009-01-15 17:18:10 UTC
V