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 155725 - Paging in dataview causes "flashing dialogs"
Summary: Paging in dataview causes "flashing dialogs"
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: All Mac OS X
: P1 blocker (vote)
Assignee: _ ahimanikya
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 23:53 UTC by David Vancouvering
Modified: 2009-02-19 20:38 UTC (History)
1 user (show)

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 2008-12-17 23:53:33 UTC
This is odd, but here's how I made this happen:

- Show data on Sakila actor table
- Type in "PENE" in matchbox
- page forward, page back, page forward (keep trying this).

Then I get this exception.  I also notice a lot of dialogs quickly flashing up and going away.  I almost suspect that
the DataView is reconnecting to the database each time I paginate
Comment 1 David Vancouvering 2008-12-17 23:54:00 UTC
Copying Ahi, because I think DataView is involved in this bug.
Comment 2 David Vancouvering 2008-12-17 23:54:21 UTC
Here's the stack trace:

java.lang.NullPointerException
	at org.netbeans.modules.db.explorer.node.ForeignKeyNode.initialize(ForeignKeyNode.java:90)
	at org.netbeans.api.db.explorer.node.BaseNode.setup(BaseNode.java:149)
	at org.netbeans.modules.db.explorer.node.ForeignKeyNode.create(ForeignKeyNode.java:70)
	at org.netbeans.modules.db.explorer.node.ForeignKeyNodeProvider.initialize(ForeignKeyNodeProvider.java:127)
	at org.netbeans.api.db.explorer.node.NodeProvider.getNodes(NodeProvider.java:103)
	at org.netbeans.modules.db.explorer.node.NodeRegistry.getNodes(NodeRegistry.java:149)
	at org.netbeans.api.db.explorer.node.ChildNodeFactory.createKeys(ChildNodeFactory.java:104)
	at org.openide.nodes.AsynchChildren.run(AsynchChildren.java:158)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Comment 3 David Vancouvering 2008-12-17 23:56:47 UTC
Correction: you don't need to filter for this to happen.  Just paginate with no matchbox, and you'll get the same
behavior - page forward/back about three times and BANG.
Comment 4 David Vancouvering 2008-12-18 00:12:27 UTC
Changing ownership and title, because after restarting NB the NPE went away, but I'm still getting the *very* annoying
flashing dialogs every time I paginate.  I noticed if I pay careful attention that it is saying "Connecting".  I think
DataView is invoking the API to connect to the database *twice* every time I paginate.

I think this constant reconnecting is uncovering a bug in the new Database Explorer infrastructure, perhaps a timing bug.

This happens every time you paginate and it's very annoying.  Making it a P1 because we really can't release with
something like this... I consider it a blocker.
Comment 5 Rob Englander 2008-12-18 02:16:48 UTC
Wow.  I can see what's wrong just by looking at the code.  Fix is on the way.
Comment 6 Rob Englander 2008-12-18 02:18:20 UTC
Just to clarify, I see what's wrong in the ForeignKeyNode.  I'll fix that.  I don't know about
the connection issue you're referring to.
Comment 7 Rob Englander 2008-12-18 04:24:28 UTC
I made a fix in fdb69bf5227a.  I'm not able to reproduce the NPE in the ForeignKeyNode now.  Can you check
using the same environment you used. I won't mark as fixed until you verify.  Thanks.
Comment 8 David Vancouvering 2008-12-18 05:44:46 UTC
Thanks for fixing this, Rob. I don't think I can verify since I couldn't reproduce it after the first time.  I'll have
to trust you :)

I guess there are two issues.  I'm going to be a bit sloppy here and re-open this one with a new title for Ahi, since
the description of the bug is already in this issue.  I wouldn't do this during maintenance phase, but I think it's OK
right now.

Ahi, the problem I'm seeing is described in the comments below: every time you paginate in the data view, you get two
flashing dialogs saying "Connecting... something something".  It's very annoying and it's obviously a bug - you
shouldn't have to reconnect to the database (*twice*) for a new page when you're already connected.

See my justification for P1 below.
Comment 9 _ ahimanikya 2008-12-18 12:26:15 UTC
http://hg.netbeans.org/main/rev/d7ba03697249
Comment 10 Roman Mostyka 2008-12-18 16:18:11 UTC
Verified with build 081218.
By pagination dialog doesn't appear. After disconnection it appears only one time and never after this by pagination.
Comment 11 Quality Engineering 2008-12-22 15:21:17 UTC
Integrated into 'main-golden', will be available in build *200812221122* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fdb69bf5227a
User: Rob Englander <mindstream@netbeans.org>
Log: #155725 DB Explorer nodes should always grab the handle from their lookup during construction.