Bug 200273 - NullPointerException when profiling through VisualVM
NullPointerException when profiling through VisualVM
Status: RESOLVED DUPLICATE of bug 207632
Product: profiler
Classification: Unclassified
Component: Base
7.1
Other Linux
: P3 (vote)
: TBD
Assigned To: issues@profiler
issues@profiler
: VISUALVM
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-20 21:41 UTC by david.jurgens
Modified: 2012-11-08 10:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david.jurgens 2011-07-20 21:41:31 UTC
I was using jvisualvm to profile a multi-threaded application on a Linux system running the latest Java version:

$ java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

During profiling, I noticed that the UI would no longer let me click "settings" on the Profiler tab, although it would still profile.  When I returned to my application, I noticed the following exception reported for the profiler on my program's output:

Exception in thread "WorkerThread-2" java.lang.NullPointerException
        at org.netbeans.lib.profiler.server.ProfilerRuntimeCPU.copyLocalBuffer(ProfilerRuntimeCPU.java:240)
        at org.netbeans.lib.profiler.server.ProfilerRuntimeCPU.writeTimeStampedEvent(ProfilerRuntimeCPU.java:565)
        at org.netbeans.lib.profiler.server.ProfilerRuntimeCPUFullInstr.methodExit(ProfilerRuntimeCPUFullInstr.java:212)
        at gnu.trove.impl.hash.THash.computeMaxSize(THash.java:351)
        at gnu.trove.impl.hash.THash.setUp(THash.java:299)
        at gnu.trove.impl.hash.TPrimitiveHash.setUp(TPrimitiveHash.java:134)
        at gnu.trove.impl.hash.TIntHash.setUp(TIntHash.java:151)
        at gnu.trove.impl.hash.THash.<init>(THash.java:138)
        at gnu.trove.impl.hash.THash.<init>(THash.java:105)
        at gnu.trove.impl.hash.TPrimitiveHash.<init>(TPrimitiveHash.java:69)
        at gnu.trove.impl.hash.TIntHash.<init>(TIntHash.java:66)
        at gnu.trove.set.hash.TIntHashSet.<init>(TIntHashSet.java:60)
        at <snip...>

I was using the GNU Trove collections, if that helps.  It seems that all four of my threads had the same exception at ProfilerRuntimeCPUFullInstr.methodExit, although at different execution stacks for each thread.  

I tried re-running the program several times but haven't been able to reproduce the error with any reliability.  (Although I still can't seem to select the "Setting" subwindow when profiling this application.)
Comment 1 Tomas Hurka 2012-11-08 10:36:34 UTC

*** This bug has been marked as a duplicate of bug 207632 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo