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 252243

Summary: AIOOBE in locks.ThreadInfos.getThreadInfo
Product: profiler Reporter: Jiri Sedlacek <jis>
Component: EngineAssignee: Tomas Hurka <thurka>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE logfile

Description Jiri Sedlacek 2015-05-05 09:21:59 UTC
Steps:

 0/ Java2Demo, JDK 7u80
 1/ Profile multiple features, Telemetry, Objects (Selected classes HashMap$Entry, Thread, Object[], String; Track only live, Stack limit 5), Threads and Locks
 2/ Profile project, exception is eventually thrown - not always reproducible for the first session, just restart profiling to reproduce the bug:

java.lang.ArrayIndexOutOfBoundsException: 18
	at org.netbeans.lib.profiler.results.locks.ThreadInfos.getThreadInfo(ThreadInfos.java:91)
	at org.netbeans.lib.profiler.results.locks.LockGraphBuilder.getThreadInfo(LockGraphBuilder.java:287)
	at org.netbeans.lib.profiler.results.locks.LockGraphBuilder.monitorEntry(LockGraphBuilder.java:134)
	at org.netbeans.lib.profiler.results.locks.AbstractLockDataFrameProcessor$1.execute(AbstractLockDataFrameProcessor.java:58)
	at org.netbeans.lib.profiler.results.AbstractDataFrameProcessor.foreachListener(AbstractDataFrameProcessor.java:177)
	at org.netbeans.lib.profiler.results.locks.AbstractLockDataFrameProcessor.fireMonitorEntry(AbstractLockDataFrameProcessor.java:56)
	at org.netbeans.lib.profiler.results.memory.MemoryDataFrameProcessor.doProcessDataFrame(MemoryDataFrameProcessor.java:200)
[catch] at org.netbeans.lib.profiler.results.AbstractDataFrameProcessor.processDataFrame(AbstractDataFrameProcessor.java:98)
	at org.netbeans.lib.profiler.results.ProfilingResultsDispatcher$2.run(ProfilingResultsDispatcher.java:172)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Comment 1 Jiri Sedlacek 2015-05-05 09:24:27 UTC
Created attachment 153524 [details]
IDE logfile
Comment 2 Tomas Hurka 2015-05-07 07:07:47 UTC
Reproduced. It happens when memory profiling (instrumented) is enabled together with locks monitoring.
Comment 3 Tomas Hurka 2015-05-07 15:43:57 UTC
Fixed in profiler-main

changeset:   286936:382285e2e319
user:        Tomas Hurka <thurka@netbeans.org>
date:        Thu May 07 17:41:42 2015 +0200
summary:     bugfix #252243, write thread creation event when locks monitoring is enabled
Comment 4 Quality Engineering 2015-05-09 08:08:49 UTC
Integrated into 'main-silver', will be available in build *201505090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/382285e2e319
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #252243, write thread creation event when locks monitoring is enabled