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 251610 - Runtime exception when trying to save view of CPU Comparison as image
Summary: Runtime exception when trying to save view of CPU Comparison as image
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
: 251666 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-03 07:59 UTC by stwr
Modified: 2015-04-15 16:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Copy of messages.log (93.92 KB, text/plain)
2015-04-03 07:59 UTC, stwr
Details
stacktrace (3.89 KB, text/plain)
2015-04-07 07:12 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-04-03 07:59:23 UTC
Created attachment 153009 [details]
Copy of messages.log

Product Version: NetBeans IDE Dev (Build 201504020001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev

Use Case:

1. Create 2 snapshots of collected profile results
2. Compute differences between these 2 snapshots -> the tab 'CPU Comparison' opens automatically
3. Execute the 'Save Current View to Image' action

The following exception is thrown twice. Once when the dialog 'Select File or Directory' is being displayed. The second one is thrown when trying to 'Save' the image anyway. In the result there is no way to 'Save Current View to Image'.

java.lang.AssertionError
	at org.netbeans.lib.profiler.ui.UIUtils.createScreenshot(UIUtils.java:704)
	at org.netbeans.lib.profiler.ui.cpu.CCTDisplay.getCurrentViewScreenshot(CCTDisplay.java:273)
	at org.netbeans.modules.profiler.CPUDiffPanel.getViewImage(CPUDiffPanel.java:506)
	at org.netbeans.modules.profiler.SaveViewAction$4.getImage(SaveViewAction.java:332)
	at org.netbeans.modules.profiler.ui.ImagePreviewPanel$1.run(ImagePreviewPanel.java:109)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1425)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2038)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:420)
	at org.netbeans.modules.profiler.ui.ImagePreviewPanel.setImage(ImagePreviewPanel.java:100)
	at org.netbeans.modules.profiler.SaveViewAction.selectSnapshotTargetFile(SaveViewAction.java:330)
	at org.netbeans.modules.profiler.SaveViewAction.actionPerformed(SaveViewAction.java:169)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
	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)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.Component.processMouseEvent(Component.java:6525)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3322)
	at java.awt.Component.processEvent(Component.java:6290)
	at java.awt.Container.processEvent(Container.java:2234)
	at java.awt.Component.dispatchEventImpl(Component.java:4881)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
	at java.awt.Container.dispatchEventImpl(Container.java:2278)
	at java.awt.Window.dispatchEventImpl(Window.java:2739)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:702)
	at java.awt.EventQueue$3.run(EventQueue.java:696)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 1 gokumar 2015-04-06 04:48:48 UTC
Even I faced this problem today
Comment 2 gokumar 2015-04-06 05:44:30 UTC
*** Bug 251666 has been marked as a duplicate of this bug. ***
Comment 3 Jiri Skrivanek 2015-04-07 07:12:23 UTC
Created attachment 153068 [details]
stacktrace

Reproduced as described in the initial comment.
Comment 4 Jiri Sedlacek 2015-04-15 16:45:24 UTC
Fixed by fixing Bug 251865.