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 51467 - Unknown bytecode(?) when using memory profiler
Summary: Unknown bytecode(?) when using memory profiler
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-12 18:39 UTC by samuelto
Modified: 2006-10-09 10:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log with exception stack trace (10.15 KB, text/plain)
2004-11-12 18:41 UTC, samuelto
Details
Class file causing exception (1.00 KB, application/octet-stream)
2004-11-15 20:02 UTC, samuelto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description samuelto 2004-11-12 18:39:37 UTC
Got ArrayIndexOutOfBoundsException trying to use 
memory profiler and attach to already running JVM:

Steps:
1. Start target JVM (Apache JServ)
2. In NetBeans IDE, select "Profile -> Attach and 
Profile
3. Enter working directory and select "Analyze 
Memory Usage".
4. Enter PID of target JVM
5. Click "Attach"
6. Got the exception.

I do see the thread dump and the following 
message in the target JVMs output:
JFluid: current dir is /dx/oracleom/sto/public

JFluid: target app manager starting on port 5140

I was also able to attach and use the "Monitor 
Application option"
Comment 1 samuelto 2004-11-12 18:41:26 UTC
Created attachment 18873 [details]
ide.log with exception stack trace
Comment 2 samuelto 2004-11-12 18:43:02 UTC
(I am using NetBeans 3.6)
Comment 3 mishadmitriev 2004-11-13 02:33:11 UTC
From this stack trace, it looks like JFluid tried to scan the 
bytecodes of some class and bumped into an unknown bytecode 224, 
which is not defined in the JVM Specification.

Since it might not be easy to reproduce the problem here, I can 
initially provide the user with patched code that should emit more 
information about the class in which this occurred. Then we can 
analyse this class's bytecode to see what could have caused the 
issue. Does this sound reasonable?

Misha
Comment 4 samuelto 2004-11-13 08:18:48 UTC
Misha,

Please do send me the patched code.  I can try it out and report the 
results back to you.

Thanks
Sam
Comment 5 samuelto 2004-11-15 20:02:54 UTC
Created attachment 18909 [details]
Class file causing exception
Comment 6 mishadmitriev 2004-11-16 01:54:18 UTC
Fixed the root cause (incorrect reporting of bytecode lengths for 
some rarely used bytecodes) and sent the patched code to the user for 
testing. The updated code will become publically available in M4 
release.
Comment 7 samuelto 2004-11-16 07:48:10 UTC
Verified the patch fixed the issue.