Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 139853 - NPE in asynch tree viewer
Summary: NPE in asynch tree viewer
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P1 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Samantha Chan CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 139508 139512 139548 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-02 17:31 EDT by Samantha Chan CLA
Modified: 2006-05-04 16:54 EDT (History)
4 users (show)

See Also:


Attachments
screen shot (15.02 KB, image/jpeg)
2006-05-02 17:32 EDT, Samantha Chan CLA
no flags Details
. (1.22 KB, patch)
2006-05-03 12:44 EDT, Kevin Barnes CLA
no flags Details | Diff
patch (887 bytes, patch)
2006-05-03 18:13 EDT, Kevin Barnes CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samantha Chan CLA 2006-05-02 17:31:23 EDT
1.  make sure the variables view is hidden (e.g. covered by breakpoints view) when before shutting down.  Shut down workbench.
2.  start workbench
3.  start java debug session
4.  suspend something and select stackframe
5.  bring the variables view to the top

The variables view would show up empty.  There is a big grey bar at the top (looks like column header).  Selecting a thread and back to the stackframe will populate the view.

I will attach screen capture.

Found this in the log:
java.lang.NullPointerException
	at org.eclipse.debug.internal.ui.viewers.AsynchronousTreeViewer$5.paintControl(AsynchronousTreeViewer.java:634)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:83)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1094)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.java:2012)
	at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite.java:576)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1415)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3787)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5242)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1128)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1424)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2833)
	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:143)
	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(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	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 1 Samantha Chan CLA 2006-05-02 17:32:05 EDT
Created attachment 40135 [details]
screen shot
Comment 2 Darin Wright CLA 2006-05-02 21:57:40 EDT
getVisibleColumns() can return null. This needs to be fixed for RC3.

CC'ing Markus for approval.
Comment 3 Darin Wright CLA 2006-05-02 23:13:35 EDT
*** Bug 139508 has been marked as a duplicate of this bug. ***
Comment 4 Darin Wright CLA 2006-05-02 23:15:48 EDT
*** Bug 139548 has been marked as a duplicate of this bug. ***
Comment 5 Markus Keller CLA 2006-05-03 05:40:22 EDT
+1 for 3.2 RC3.
Comment 6 Darin Wright CLA 2006-05-03 10:06:34 EDT
*** Bug 139512 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Barnes CLA 2006-05-03 12:44:50 EDT
Created attachment 40258 [details]
.
Comment 8 Darin Wright CLA 2006-05-03 15:07:47 EDT
Patch fixes the NPE, but the view is still empty. It appears we're not getting the set data callbacks in this case.
Comment 9 Darin Wright CLA 2006-05-03 16:46:41 EDT
Filed bug 140077 for missing callbacks.
Comment 10 Darin Wright CLA 2006-05-03 16:48:25 EDT
Applied our patch to head to avoid NPE.
Comment 11 Kevin Barnes CLA 2006-05-03 18:13:35 EDT
Created attachment 40310 [details]
patch

patch sets column width on each column to be 1 when the column is created. If all columns have 0 width we never get a paint event on GTK and initColumns is never called so our columns stay 0 pixels wide.

This is a workaround to bug 140077
Comment 12 Darin Wright CLA 2006-05-03 18:42:56 EDT
+1 to patch.
Comment 13 Kevin Barnes CLA 2006-05-03 18:44:52 EDT
released patch to HEAD
Comment 14 Kevin Barnes CLA 2006-05-03 18:45:15 EDT
Sam, please verify
Comment 15 Samantha Chan CLA 2006-05-04 16:54:46 EDT
verified.