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.
Attaching to a running NetBeans based Application leads to the attached ArrayIndexOutOfBoundsException. I tried to attach at different state of the application but all the time this seems to happen reproducable. Found with Nb4 beta 2 and last q-build 200411020931. Milestone used is 3.
Created attachment 18833 [details] Example StackTrace
This may be caused by the tool attempting to instrument too many methods and thus causing an internal overflow which we didn't anticipate. To confirm this theory, could you please tell us: 1. Whether you try to use the "Entire application" CPU profiling mode for a large enough application. 2. If 1 is true, then do you see the "Instrumentation: nnn methods" in the bottom status line in NetBeans? If yes, what's the value of "nnn"? If nnn above is a large number (probably greater than 64K) then a workaround for this problem may be to use the "part of application" instead of "entire application" profiling mode, and select your instrumentation root method(s) such that only a limited part of the application gets instrumented. In any case, please provide answers to the above questions. Thanks, Misha
Reproduced the problem and partially fixed it - increased the internal limit on the number of instrumented methods from 32K to 64K. Changes related to further limit increase may affect performance severely, so I think it will be ok to just modify the tool to issue a warning and stop further instrumentation when the 64K methods limit is reached (which should be ok with most of applications as far as I can see now). Can send the user a patch to test if requested.
-Can confirm "Entire application" CPU profiling mode for rather large application -Can confirm "Instrumentation: nnn methods" in the bottom status line nnn = 34234 , exception seems to occure at 32k Methods. Patch to test would be nice.
Received patch - seems to wrk like a charme. Thanks Misha - that was fast!
Fixed the issue completely - the profiler reports when the 64K limit on the number of instrumented methods is reached, and stops further instrumentation. Code will be available in Milestone 4 release.
Verification of old issues.
Closing old issues.
Reverting to the original Target Milestone value changed by mistake. Sorry for inconvenience.