Bug 225126 - NullPointerException at org.netbeans.modules.profiler.ExportAction.actionPerformed
NullPointerException at org.netbeans.modules.profiler.ExportAction.actionPerf...
Status: VERIFIED FIXED
Product: profiler
Classification: Unclassified
Component: Base
7.3
All All
: P2 (vote)
: 7.3
Assigned To: Petr Cyhelsky
issues@profiler
EXCEPTIONS_REPORT
: 73_HR_FIX, REGRESSION
: 225140 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 09:02 UTC by Petr Cyhelsky
Modified: 2013-01-24 03:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (2.81 KB, text/plain)
2013-01-21 09:02 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2013-01-21 09:02:12 UTC
Build: NetBeans IDE 7.3 RC1 (Build 201301102100)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b15
OS: Linux

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.profiler.ExportAction.actionPerformed(ExportAction.java:361)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
Comment 1 Petr Cyhelsky 2013-01-21 09:02:14 UTC
Created attachment 130433 [details]
stacktrace
Comment 2 Petr Cyhelsky 2013-01-21 11:08:32 UTC
this is an regression caused by check whether the backing snapshot is being overwritten. It happens for memory diff from sampled memory profiling.
fixed in https://hg.netbeans.org/profiler-main/rev/a849e0bc8c4e
Comment 3 Jiri Sedlacek 2013-01-21 11:56:36 UTC
Not sure if this is the right fix. By this change you've disabled the check to overwrite an existing file for sampled memory diffs. Now the target file is overwritten without any message. Sampled CPU diff asks you to confirm overwrite file - should be consistent.

Looking at the 'checkFileExists(...)' implementation, this seems to be a better fix:

  if (!checkFileExists(snapshot == null ? null : snapshot.getFile(),file)) {

Please check and eventually update your changes.
Comment 4 Jiri Sedlacek 2013-01-21 14:21:59 UTC
*** Bug 225140 has been marked as a duplicate of this bug. ***
Comment 5 Petr Cyhelsky 2013-01-22 14:16:57 UTC
reviewer's code integrated in:
https://hg.netbeans.org/profiler-main/rev/f7b9eecf29cc
Comment 6 Jiri Sedlacek 2013-01-22 14:20:46 UTC
The fix looks good, verified that it fixes the reported bug and doesn't introduce new problems.
Comment 7 Quality Engineering 2013-01-24 00:54:53 UTC
Integrated into 'releases', will be available in build *201301232200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/85b0008d56ed
User: Petr Cyhelsky <cyhelsky@netbeans.org>
Log: #225126 - check for non existent backing snapshot when exporting
(transplanted from a849e0bc8c4ef76b7ee9bef476cd69714bc4b78e)
Comment 8 Quality Engineering 2013-01-24 03:02:39 UTC
Integrated into 'main-golden', will be available in build *201301240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a849e0bc8c4e
User: Petr Cyhelsky <cyhelsky@netbeans.org>
Log: #225126 - check for non existent backing snapshot when exporting


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo