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

Bug 166543

Summary: Reimport the same log causes a new root_internal correlation getting created
Product: z_Archived Reporter: Jane Fang <janefang>
Component: TPTPAssignee: Rohit Shetty <rohit.shetty>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: apnan, ewchan, jkubasta, labadie
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: apnan: review+
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
cbe log
none
Patch for this defect
none
Updated patch none

Description Jane Fang CLA 2006-12-01 14:43:44 EST
1. import the log attached
2. go to Log Navigator view, expand Correlations node, there is an internal correlation created
3. reimport the same log, when asked choose replace
4. another internal correlation gets created
Comment 1 Jane Fang CLA 2006-12-01 14:54:05 EST
open the first internal correlation with Log View, a NPE gets thrown

!ENTRY org.eclipse.ui.workbench 4 2 2006-12-01 14:50:15.585
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:253)
	at org.eclipse.ui.actions.SelectionListenerAction.computeResources(SelectionListenerAction.java:143)
	at org.eclipse.ui.actions.SelectionListenerAction.getSelectedResources(SelectionListenerAction.java:227)
	at org.eclipse.ui.actions.BuildAction.getProjectsToBuild(BuildAction.java:151)
	at org.eclipse.ui.actions.BuildAction.updateSelection(BuildAction.java:298)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:124)
	at org.eclipse.ui.actions.BuildAction.isEnabled(BuildAction.java:202)
	at org.eclipse.ui.actions.RetargetAction.setActionHandler(RetargetAction.java:272)
	at org.eclipse.ui.internal.ide.actions.RetargetActionWithDefault.setActionHandler(RetargetActionWithDefault.java:47)
	at org.eclipse.ui.actions.RetargetAction.partActivated(RetargetAction.java:154)
	at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:843)
	at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:57)
	at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:70)
	at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:73)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:171)
	at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:124)
	at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115)
	at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48)
	at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:843)
	at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)
	at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111)
	at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:116)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:165)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56)
	at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3207)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:588)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1008)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:982)
	at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:968)
	at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.java:3514)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3511)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3487)
	at org.eclipse.tptp.platform.log.views.internal.actions.OpenLogViewAction.openView(OpenLogViewAction.java:54)
	at org.eclipse.tptp.platform.log.views.internal.actions.OpenLogViewAction.run(OpenLogViewAction.java:77)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 2 Jane Fang CLA 2006-12-01 14:54:34 EST
Created attachment 54921 [details]
cbe log
Comment 3 Jane Fang CLA 2006-12-01 14:57:15 EST
Corretion on comment #1

Open the log inside the first internal correlation, a NPE gets thrown. The correlation itself is openable.
Comment 4 Eugene Chan CLA 2006-12-01 15:02:47 EST
Reimport does not replace any existing correlation, but instead create new one. 
Comment 5 Alex Nan CLA 2007-01-12 20:21:31 EST
Rough estimate: 28h.
Comment 6 Eric Labadie CLA 2007-08-09 15:59:34 EDT
This is required from AC perspective.
Comment 7 Alex Nan CLA 2008-05-07 12:37:55 EDT
Reassigning to i8.
Comment 8 Alex Nan CLA 2008-05-07 12:40:20 EDT
Sorry, this cannot be contained in 4.5. Picked the wrong defect. Targetting to future.
Comment 9 Alex Nan CLA 2008-05-08 16:41:55 EDT
Rohit, Eric mentioned that this defect migh be important. I am reassigning to i8. Can you please work with Jane and see what exactly is broken here?
Thanks.
Comment 10 Alex Nan CLA 2008-05-08 16:42:39 EDT
Need to determine whether this is important for 4.5 i8 or not.
Comment 11 Rohit Shetty CLA 2008-05-12 17:07:38 EDT
Created attachment 99819 [details]
Patch for this defect
Comment 12 Alex Nan CLA 2008-05-13 19:20:39 EDT
Created attachment 100084 [details]
Updated patch

Attaching updated patch. When saving the correlation opening it in the log interactions view, closing the workbench restaring, reimporting and appending ot ht eexisting file a NullPinterExcepion was thrown and an error dialog was displayed in th eimport log wizard. I've handled that case.
I haven't noticed any other problems. Everything works on XMI. On large log the correlation is not serialized in the db, but that's another problem.
Comment 13 Alex Nan CLA 2008-05-14 12:32:09 EDT
PMC approved and committed to CVS.
Comment 14 Paul Slauenwhite CLA 2009-06-30 13:20:22 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.