Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 207054

Summary: When profiling junit cases using CBE, exceptions thrown
Product: z_Archived Reporter: Richard Y.S. HUANG <huangys>
Component: TPTPAssignee: Richard Y.S. HUANG <huangys>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: apnan
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460

Description Richard Y.S. HUANG CLA 2007-10-22 09:54:56 EDT
java.lang.NullPointerException
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.InstrumentEventHelpers.getMethodParamInfo(InstrumentEventHelpers.java:42)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.CbeDataMapping.<init>(CbeDataMapping.java:43)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.CbeInstrument.handleEvent(CbeInstrument.java:170)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.CbeInstrument.handleMethodEntryEvent(CbeInstrument.java:101)
	at CbeProbe_probe$Probe_0._entry(CbeProbe_probe.java:29)
	at junit.framework.Assert.assertNotNull(Assert.java)
	at junit.framework.Assert.assertNotNull(Assert.java:210)
	at junit.framework.TestCase.runTest(TestCase.java:148)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


If using CBE to profile a method which has an Object array parameter, ClassCastException will be also thrown:

	java.lang.ClassCastException: [Ljava.lang.Integer;
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.InstrumentEventHelpers.setSimpleValue(InstrumentEventHelpers.java:142)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.InstrumentEventHelpers.appendChildExtendedDataElement(InstrumentEventHelpers.java:103)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.InstrumentEventHelpers.convertObjectsToExtenedDataElement(InstrumentEventHelpers.java:82)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.CbeInstrument.handleEvent(CbeInstrument.java:190)
	at org.eclipse.tptp.monitoring.instrumentation.internal.cbe.model.CbeInstrument.handleMethodEntryEvent(CbeInstrument.java:101)
	at CbeProbe_probe$Probe_0._entry(CbeProbe_probe.java:29)
	at net.test.MyClass1.countQueryResults(MyClass1.java)
	at net.test.MyClassTest.testCountQueryResults(MyClassTest.java:53)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Comment 1 Alex Nan CLA 2007-10-31 17:07:40 EDT
Targetting to 4.5 i2. Please add sizing.
Comment 2 Alex Nan CLA 2007-10-31 21:50:41 EDT
Richar please mark the defect as being fixed, I didn't know you've already fixed it.
Comment 3 Richard Y.S. HUANG CLA 2007-10-31 22:44:14 EDT
fixed in 4.5 i1, and verified in the build TPTP-4.5.0-200710260400
Comment 4 Alex Nan CLA 2007-11-07 21:47:24 EST
i1 shifted to i3, updating target accordingly.
Comment 5 Paul Slauenwhite CLA 2009-06-30 12:15:47 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.