Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 59131 - [GlobalActions] "SWTError: Cannot set text" causes crash
Summary: [GlobalActions] "SWTError: Cannot set text" causes crash
Status: RESOLVED DUPLICATE of bug 30954
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-19 15:41 EDT by Troy Bishop CLA
Modified: 2004-04-20 16:09 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 Troy Bishop CLA 2004-04-19 15:41:26 EDT
This problem is being reported by a WSAD customer using v5.1.0 (Eclipse v2.1.1)
and is not reproducible and unfortunately there is no more information than what
is in this report.  When the user tried to right-click on a file in the package
explorer to bring up the context menu, it eventually crashed WSAD and the
following entry was found in the .log:

!MESSAGE Cannot set text
!STACK 0
org.eclipse.swt.SWTError: Cannot set text
	at java.lang.Throwable.<init>(Throwable.java)
	at java.lang.Throwable.<init>(Throwable.java)
	at org.eclipse.swt.SWTError.<init>(SWTError.java:82)
	at org.eclipse.swt.SWTError.<init>(SWTError.java:71)
	at org.eclipse.swt.SWT.error(SWT.java:2358)
	at org.eclipse.swt.SWT.error(SWT.java:2262)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:385)
	at org.eclipse.swt.widgets.MenuItem.setText(MenuItem.java)
	at
org.eclipse.jface.action.ActionContributionItem.update(ActionContributionItem.java)
	at
org.eclipse.jface.action.ActionContributionItem.fill(ActionContributionItem.java:302)
	at org.eclipse.jface.action.MenuManager.update(MenuManager.java)
	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:337)
	at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:333)
	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:345)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java)
	at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:3147)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java)
	at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:218)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java)
	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:858)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:207)
	at java.lang.reflect.Method.invoke(Method.java:271)
	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)

Is there anything that can be done to prevent this from happening in the future?
 At the minimum I would think that Eclipse/WSAD should not crash.
Comment 1 Dirk Baeumer CLA 2004-04-20 04:19:05 EDT
I doubt that this stack trace can crash the VM unless there is a bug in the 
VM. Troy, if this happens again can then the customer please provide the VM 
dump of the crashed VM.

Moving to Pltform/UI since the exception is generated in Platform/Code.
Comment 2 Nick Edgar CLA 2004-04-20 11:59:33 EDT
Not sure what can cause this to happen.  Moving to SWT for comment.
Comment 3 Grant Gayed CLA 2004-04-20 14:24:59 EDT
msdn does not give any useful information w.r.t. what could cause 
SetMenuItemInfo to fail.  I've never seen this reported before, and cannot make 
a small snippet fail regardless of how bogus I set its text and accelerator to 
be.  SN any ideas?
Comment 4 Steve Northover CLA 2004-04-20 16:09:59 EDT
The operating system is failing, possibly out of memory.

*** This bug has been marked as a duplicate of 30954 ***