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 257157

Summary: NullPointerException at org.netbeans.lib.profiler.instrumentation.ClassManager.storeClassFileBytesForCustomLoaderClasses
Product: profiler Reporter: summersb <summersb>
Component: EngineAssignee: Tomas Hurka <thurka>
Status: RESOLVED INCOMPLETE    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 221690
Attachments: stacktrace

Description summersb 2015-12-15 16:14:16 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Java(TM) SE Runtime Environment, 1.8.0_51-b16
OS: Mac OS X

User Comments:
summersb: started profiler on remote play framework application




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.profiler.instrumentation.ClassManager.storeClassFileBytesForCustomLoaderClasses(ClassManager.java:285)
   at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.preGetInitialMethodsToInstrument(RecursiveMethodInstrumentor1.java:525)
   at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.getInitialMethodsToInstrument(RecursiveMethodInstrumentor1.java:96)
   at org.netbeans.lib.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponseForCallGraph(Instrumentor.java:461)
   at org.netbeans.lib.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponse(Instrumentor.java:310)
   at org.netbeans.lib.profiler.ProfilerClient.instrumentMethodGroupFromRoot(ProfilerClient.java:1924)
Comment 1 summersb 2015-12-15 16:14:18 UTC
Created attachment 157799 [details]
stacktrace
Comment 2 Tomas Hurka 2015-12-15 16:17:36 UTC
Are you able to reproduce it?
Which JDK/platform is used on remote machine?
Comment 3 summersb 2015-12-15 17:07:57 UTC
app is running local, under java 1.8.0_51
Running typesafe-activator (1.3.6) under brew on OSX 10.11.1

This is the first time I have seen the exception.

However, connecting the profiler takes a long time, much longer than it did under netbeans 8.0

The whole IDE is unresponsive until "Performing Instrumentation" is completed.  The first time run is way longer than the second.
Comment 4 summersb 2015-12-15 17:21:06 UTC
Just tried to stop the profiler and got this exception

java.lang.NullPointerException
	at org.netbeans.lib.profiler.classfile.ClassFileParser.nextInt(ClassFileParser.java:196)
	at org.netbeans.lib.profiler.classfile.ClassFileParser.readPreamble(ClassFileParser.java:552)
	at org.netbeans.lib.profiler.classfile.ClassFileParser.parseClassFile(ClassFileParser.java:115)
	at org.netbeans.lib.profiler.classfile.DynamicClassInfo.parseClassFile(DynamicClassInfo.java:574)
	at org.netbeans.lib.profiler.classfile.LazyDynamicClassInfo.initializeClassFile(LazyDynamicClassInfo.java:104)
	at org.netbeans.lib.profiler.classfile.LazyDynamicClassInfo.getMethodIndex(LazyDynamicClassInfo.java:69)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.locateAndMarkMethodReachable(RecursiveMethodInstrumentor1.java:424)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.locateAndMarkMethodReachable(RecursiveMethodInstrumentor1.java:475)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.processInvoke(RecursiveMethodInstrumentor1.java:356)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor.scanBytecode(RecursiveMethodInstrumentor.java:309)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor.scanMethod(RecursiveMethodInstrumentor.java:237)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.checkAndScanMethod(RecursiveMethodInstrumentor1.java:402)
	at org.netbeans.lib.profiler.instrumentation.RecursiveMethodInstrumentor1.getMethodsToInstrumentUponMethodInvocation(RecursiveMethodInstrumentor1.java:271)
	at org.netbeans.lib.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMethodGroupResponseForCallGraph(Instrumentor.java:366)
	at org.netbeans.lib.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMethodGroupResponse(Instrumentor.java:268)
	at org.netbeans.lib.profiler.ProfilerClient.instrumentMethodGroupFollowUp(ProfilerClient.java:1885)
	at org.netbeans.lib.profiler.ProfilerClient.access$300(ProfilerClient.java:89)
[catch] at org.netbeans.lib.profiler.ProfilerClient$SeparateCmdExecutionThread.run(ProfilerClient.java:127)
Comment 5 Tomas Hurka 2015-12-16 06:47:28 UTC
(In reply to summersb from comment #3)
> app is running local, under java 1.8.0_51
> Running typesafe-activator (1.3.6) under brew on OSX 10.11.1
> 
> This is the first time I have seen the exception.
Can you please provide exact steps how to reproduce it? Thanks.
Comment 6 Tomas Hurka 2016-08-12 12:44:32 UTC
Marking as incomplete, until we know how to reproduce it.