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 53705 - NPE when profiling Code Fragment with no code selected
Summary: NPE when profiling Code Fragment with no code selected
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-19 16:58 UTC by iformanek
Modified: 2007-02-12 22:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 2005-01-19 16:58:55 UTC
The Select task panel allows to start/modify 
profiling even if no Code fragment is selected, 
resulting in an NPE:

java.lang.NullPointerException
        at 
com.sun.tools.profiler.instrumentation.Instrumento
r.setStatusInfoFromSourceCodeSelection
(Instrumentor.java:165)
        at 
com.sun.tools.profiler.ProfilerClient.initiateCode
RegionInstrumentation(ProfilerClient.java:221)
        at 
org.netbeans.modules.profiler.NetBeansProfiler.per
formInstrumentation(NetBeansProfiler.java:794)
        at 
org.netbeans.modules.profiler.NetBeansProfiler.mod
ifyCurrentProfiling(NetBeansProfiler.java:767)
        at 
org.netbeans.modules.profiler.actions.ProfilingSup
port.modifyProfiling(ProfilingSupport.java:347)
        at 
org.netbeans.modules.profiler.actions.ModifyProfil
ingAction.performAction
(ModifyProfilingAction.java:33)
        at 
org.openide.util.actions.CallableSystemAction$1.ru
n(CallableSystemAction.java:78)
        at 
org.openide.util.actions.CallableSystemAction.doPe
rformAction(CallableSystemAction.java:116)
        at 
org.openide.util.actions.CallableSystemAction.acti
onPerformed(CallableSystemAction.java:76)
        at 
javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1786)
        at 
javax.swing.AbstractButton$ForwardActionEvents.act
ionPerformed(AbstractButton.java:1839)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:420)
        at 
javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:258)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseRe
leased(BasicButtonListener.java:245)
        at 
java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:231)
        at java.awt.Component.processMouseEvent
(Component.java:5100)
        at 
org.openide.awt.ToolbarButton.processMouseEvent
(ToolbarButton.java:29)
        at java.awt.Component.processEvent
(Component.java:4897)
        at java.awt.Container.processEvent
(Container.java:1569)
        at java.awt.Component.dispatchEventImpl
(Component.java:3615)
        at java.awt.Container.dispatchEventImpl
(Container.java:1627)
        at java.awt.Component.dispatchEvent
(Component.java:3477)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:3483)
        at 
java.awt.LightweightDispatcher.processMouseEvent
(Container.java:3198)
        at 
java.awt.LightweightDispatcher.dispatchEvent
(Container.java:3128)
        at java.awt.Container.dispatchEventImpl
(Container.java:1613)
        at java.awt.Window.dispatchEventImpl
(Window.java:1606)
        at java.awt.Component.dispatchEvent
(Component.java:3477)
        at java.awt.EventQueue.dispatchEvent
(EventQueue.java:456)
[catch] at 
java.awt.EventDispatchThread.pumpOneEventForHierar
chy(EventDispatchThread.java:201)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarch
y(EventDispatchThread.java:151)
        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:145)
        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:137)
        at java.awt.EventDispatchThread.run
(EventDispatchThread.java:100)

The Code fragment selection should somehow be 
indiocated in the task's panel, and the Run/OK 
button enabled/disabled based on the fragment 
selection
Comment 1 Jiri Sedlacek 2005-02-14 16:54:02 UTC
Reproduced. Postponed to M6.
Comment 2 Jiri Sedlacek 2005-04-05 16:03:03 UTC
Postponed to M7.
Comment 3 Jiri Sedlacek 2005-09-02 16:35:26 UTC
Already fixed, it is not possible to submit the Specify Code Fragment dialog by 
pressing OK button when no method is selected.
Comment 4 ehucka 2006-10-09 12:10:47 UTC
Verification of old issues.
Comment 5 Alexander Kouznetsov 2007-02-12 22:06:55 UTC
Closing old issues.