Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 200273 - NullPointerException when profiling through VisualVM
NullPointerException when profiling through VisualVM
Status: RESOLVED DUPLICATE of bug 207632
Product: profiler
Classification: Unclassified
Component: Base
Other Linux
: P3 (vote)
Assigned To: issues@profiler
Depends on:
  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


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(
        at org.netbeans.lib.profiler.server.ProfilerRuntimeCPU.writeTimeStampedEvent(
        at org.netbeans.lib.profiler.server.ProfilerRuntimeCPUFullInstr.methodExit(
        at gnu.trove.impl.hash.THash.computeMaxSize(
        at gnu.trove.impl.hash.THash.setUp(
        at gnu.trove.impl.hash.TPrimitiveHash.setUp(
        at gnu.trove.impl.hash.TIntHash.setUp(
        at gnu.trove.impl.hash.THash.<init>(
        at gnu.trove.impl.hash.THash.<init>(
        at gnu.trove.impl.hash.TPrimitiveHash.<init>(
        at gnu.trove.impl.hash.TIntHash.<init>(
        at gnu.trove.set.hash.TIntHashSet.<init>(
        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. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo