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 Dev (Build 201605140002) VM: Java HotSpot(TM) 64-Bit Server VM, 25.91-b14, Java(TM) SE Runtime Environment, 1.8.0_91-b14 OS: Linux User Comments: chunkyks: I chose the new SQL Profiler, ran my application [swing desktop app] that uses sqlite jdbc 3.8.11 from here: https://bitbucket.org/xerial/sqlite-jdbc/downloads This exception appeared as soon as I exit my program. As I type this, the GUI is still up on screen but locked with the "exit" button still depressed. Stacktrace: java.lang.NullPointerException at org.netbeans.lib.profiler.results.jdbc.JdbcResultsSnapshot.performInit(JdbcResultsSnapshot.java:375) at org.netbeans.lib.profiler.results.jdbc.JdbcResultsSnapshot.<init>(JdbcResultsSnapshot.java:133) at org.netbeans.lib.profiler.ProfilerClient.getJdbcProfilingResultsSnapshot(ProfilerClient.java:694) at org.netbeans.modules.profiler.ResultsManager.prepareSnapshot(ResultsManager.java:888) at org.netbeans.modules.profiler.ResultsManager.prepareSnapshot(ResultsManager.java:853) at org.netbeans.modules.profiler.ResultsManager.takeSnapshot(ResultsManager.java:1123)
Created attachment 159770 [details] stacktrace
Thanks for the report. Can you provide exact steps how to reproduce it? Thanks.
1) Download https://bitbucket.org/xerial/sqlite-jdbc/downloads/sqlite-jdbc-3.8.11.jar 2) Create a new netbeans project, add that jarfile as a library [I don't know how relevant specific version is, 3.8.11 is the one I'm using locally] 3) Sufficient test case to get the crash, here: public static void main(String[] args) throws SQLException { Connection dbConn = DriverManager.getConnection("jdbc:sqlite::memory:"); } 4) Attempt to profile project. Choose "SQL Queries" in dropdown, and click "<green play button> Profile" 4a) Wait while program executes [it won't take long] 5) NB Exception.
Product Version: NetBeans IDE Dev (Build 201605140002) Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14 System: Linux version 4.2.0-36-generic running on amd64; UTF-8; en_US (nb) User directory: /home/chunky/.netbeans/dev Cache directory: /home/chunky/.cache/netbeans/dev
Thanks for the steps. I am able to reproduce it.
Fixed in profiler-main changeset: 296787:6b396808c17e user: Tomas Hurka <thurka@netbeans.org> date: Mon May 23 14:40:53 2016 +0200 summary: bugfix #261587, allow empty snapshot
I get the same null pointer exception with this code, which does a couple bare-bones queries: public static void main(String[] args) throws SQLException { Connection dbConn = DriverManager.getConnection("jdbc:sqlite::memory:"); Statement stmt = dbConn.createStatement(); stmt.executeUpdate("CREATE TABLE foo (bar INTEGER PRIMARY KEY, baz TEXT)"); stmt.executeUpdate("INSERT INTO foo (baz) VALUES ('kittens')"); ResultSet rs = stmt.executeQuery("SELECT baz FROM foo"); if(rs.next()) { String baz = rs.getString("baz"); System.out.println("Got a value of \"" + baz + "\" from query"); } } Should I be concerned that this is due to an "empty snapshot"? Or shall I try tonight's nightly build and submit a bug if I don't see any results?
(In reply to chunkyks from comment #7) [..] > Should I be concerned that this is due to an "empty snapshot"? Or shall I > try tonight's nightly build and submit a bug if I don't see any results? This looks like different issue. Please file new issue. Thanks.
Integrated into 'main-silver', will be available in build *201605240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6b396808c17e User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #261587, allow empty snapshot
Confirming crash bug fixed in 201605240002, marking bug as closed.