Bug 115411 - [Restor Viewer State] Error
Summary: [Restor Viewer State] Error
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.2   Edit
Assignee: Kevin Barnes CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
: 121769 125097 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-07 21:14 EST by Shoji Ueda CLA Friend
Modified: 2006-01-24 21:40 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shoji Ueda CLA Friend 2005-11-07 21:14:22 EST
Hi There,

I am using Eclipse 3.1.1 cdt3.1 on Windows XP and running x86 gdb by cdt.

I open [register tag] Main view and look at the eax register and set a number to
eax register, and  select a variable tag, and see some variables, then after it, once again open register 
tag, then [Restor Viewer State] Error is happend with following .log file.


!ENTRY org.eclipse.ui 4 4 2005-11-08 10:30:46.859
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-11-08 10:30:46.859
!MESSAGE Failed to execute runnable (java.lang.NullPointerException)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:2942)
	at org.eclipse.swt.SWT.error(SWT.java:2865)
	at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
	at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
	at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
	at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.
java:226)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	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:324)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)
Caused by: java.lang.NullPointerException
	at
org.eclipse.debug.internal.ui.views.registers.RegistersViewerState.decodePat
h(RegistersViewerState.java:77)
	at
org.eclipse.debug.internal.ui.views.AbstractViewerState.restoreState(Abstrac
tViewerState.java:145)
	at
org.eclipse.debug.internal.ui.views.variables.VariablesView.restoreState(Var
iablesView.java:420)
	at
org.eclipse.debug.internal.ui.views.variables.VariablesView$1.treeUpdated(Va
riablesView.java:557)
	at
org.eclipse.debug.internal.ui.views.variables.VariablesViewer.restoreExpansi
onState(VariablesViewer.java:116)
	at
org.eclipse.debug.internal.ui.views.variables.VariablesViewer$StateRestorati
onJob.runInUIThread(VariablesViewer.java:53)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	... 18 more
Comment 1 Nobody - feel free to take it CLA Friend 2005-11-08 14:51:42 EST
null is a possible return value of the "getCurrentChildren" method 
of "RemoteTreeViewer". But there is no check for null 
in "RegitersViewerState.decodePath".
Comment 2 Darin Wright CLA Friend 2005-11-09 09:52:58 EST
Not sure if the same implementation will exist in 3.2 with the re-write of the 
debug viewers.
Comment 3 Nobody - feel free to take it CLA Friend 2005-11-09 11:17:55 EST
Is it possible to fix it in the 3.0.x branch?
Comment 4 Kevin Barnes CLA Friend 2005-11-09 11:36:14 EST
Did you mean 3.1.x branch? There are no builds scheduled for branch 3.0.x branch.
Comment 5 Nobody - feel free to take it CLA Friend 2005-11-09 12:30:25 EST
(In reply to comment #4)
> Did you mean 3.1.x branch? There are no builds scheduled for branch 3.0.x 
branch.

Yes. Sorry for mistake.
Comment 6 Darin Wright CLA Friend 2005-11-09 15:37:36 EST
Marking as 3.1.2.
Comment 7 Shoji Ueda CLA Friend 2005-11-09 18:11:04 EST
Thank for fixing my issue.
Comment 8 Darin Wright CLA Friend 2005-11-30 14:30:56 EST
Added simple null checks. Fixed in ViewerState and RegistersViewerState in 3.1.2 branch.
Comment 9 Darin Wright CLA Friend 2005-11-30 14:31:15 EST
Please verify, Kevin.
Comment 10 Nobody - feel free to take it CLA Friend 2005-11-30 14:51:30 EST
(In reply to comment #8)
> Added simple null checks. Fixed in ViewerState and RegistersViewerState in
> 3.1.2 branch.

Darin, 
It's probably not important, but the null check you have added to ViewerState is redundant. There is another null check a couple of lines above. 
Only RegistersViewerState needs a null check.
Comment 11 Kevin Barnes CLA Friend 2005-12-05 10:16:00 EST
verified
Comment 12 Nobody - feel free to take it CLA Friend 2005-12-21 15:58:36 EST
*** Bug 121769 has been marked as a duplicate of this bug. ***
Comment 13 Darin Wright CLA Friend 2006-01-24 21:40:56 EST
*** Bug 125097 has been marked as a duplicate of this bug. ***