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

Bug 191809

Summary: Many NullPointerException during CG profiling.
Product: z_Archived Reporter: Viacheslav <viacheslav.g.rybalov>
Component: TPTPAssignee: Alexander N. Alexeev <analexee>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: ewchan, guru.nagarajan, haggarty, jkubasta, sluiman, szabadosk
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Bug Depends on: 196013, 196198    
Bug Blocks:    
Attachments:
Description Flags
Eclipse log file
none
patch none

Description Viacheslav CLA 2007-06-09 06:54:07 EDT
While I was trying JVMTI Execution Time Analysis profiling I got many NullPointerException exceptions in workbench. See attached log file. These exceptions did not block profiling and I  was able to continue it after closing exceptions windows, bit it was annoying.
I used the letest driver TPTP-4.4.0-200706070100, sun jre, Java2Demo (from jdk)application. I used 'Attach to Agent' configuration.
Comment 1 Viacheslav CLA 2007-06-09 06:57:06 EDT
Created attachment 70768 [details]
Eclipse log file
Comment 2 Guru Nagarajan CLA 2007-06-10 01:12:33 EDT
ALexander,  
  Pls investigate this issue. Given that it is not hurting the profiling - this is not a stop ship defect, but must be addressed right after the release.
Comment 3 Asaf Yaffe CLA 2007-06-25 09:50:12 EDT
I encountered this bug again with the tptp.runtime-TPTP-4.4.0-200706140100C build. It happened after pausing and resuming the CG Profiler.
Comment 4 Valentina Popescu CLA 2007-06-25 10:21:26 EDT
Eugene, can you please investigate this. At the minimum, the UI should be able to fail nicely. 
Marking this for 4.4.0.1 until somebody investigates the root cause; probably incomplete data sent to the loaders. In any case, this should be marked as a regression since JVMTI is the default option in 4.4
Comment 5 Guru Nagarajan CLA 2007-06-25 19:41:20 EDT
Added sizing
Comment 6 Valentina Popescu CLA 2007-06-26 10:47:03 EDT
Having the estimated work for this defect and the fact that this is not a blocking issue I am moving the defect to 4.4.1
Comment 7 Eugene Chan CLA 2007-06-26 13:39:59 EDT
Created attachment 72502 [details]
patch

I cannot consistently reproduce the problem in the C build, but by looking in the exception. It looks like there is null package loaded in a Class element. The failure happens at 
   return ((TRCClass)element).getPackage();		

The patch here is making sure any exception is handled and return an expected value on failure.
Comment 8 Eugene Chan CLA 2007-07-11 12:32:41 EDT
*** Bug 187889 has been marked as a duplicate of this bug. ***
Comment 9 Eugene Chan CLA 2007-07-11 12:33:28 EDT
Raise bug to critical as a dup of bug 187889.
Comment 10 Eugene Chan CLA 2007-07-15 19:30:16 EDT
*** Bug 196534 has been marked as a duplicate of this bug. ***
Comment 11 Alexander N. Alexeev CLA 2007-07-16 16:29:04 EDT
The cause of this defect is related to Bug 196013 and Bug 196198. "Unknown" method can't return valid reference to own class.
This bug should be resolved jointly with Bug 196013 and Bug 196198.   
Comment 12 Guru Nagarajan CLA 2007-07-19 10:56:29 EDT
I recommend that the attached Patch be not applied until  196198 is resolved.
The patch is essentially suppressing the exception.

Once patch  196198 is resolved then we ought to test to see if we still get the exceptions and apply this to ensure we have not masked any unknown exceptions.
Comment 13 Alexander N. Alexeev CLA 2007-08-29 09:42:32 EDT
Isn't reproduced at TPTP 4.4.1-200708280100
Comment 14 Guru Nagarajan CLA 2007-08-29 10:46:15 EDT
Per Alex
Comment 15 Paul Slauenwhite CLA 2009-06-30 13:59:28 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.