Bug 36993 - Tracing options not displayed in Run-time Workbench run configuration
Summary: Tracing options not displayed in Run-time Workbench run configuration
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Christophe Cornu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 37797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-28 10:09 EDT by Jan Ploski CLA
Modified: 2003-06-19 10:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ploski CLA 2003-04-28 10:09:14 EDT
This report is against the I20030422 build - regression vs 2.1 stable.

When I open the "Run..." window, the following exception is logged:

java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:2325)
	at org.eclipse.swt.SWT.error(SWT.java:2269)
	at org.eclipse.swt.graphics.Image.init(Image.java:716)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:156)
	at org.eclipse.swt.custom.TableTreeItem.<init>(TableTreeItem.java:186)
	at org.eclipse.swt.custom.TableTreeItem.<init>(TableTreeItem.java:98)
	at org.eclipse.ui.views.properties.PropertySheetViewer.createItem(PropertySheetViewer.java:327)
	at org.eclipse.ui.views.properties.PropertySheetViewer.updateChildrenOf(PropertySheetViewer.java:1030)
	at org.eclipse.ui.views.properties.PropertySheetViewer.access$2(PropertySheetViewer.java:956)
	at org.eclipse.ui.views.properties.PropertySheetViewer$2.childEntriesChanged(PropertySheetViewer.java:292)
	at org.eclipse.ui.views.properties.PropertySheetEntry.fireChildEntriesChanged(PropertySheetEntry.java:245)
	at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:460)
	at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:611)
	at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:776)
	at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:377)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.pluginSelected(TracingLauncherTab.java:466)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.access$6(TracingLauncherTab.java:460)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab$6.selectionChanged(TracingLauncherTab.java:246)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1290)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1020)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.selectPlugin(TracingLauncherTab.java:357)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.doInitializeFrom(TracingLauncherTab.java:397)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.access$7(TracingLauncherTab.java:380)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab$7.run(TracingLauncherTab.java:375)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.pde.internal.ui.launcher.TracingLauncherTab.initializeFrom(TracingLauncherTab.java:373)
	at org.eclipse.pde.internal.ui.launcher.WorkbenchLauncherTabGroup$1.run(WorkbenchLauncherTabGroup.java:65)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.pde.internal.ui.launcher.WorkbenchLauncherTabGroup.initializeFrom(WorkbenchLauncherTabGroup.java:48)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayTabs(LaunchConfigurationTabGroupViewer.java:488)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:448)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:428)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:870)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$2.selectionChanged(LaunchConfigurationsDialog.java:641)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1290)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1020)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:362)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.doInitialTreeSelection(LaunchConfigurationsDialog.java:401)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.initializeContent(LaunchConfigurationsDialog.java:342)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.createContents(LaunchConfigurationsDialog.java:337)
	at org.eclipse.jface.window.Window.create(Window.java:302)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.create(LaunchConfigurationsDialog.java:1826)
	at org.eclipse.jface.window.Window.open(Window.java:552)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.openDialogOnSelection(LaunchConfigurationsDialog.java:504)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:458)
	at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:369)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:373)
	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:315)
	at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:72)
	at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:90)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:263)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:207)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:526)
	at org.eclipse.jface.action.ActionContributionItem.access$4(ActionContributionItem.java:480)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:924)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1699)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1491)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	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.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)

Thereafter, when I select the "Tracing" tab for in a run-time worbench configuration
in the opened window, the tracing options list stays empty, no matter what plugin
I select.

Opening the same workspace with 2.1 stable shows all tracing options as expected
and no exception is reported.
Comment 1 Dejan Glozic CLA 2003-04-28 10:13:26 EDT
We didn't change one line from 2.1 in PDE space, so I will move this report to 
PLatform UI first. If this turns out to be a SWT problem, please move further 
accordingly.
Comment 2 Debbie Wilson CLA 2003-04-28 13:54:20 EDT
org.eclipse.ui.views.properties hasn't changed since 2.1 either.  Passing onto 
swt.

Comment 3 Steve Northover CLA 2003-04-29 10:00:41 EDT
Chrix, please get to the bottom of the ASAP.
Comment 4 Christophe Cornu CLA 2003-04-29 12:03:32 EDT
I have not been able to reproduce on RH 8 GTk2.0.6. 
Which linux distribution, GTK version and locale are you using? (to get the
locale: type in locale from a shell). We will try to reproduce it.

Thanks,
Chris

The regression could be in the SWT GTK Table.getItemHeight.
The value h[0] should not be <=0 but it seems to be on your machine.

public int getItemHeight () {
	checkWidget();
	if (itemCount == 0) {
		int column = OS.gtk_tree_view_get_column (handle, 0);
		int list = OS.gtk_tree_view_column_get_cell_renderers (column);
		int length = OS.g_list_length (list);
		int renderer = OS.g_list_nth_data (list, length - 1);
		OS.g_list_free (list);
		int [] w = new int [1], h = new int [1];
		OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, w, h);
                if (h[0] <= 0) System.out.println("BUG! "+h[0]);
		return h [0];
	}
	GdkRectangle rect = new GdkRectangle ();
	int path = OS.gtk_tree_path_new_first ();
	OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
	OS.gtk_tree_path_free (path);
	return rect.height;
}
Comment 5 Jan Ploski CLA 2003-04-29 14:48:29 EDT
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

GTK 2.2.1-4 from Debian unstable.

I can easily reproduce it in the normal, top-level workbench. Let me check if I can also trigger the problem in a run-time workbench in debugging mode.
Comment 6 Jan Ploski CLA 2003-04-29 15:58:37 EDT
Here are the results of my debugging session:
1. In Table.java:763 itemCount == 1, so it's not entering the branch with h[0]
as you supposed.
2. After the call to gtk_tree_view_get_cell_area, rect is still (0, 0, 0, 0).
3. Therefore in TableTreeItem.java:186 itemHeight == 0
4. So the Image constructor fails.

Does it help? Anything else I can check? I don't know GTK myself, unfortunately.
Comment 7 Jan Ploski CLA 2003-04-29 16:34:53 EDT
I just ran the same debugging session under Eclipse 2.1 (on the same PC), which does
not throw the exception. The only difference seems to be that in Table.getItemHeight
the call to OS.gtk_tree_view_get_cell_area sets a non-zero dimension in the rectangle
object. The arguments for the call look much the same as in I20030422 (i.e. the handle
and path are both big, positive integers and differ).

So I guess you should check if OS.gtk_tree_view_get_cell_area has been touched
since 2.1.
Comment 8 Christophe Cornu CLA 2003-04-29 16:54:38 EDT
Ok, I can reproduce the problem with GTK 2.2.1.
Raising priority to P1.
Comment 9 Christophe Cornu CLA 2003-04-29 18:30:00 EDT
Fixed in version > 20030429

Thanks Jan for reporting this.
Comment 10 Christophe Cornu CLA 2003-06-19 10:16:58 EDT
*** Bug 37797 has been marked as a duplicate of this bug. ***