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

Bug 168356

Summary: Info: "Error occurred while constructing search page for https://www.limewire.org/jira [jira]" in org.eclipse.mylar.core
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: ekuleshov
Version: unspecifiedKeywords: helpwanted
Target Milestone: 1.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screenshot of search dialog
none
Patch that disposes controls
none
mylar/context/zip none

Description Steffen Pingel CLA 2006-12-17 12:51:25 EST
The search page (Search -> Search -> Task Search) fails if repository configuration is not cached and a network connection can not be established. Since JiraQueryPage.createControl() is not executed completly setControl() is not invoked and the layout of the search page is corrupted (some of the Jira controls remain if a different repository is selected).

-- Error Log --
Date: Sun Dec 17 12:42:08 EST 2006
Message: Error occurred while constructing search page for https://www.limewire.org/jira [jira]
Severity: Info
Plugin ID: org.eclipse.mylar.core
Stack Trace:
org.tigris.jira.core.service.exceptions.ServiceUnavailableException: www.limewire.org
at org.tigris.jira.internal.core.service.soap.SoapJiraService$StandardLoginToken.getCurrentValue(SoapJiraService.java:575)
at org.tigris.jira.internal.core.service.soap.SoapJiraService.getServerInfo(SoapJiraService.java:159)
at org.tigris.jira.core.service.CachedRpcJiraServer.initializeServerInfo(CachedRpcJiraServer.java:409)
at org.tigris.jira.core.service.CachedRpcJiraServer.getServerInfo(CachedRpcJiraServer.java:458)
at org.tigris.jira.core.service.CachedRpcJiraServer.initializeProjects(CachedRpcJiraServer.java:192)
at org.tigris.jira.core.service.CachedRpcJiraServer.getProjects(CachedRpcJiraServer.java:234)
at org.eclipse.mylar.internal.jira.core.ui.wizards.JiraQueryPage$23.getElements(JiraQueryPage.java:824)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:936)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:870)
at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:993)
at org.eclipse.jface.viewers.AbstractListViewer.inputChanged(AbstractListViewer.java:336)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1570)
at org.eclipse.mylar.internal.jira.core.ui.wizards.JiraQueryPage.createProjectsViewer(JiraQueryPage.java:844)
at org.eclipse.mylar.internal.jira.core.ui.wizards.JiraQueryPage.createControl(JiraQueryPage.java:243)
at org.eclipse.mylar.internal.tasks.ui.TaskSearchPage.createPage(TaskSearchPage.java:126)
at org.eclipse.mylar.internal.tasks.ui.TaskSearchPage.displayQueryPage(TaskSearchPage.java:184)
at org.eclipse.mylar.internal.tasks.ui.TaskSearchPage.setVisible(TaskSearchPage.java:249)
at org.eclipse.search.internal.ui.SearchDialog.turnToPage(SearchDialog.java:520)
at org.eclipse.search.internal.ui.SearchDialog.access$1(SearchDialog.java:494)
at org.eclipse.search.internal.ui.SearchDialog$7.widgetSelected(SearchDialog.java:402)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1097)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3226)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2898)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:54)
at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:45)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1097)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3226)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2898)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1945)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:425)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
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 org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:522)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:147)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:170)
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 org.eclipse.core.launcher.Main.invokeFramework(Main.java:339)
at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
at org.eclipse.core.launcher.Main.run(Main.java:984)
at org.eclipse.core.launcher.Main.main(Main.java:959)
Comment 1 Steffen Pingel CLA 2006-12-17 12:52:28 EST
Created attachment 55834 [details]
Screenshot of search dialog
Comment 2 Mik Kersten CLA 2006-12-18 21:26:32 EST
Yes, the dialog is currently fragile to a connector failing to load it (bug 165733).

Marking helpwanted for now, see "Support Expectations" at: http://www.eclipse.org/mylar/users.php
Comment 3 Steffen Pingel CLA 2006-12-19 20:07:05 EST
Moving the setControl() call doesn't work. Unfortunately there doesn't seem to be an easy fix for the layout corruption. 
Comment 4 Eugene Kuleshov CLA 2006-12-19 20:29:40 EST
I wonder if we can wrap the whole JIRA page into try catch block for now and set control to some dummy panel if it throw an exception
Comment 5 Steffen Pingel CLA 2006-12-19 20:37:14 EST
I think we would need to dispose all controls that have been created up to the point where the exception is raised, (i.e. iterate over all children of parent). Adding a dummy control then and disabling the Search button should work.
Comment 6 Eugene Kuleshov CLA 2006-12-19 21:32:12 EST
Don't think disposing is needed, because those controls will be disposed on regular page disposal anyways.
Comment 7 Steffen Pingel CLA 2006-12-19 22:09:44 EST
Created attachment 55934 [details]
Patch that disposes controls

Possibly not the cleanest approach but it might be good enough as a workaround for now.
Comment 8 Steffen Pingel CLA 2006-12-19 22:09:47 EST
Created attachment 55935 [details]
mylar/context/zip
Comment 9 Mik Kersten CLA 2006-12-20 17:58:21 EST
Patch applied and verified, nice work Steffen.  I tested by killing my connection during a settings update, and the result was a nicely formatted error link, with all of the other pages rendering correctly.  So as far as my testing checked, you have also resolved bug 165733 with this fix.
Comment 10 Mik Kersten CLA 2006-12-20 18:00:19 EST
*** Bug 165733 has been marked as a duplicate of this bug. ***
Comment 11 Steffen Pingel CLA 2006-12-20 18:30:53 EST
The problem with the patch is that connectors need to invoke setControl() before the exception occurs otherwise the widget can not be disposed. 

I was thinking of adding a another Composite and use that as the parent widget that is passed to searchPage.createControl(). I could not get it to layout correctly on the first attempt but I think we should fix that for the next milestone. The Eclipse SearchDialog class uses such a wrapper Composite to make the dialog robust against failures of search pages.
Comment 12 Mik Kersten CLA 2006-12-20 20:42:47 EST
Good idea.  I suggest reopening bug 165733 for that, as it is already assigned to you.  But yes, let's hold off until post 1.0.1 for that change.