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 67458 - [50cat] [core] Profiling generates ArrayIndexOutOfBoundsException
Summary: [50cat] [core] Profiling generates ArrayIndexOutOfBoundsException
Status: RESOLVED WORKSFORME
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-24 20:07 UTC by sitongia
Modified: 2006-10-23 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sitongia 2005-10-24 20:07:31 UTC
[ JDK VERSION : 1.5.0_04 ]

I'm trying profiling out with the 5.0 beta for the first time.

I tried Analyze Performance for Part of Application and selected one class, then started the application.

It starts running my code, and part way through I get this exception:

java.lang.ArrayIndexOutOfBoundsException: 1198809
	at com.sun.tools.profiler.results.cpu.FullInstrCPUCallGraphBuilder.updateCallGraphs(FullInstrCPUCallGraphBuilder.java:48)
	at com.sun.tools.profiler.results.cpu.CPUCallGraphBuilder.readDataFromBuffer(CPUCallGraphBuilder.java:47)
	at com.sun.tools.profiler.ProfilerClient.processProfilingResults(ProfilerClient.java:831)
	at com.sun.tools.profiler.ProfilerClient.readAndProcessProfilingResults(ProfilerClient.java:822)
	at com.sun.tools.profiler.ProfilerClient.access$2200(ProfilerClient.java:46)
	at com.sun.tools.profiler.ProfilerClient$ServerListener.handleServerCommand(ProfilerClient.java:1344)
[catch] at com.sun.tools.profiler.ProfilerClient$ServerListener.run(ProfilerClient.java:1287)

(the application runs okay without profiling on.)

==Leonard
Comment 1 iformanek 2005-10-25 14:41:29 UTC
Thanks for the bugreport.
Can you please provide more info about the profiler application and possibly 
attach the IDE log file?
Comment 2 sitongia 2006-01-18 22:58:54 UTC
Sorry it has taken so long for me to respond.  I don't recall getting a copy of
your update to this ticket.

I cannot reproduce this problem in RC1.  Actually, I can't profile in RC1
because I get a different error.  However, that's unrelated to this.
Comment 3 sitongia 2006-01-18 23:30:45 UTC
The message I get in trying to profile a method in one of my classes is:

Instrumentation filter:
  Filter type: None
  Filter value:  
IDEAppStatusHandler - error: Invalid location was specified for code region inst
rumentation.
Instrumentation cannot be performed.
Comment 4 Jiri Sedlacek 2006-01-19 11:20:31 UTC
You are trying to profile Code Region defined via line numbers, am I right? It 
seems that you have set wrong line numbers - i.e. line with method name, 
statement like 'try or do', empty lines or lines containing just '{' or '}'.

Selecting line numbers is a bit tricky now, it will be improved in following 
Profiler releases. In general selectable method lines are "inner" lines - lines 
with real method implementation. Please try to correct the selection and let us 
know the result.
Comment 5 Tomas Hurka 2006-08-18 12:39:50 UTC
To sitongia. Anything new? Are you able to reproduce it in NetBeans Profiler 5.5 beta2? Does the 
correcting of line selection helped?
Comment 6 Tomas Hurka 2006-09-15 09:39:16 UTC
Closing as works-for-me, until more information is available.