× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
funfun reported 2013-02-13T22:08:47Z  · SachinPrakash last modified 2013-04-03T21:52:56Z

NPE from PaneFactory.closedPane(JEditorPane)


Dev
Fun Fun
funfun
QA
Sachin Prakash
SachinPrakash
Priority Low
Complexity Unknown
Component App - General
Version 14.0

To reproduce the problem:
(1) Open a Query Analyzer panel.
(2) Execute a valid SQL statement such as 'SELECT count(*) FROM a-valid-table'.
(3) An NPE similar to the one shown below is logged in the log file:
<2013-02-13 13:49:41,484> ERROR [AWT-EventQueue-0] <com.aquafold.aquaeditor.bridge.PaneFactory>
java.lang.NullPointerException
    at com.aquafold.editor.standalone.api.PaneFactory.closedPane(PaneFactory.java:750)
    at com.aquafold.aquaeditor.bridge.PaneFactory.closedPane(PaneFactory.java:45)
    at com.aquafold.aquaeditor.bridge.PaneFactory.clearAndCloseEditorPane(PaneFactory.java:57)
    at com.aquafold.datastudio.queryanalyzer.QueryPanel.clearAndCloseEditorPane(QueryPanel.java:2330)
    at com.aquafold.datastudio.queryanalyzer.QueryPanel.createNewTextResultComponents(QueryPanel.java:2546)
    at com.aquafold.datastudio.queryanalyzer.QueryPanel.createNewTextResults(QueryPanel.java:2518)
    at com.aquafold.datastudio.queryanalyzer.QueryThread$6.run(QueryThread.java:399)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
    ...
com.aquafold.aquaeditor.bridge.PaneFactory.closedPane(CEditorPane) caught the exception and logged it to the log file.
(4) Repeat (2) again, two more NPEs are logged.

Every time a statement is executed in the Query Analyzer panel, an Editor Pane will be recreated. I made change last night (SVN r31336 for issue #8187) so that when a new Editor Pane instance is created, PaneFactory.closedPane(old-editor-pane-instance) is called to close the old one (which to be thrown away). This editor pane is created as:
    CEditorPane newPane = PaneFactory.getDefault().createNBEditorPane(CEditorPane, String mime);
    bind popup menu to newPane;
    newPane.disableUndo();
    newPane.setText("");
    Document d = newPane.getEditorKit().createDefaultDocument();
    newPane.setDocument(d);
Is there anything missing here?
 

Issue #8345

Closed
Fixed
Resolved 2013-02-20T03:21:14Z
 
 
Completion
No due date
Fixed Build trunk/31398
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017