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 250237 - NullPointerException at org.netbeans.modules.profiler.NetBeansProfiler.attachToApp
Summary: NullPointerException at org.netbeans.modules.profiler.NetBeansProfiler.attach...
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:
Depends on:
Blocks:
 
Reported: 2015-02-05 12:51 UTC by akobberup
Modified: 2015-03-16 02:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 215221


Attachments
stacktrace (2.27 KB, text/plain)
2015-02-05 12:51 UTC, akobberup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akobberup 2015-02-05 12:51:39 UTC
Build: NetBeans IDE Dev (Build 201502020002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.31-b07, Java(TM) SE Runtime Environment, 1.8.0_31-b13
OS: Windows 8

User Comments:
akobberup: tried to attach profiler to project




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.profiler.NetBeansProfiler.attachToApp(NetBeansProfiler.java:761)
   at org.netbeans.modules.profiler.nbimpl.NetBeansProfiler.attachToApp(NetBeansProfiler.java:120)
   at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher$ProfilerSessionImpl$1.run(ProfilerLauncher.java:134)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1425)
   at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:59)
   at org.openide.util.lookup.Lookups.executeWith(Lookups.java:294)
Comment 1 akobberup 2015-02-05 12:51:40 UTC
Created attachment 151829 [details]
stacktrace
Comment 2 Jiri Sedlacek 2015-03-14 17:42:54 UTC
Analyzing the sources I can't see how this can happen. It looks like you've pressed the Attach button without having at least one profiling feature selected. But the Attach button should be disabled in such case.

Do you have any details on how to reproduce the exception? If you can reproduce it, please reopen this bug and provide the details.

Adding a "safety check" to display an error dialog instead of throwing exception - http://hg.netbeans.org/profiler-main/rev/3b50077af7f4
Comment 3 Quality Engineering 2015-03-16 02:11:11 UTC
Integrated into 'main-silver', will be available in build *201503160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3b50077af7f4
User: Jiri Sedlacek <jis@netbeans.org>
Log: Safety check for #250237 - error dialog instead of starting the session when no profiling feature is selected