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 182343 - NullPointerException at javax.imageio.ImageIO.write
Summary: NullPointerException at javax.imageio.ImageIO.write
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Sedlacek
URL:
Keywords: NETFIX, SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2010-03-19 02:44 UTC by sunbiz
Modified: 2010-03-23 05:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166665


Attachments
stacktrace (2.63 KB, text/plain)
2010-03-19 02:44 UTC, sunbiz
Details
fixes NPE (3.07 KB, patch)
2010-03-19 04:15 UTC, sunbiz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2010-03-19 02:44:06 UTC
Build: NetBeans IDE Dev (Build 100319-48442a044a29)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows Server 2008

User Comments:
sunbiz: Took snapshot of thread dump. Saving current view as Image and select "Computer" instead of any drive or folder, throws this exception




Stacktrace: 
java.lang.NullPointerException
   at javax.imageio.ImageIO.write(ImageIO.java:1523)
   at org.netbeans.modules.profiler.SaveViewAction$1.run(SaveViewAction.java:210)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1356)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1894)
Comment 1 sunbiz 2010-03-19 02:44:10 UTC
Created attachment 95407 [details]
stacktrace
Comment 2 sunbiz 2010-03-19 03:06:16 UTC
Should be simple to provide a fix through a correct error dialog as done in vmd.midp
Comment 3 sunbiz 2010-03-19 04:15:28 UTC
Created attachment 95410 [details]
fixes NPE
Comment 4 Jiri Kovalsky 2010-03-19 12:51:52 UTC
Jirko, can you please review the patch and integrate it if you find it good enough? Thanks!
Comment 5 Jiri Sedlacek 2010-03-22 16:07:42 UTC
Thanks for the patch! Applied with minor cleanup.

Fixed for 6.9, pushed into profiler-main.

http://hg.netbeans.org/profiler-main/rev/374a8ce6d493
Comment 6 Jiri Sedlacek 2010-03-22 16:14:29 UTC
More cleanup - http://hg.netbeans.org/profiler-main/rev/ed0c723acbab
Comment 7 Jiri Kovalsky 2010-03-22 21:07:34 UTC
Great, thank you Jirko for review&integration and Saptarshi for the patch!
Comment 8 sunbiz 2010-03-22 21:39:20 UTC
(In reply to comment #6)
> More cleanup - http://hg.netbeans.org/profiler-main/rev/ed0c723acbab

Thanks Jirko... and Jiri for the constant enthusiasm and support
Comment 9 Quality Engineering 2010-03-23 05:11:29 UTC
Integrated into 'main-golden', will be available in build *201003230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/374a8ce6d493
User: Jiri Sedlacek <jis@netbeans.org>
Log: Bugfix #182343 - check for invalid target in SaveViewAction