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

Bug 204322

Summary: Intermittently a NullPointerException when viewing db serialized correlations is thrown
Product: z_Archived Reporter: Alex Nan <apnan>
Component: TPTPAssignee: Alex Nan <apnan>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: jkubasta, slavescu
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Patch for bug 204322 none

Description Alex Nan CLA 2007-09-21 15:58:38 EDT
Create a time correlation using 2 db serailzied log files. Save the correlation. Restart the workbench. Open the correlation in the log interactions view. Not always but in some cases a NullPointerException is thrown and the correlation cannot be viewed. 

java.lang.NullPointerException
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.createLogGraphNode(LogInteractions.java:1660)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.generateGraphNodes(LogInteractions.java:1322)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$3.run(LogInteractions.java:1016)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.generateDiagram(LogInteractions.java:1012)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.createPage(LogInteractions.java:1535)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$2.run(LogInteractions.java:522)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.parseModel(LogInteractions.java:515)
Comment 1 Alex Nan CLA 2007-09-21 16:12:54 EDT
A similar problem happens when generating a time correlation from the log view, i.e open a db serialized log file in the log view, right click and choose Correlation by Time:
Caused by: java.lang.NullPointerException
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.createLogGraphNode(LogInteractions.java:1859)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.generateGraphNodes(LogInteractions.java:1322)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$3.run(LogInteractions.java:1016)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.generateDiagram(LogInteractions.java:1012)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions.createPage(LogInteractions.java:1535)
Comment 2 Alex Nan CLA 2008-02-15 15:06:35 EST
In 4.5 i5 the following exception occurrs:
 java.lang.NullPointerException
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.createLogGraphNode(LogInteractions.java:2144)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.generateGraphNodes(LogInteractions.java:1607)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$3.run(LogInteractions.java:1301)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.generateDiagram(LogInteractions.java:1297)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.createPage(LogInteractions.java:1820)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$2.run(LogInteractions.java:807)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)

Note that due to the refactoring work the line of code that fails has changed.
The root cause of the problem is the fact that some CBEs don't have the parent (TRCAgent) set when loaded from the db.
Comment 3 Alex Nan CLA 2008-02-15 15:14:14 EST
When opening the log interactions view from a monitor or host level the following exception occurrs sometimes:
NullPointerException
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.createLogGraphNode(LogInteractions.java:2026)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.generateGraphNodes(LogInteractions.java:1607)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$3.run(LogInteractions.java:1301)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.generateDiagram(LogInteractions.java:1297)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$Implementation.createPage(LogInteractions.java:1820)
	at org.eclipse.hyades.sd.logc.internal.loader.LogInteractions$2.run(LogInteractions.java:807)
Comment 4 Alex Nan CLA 2008-03-07 20:07:51 EST
Created attachment 91950 [details]
Patch for bug 204322

Attaching patch for bug 204322.
Comment 5 Alex Nan CLA 2008-03-07 20:08:09 EST
Fixed.
Comment 6 Alex Nan CLA 2008-06-12 11:58:20 EDT
Verified with TPTP-4.5.0-200806050915.
Comment 7 Alex Nan CLA 2008-06-12 11:58:35 EDT
Closing.