Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339920 - Show References tree expansion for Watch Expressions View not refreshed correctly when switching between stackframes
Summary: Show References tree expansion for Watch Expressions View not refreshed corre...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 12:44 EDT by lilywang CLA
Modified: 2020-03-04 05:27 EST (History)
2 users (show)

See Also:


Attachments
Fix attempt. (1.63 KB, patch)
2011-03-15 01:13 EDT, Pawel Piech CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lilywang CLA 2011-03-14 12:44:23 EDT
Build Identifier: 3.6.2.r362

When Show References is enabled for the Expressions view, and a watched expression's reference tree is expanded, switch to another stack frame where the evaluation of the expression will result in error. The expansion of the reference tree is still visible, and clicking on the expansion will result in error being thrown.

Reproducible: Always

Steps to Reproduce:
1. Start a Java Application debug session
2. Add an watch on a object
3. Turn on show reference for the expressions view, and expand the reference tree for the object.
4. Switch focus to another stack frame where the expression would evaluate to error

Result: the expression will still show the reference tree under it.
Comment 1 lilywang CLA 2011-03-14 12:46:54 EDT
Error log when clicking on an expanded reference node where the expression evaluates to error:

!ENTRY org.eclipse.ui 4 0 2011-03-14 12:45:32.171
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Unknown Source)
	at org.eclipse.core.runtime.Assert.isNotNull(Unknown Source)
	at org.eclipse.jface.viewers.AbstractTreeViewer.getTreePathFromItem(AbstractTreeViewer.java:2870)
	at org.eclipse.debug.internal.ui.viewers.model.InternalTreeModelViewer.getTreePathFromItem(InternalTreeModelViewer.java:1844)
	at org.eclipse.debug.internal.ui.viewers.model.InternalTreeModelViewer.handleTreeCollapse(InternalTreeModelViewer.java:2464)
	at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeCollapsed(AbstractTreeViewer.java:1459)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Tree.wmNotifyChild(Unknown Source)
	at org.eclipse.swt.widgets.Control.wmNotify(Unknown Source)
	at org.eclipse.swt.widgets.Composite.wmNotify(Unknown Source)
	at org.eclipse.swt.widgets.Control.WM_NOTIFY(Unknown Source)
	at org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Unknown Source)
	at org.eclipse.swt.widgets.Tree.callWindowProc(Unknown Source)
	at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Unknown Source)
	at org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
	at org.eclipse.swt.widgets.Tree.windowProc(Unknown Source)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
	at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
	at org.eclipse.ui.internal.Workbench.access$4(Unknown Source)
	at org.eclipse.ui.internal.Workbench$7.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 2 Pawel Piech CLA 2011-03-15 01:13:24 EDT
Created attachment 191188 [details]
Fix attempt.

Seems like we need a null-check for the collapse/expand handlers (still need to verify behavior).
Comment 3 Pawel Piech CLA 2011-03-21 17:38:47 EDT
I updated, verified, and committed the fix to avoid the NPE.  I still see the invalid behavior which I think needs to be addressed in JDT content provider.
Comment 4 Eclipse Genie CLA 2020-03-04 05:27:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.