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 202668 - NullPointerException at org.netbeans.lib.profiler.results.EventBufferProcessor.readDataAndPrepareForProcessing
Summary: NullPointerException at org.netbeans.lib.profiler.results.EventBufferProcesso...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Engine (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 11:56 UTC by Petr Cyhelsky
Modified: 2011-10-19 14:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181373


Attachments
stacktrace (540 bytes, text/plain)
2011-09-26 11:56 UTC, Petr Cyhelsky
Details
stacktrace (540 bytes, text/plain)
2011-09-26 13:52 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2011-09-26 11:56:19 UTC
Build: NetBeans IDE 7.1 Beta (Build 201109252201)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b18, Java(TM) SE Runtime Environment, 1.7.0-b148
OS: Linux

User Comments:
GUEST: Starting a Swing application in order to profile it




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.profiler.results.EventBufferProcessor.readDataAndPrepareForProcessing(EventBufferProcessor.java:136)
   at org.netbeans.lib.profiler.ProfilerClient.readAndProcessProfilingResults(ProfilerClient.java:1954)
   at org.netbeans.lib.profiler.ProfilerClient.access$1900(ProfilerClient.java:90)
   at org.netbeans.lib.profiler.ProfilerClient$ServerListener.handleServerCommand(ProfilerClient.java:299)
   at org.netbeans.lib.profiler.ProfilerClient$ServerListener.run(ProfilerClient.java:213)
Comment 1 Petr Cyhelsky 2011-09-26 11:56:24 UTC
Created attachment 111181 [details]
stacktrace
Comment 2 Petr Cyhelsky 2011-09-26 13:52:36 UTC
Created attachment 111191 [details]
stacktrace

Happens when dynamically attaching to local application (jdk1.7.0)
Comment 3 Tomas Hurka 2011-09-29 11:39:06 UTC
I am not able to reproduce it. I guess that the steps to reproduce have to have more details.
Comment 4 J Bachorik 2011-10-05 14:31:27 UTC
1. Start the AnagramGame demo application
2. CPU profile the started application using "dynamic attach" and a new configuration with defaults left on
3. Open the live results window as soon as possible
4. Get the NPE
Comment 5 J Bachorik 2011-10-05 14:38:34 UTC
And it is necessary to set the filter to "profile all classes" to get enough time window for opening the live results and causing the NPE. On my setup the NPE is 100% reproducible.
Comment 6 Tomas Hurka 2011-10-05 14:39:48 UTC
ok, thanks for the steps. I will try to reproduce it.
Comment 7 J Bachorik 2011-10-05 14:53:31 UTC
Another scenario:
1. Start AnagramGame in monitoring mode
2. Change the profiling mode to CPU (Analyze performance), leave the defaults.
3. Wait till the class redefinition is done and open live results
4. NPE :(
Comment 8 Exceptions Reporter 2011-10-07 09:31:57 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=181373
Comment 9 Tomas Hurka 2011-10-16 19:00:04 UTC
Fixed in profiler-main

changeset:   204553:0fa5466854c0
user:        Tomas Hurka <thurka@netbeans.org>
date:        Sun Oct 16 20:58:39 2011 +0200
summary:     bugfix #202668, if the results are not available in profiled application, do not invoke forceObtainedResultsDump()
Comment 10 Quality Engineering 2011-10-19 14:14:28 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/0fa5466854c0
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #202668, if the results are not available in profiled application, do not invoke forceObtainedResultsDump()