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 69609 - NPE in ClassRepository.tryLoadRealClass
Summary: NPE in ClassRepository.tryLoadRealClass
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-30 12:52 UTC by iformanek
Modified: 2006-10-23 16:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (29.95 KB, text/plain)
2005-11-30 12:53 UTC, iformanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 2005-11-30 12:52:08 UTC
java.lang.NullPointerException
	at com.sun.tools.profiler.classfile.ClassRepository.tryLoadRealClass
(ClassRepository.java:171)
	at com.sun.tools.profiler.classfile.ClassRepository.lookupClass
(ClassRepository.java:153)
	at com.sun.tools.profiler.classfile.ClassRepository.lookupClass
(ClassRepository.java:109)
	at com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName
(ClassManager.java:43)
	at com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName
(ClassManager.java:57)
	at 
com.sun.tools.profiler.instrumentation.RecursiveMethodInstrumentor.addToSubclass
List(RecursiveMethodInstrumentor.java:100)
	at 
com.sun.tools.profiler.instrumentation.RecursiveMethodInstrumentor3.getMethodsTo
InstrumentUponClassLoad(RecursiveMethodInstrumentor3.java:124)
	at 
com.sun.tools.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMeth
odGroupResponseForCallGraph(Instrumentor.java:439)
	at 
com.sun.tools.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMeth
odGroupResponse(Instrumentor.java:135)
	at com.sun.tools.profiler.ProfilerClient.instrumentMethodGroupFollowUp
(ProfilerClient.java:881)
	at com.sun.tools.profiler.ProfilerClient.access$2800
(ProfilerClient.java:46)
[catch] at com.sun.tools.profiler.ProfilerClient$SeparateCmdExecutionThread.run
(ProfilerClient.java:1565)
Comment 1 iformanek 2005-11-30 12:52:29 UTC
This happened to Radim while profiling NetBeans IDE
Comment 2 iformanek 2005-11-30 12:52:54 UTC
This happened to Radim while profiling NetBeans IDE
Comment 3 iformanek 2005-11-30 12:53:48 UTC
Created attachment 27431 [details]
IDE log
Comment 4 Maros Sandor 2006-01-30 15:41:22 UTC
It happened to be when I was profiling the IDE. It froze, so the dialog popped
up saying that the target app is frozen, I chose not to stop profiling. After a
while I killed the profiled IDE => exception.
Comment 5 ehucka 2006-07-11 09:33:52 UTC
Appears when I modified profiling from object liveness to object allocation of a
web application.
Comment 6 ehucka 2006-07-11 09:35:23 UTC
Profiler 5.5 log:

*** Profiler error (Tue Jul 11 10:30:08 CEST 2006): in getMonitoredData(),
caught exception:
com.sun.tools.profiler.client.ClientUtils$TargetAppOrVMTerminated: Target JVM
inactive
*** Profiler warning (Tue Jul 11 10:30:08 CEST 2006): class
org/apache/juli/ClassLoaderLogManager, ldr = 0 not found anywhere
*********** Exception occurred ************ at 10:30 AM on Jul 11, 2006
java.lang.NullPointerException
com.sun.tools.profiler.classfile.ClassRepository.tryLoadRealClass(ClassRepository.java:191)
com.sun.tools.profiler.classfile.ClassRepository.lookupClass(ClassRepository.java:170)
com.sun.tools.profiler.classfile.ClassRepository.lookupClass(ClassRepository.java:117)
com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName(ClassManager.java:43)
com.sun.tools.profiler.instrumentation.MemoryProfMethodInstrumentor.findAndMarkMethodsToInstrumentInClass(MemoryProfMethodInstrumentor.java:90)
com.sun.tools.profiler.instrumentation.MemoryProfMethodInstrumentor.getInitialMethodsToInstrument(MemoryProfMethodInstrumentor.java:63)
com.sun.tools.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponseForMemoryProfiling(Instrumentor.java:430)
com.sun.tools.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponse(Instrumentor.java:89)
com.sun.tools.profiler.ProfilerClient.instrumentMethodGroupFromRoot(ProfilerClient.java:868)
com.sun.tools.profiler.ProfilerClient.access$2800(ProfilerClient.java:46)
com.sun.tools.profiler.ProfilerClient$SeparateCmdExecutionThread.run(ProfilerClient.java:1582)
Comment 7 J Bachorik 2006-08-08 14:06:35 UTC
Probably thanks to race conditions in the JFluid communication protocol the
engine tries to load a class before ProfilerClient calls its setVMProperties,
initializing the search classpath, thus accessing not initialized classPath
property.
The fix is only a workaround for the syndrom - NPE. Now the classpath is is
checked before used by the engine.