SWT Designers Hangs

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

SWT Designers Hangs

Postby geoffbeaumont » Mon Nov 10, 2003 2:09 pm

Any idea what could cause SWT Designer to hang when switching to the design view? Nothing appears in the log file and the rest of Eclipse remains responsive, but the only way to regain control of the editor is to close Eclipse and restart it.

The source code doesn't contain anything unusual - in fact it's the default SWT Application code generated by SWT Designer...

I'm running the following software versions:

Eclipse 2.1.2
SWT Designer 1.2.1, free version for Eclipse 2.1
SuSE Linux 9.0
Sun J2SDK 1.4.2
Geoff
geoffbeaumont
 
Posts: 4
Joined: Sun Nov 09, 2003 4:27 pm

Re: SWT Designers Hangs

Postby Eric Clayberg » Mon Nov 10, 2003 5:35 pm

geoffbeaumont wrote:Any idea what could cause SWT Designer to hang when switching to the design view?

No idea. Are you using Eclipse/GTK or Eclipse/Motif? We support GTK, but Motif support is still a bit flakey (although it shouldn't hang).

geoffbeaumont wrote:Eclipse 2.1.2
SWT Designer 1.2.1, free version for Eclipse 2.1
SuSE Linux 9.0
Sun J2SDK 1.4.2

We've only tried it with SuSE 8.x (which is the version listed as supported by Eclipse), so I don't know if that's an issue or not. Have you tried it with Eclipse 3.0 at all?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: SWT Designers Hangs

Postby geoffbeaumont » Wed Nov 12, 2003 4:38 pm

Eric Clayberg wrote:No idea. Are you using Eclipse/GTK or Eclipse/Motif? We support GTK, but Motif support is still a bit flakey (although it shouldn't hang).


It's the GTK version.

Eric Clayberg wrote:
geoffbeaumont wrote:Eclipse 2.1.2
SWT Designer 1.2.1, free version for Eclipse 2.1
SuSE Linux 9.0
Sun J2SDK 1.4.2

We've only tried it with SuSE 8.x (which is the version listed as supported by Eclipse), so I don't know if that's an issue or not. Have you tried it with Eclipse 3.0 at all?


Hoped I'd have time to test this tonight, will try to do it tomorrow and let you know.
Geoff
geoffbeaumont
 
Posts: 4
Joined: Sun Nov 09, 2003 4:27 pm

Postby cebarne2 » Thu Nov 13, 2003 7:27 am

I may be able to add some information to this thread...

I also have problems with the Designer hanging, and can reproduce it the following way in both Eclipse 2.1.1 and Eclipse 3.0M4 (Windows XP, Java 1.4.1_05, SWT-Designer Pro 1.2.1):

1) Create new SWT Project
2) Create new SWT application in project
3) Switch to design mode
4) Place GridLayout on the shell
5) Set the layout to 6 columns
6) Place a button on the shell
7) Change the buttons backgroun (or foreground) color to Red

Poof, something is locked-up. I can switch back to source-code mode and edit code, but I cannot change any properties in the design mode, and the background color property keeps the focus the whole time. Actually, I can keep changing this one property, having no affect in the preview window, and it never releases focus.

Here is an excerpt from the stack trace in the error log:

java.lang.IllegalArgumentException: Path must include project and resource name: /SWTClock
at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:55)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1398)
at org.eclipse.core.internal.resources.Container.getFolder(Container.java:129)
at com.swtdesigner.model.util.f.b(SourceFile:206)
at com.swtdesigner.model.util.f.a(SourceFile:158)
at com.swtdesigner.model.util.f.b(SourceFile:145)
at com.swtdesigner.model.util.f.a(SourceFile:125)
at com.swtdesigner.model.JavaInfo.b(SourceFile:611)
at com.swtdesigner.model.properties.ColorArgumentOfMethodProperty.a(SourceFile:80)
at com.swtdesigner.properties.editors.ColorPropertyEditor.a(SourceFile:30)
at com.swtdesigner.properties.editors.ColorPropertyEditor.g(SourceFile:125)
at com.swtdesigner.properties.editors.ColorPropertyEditor.f(SourceFile:166)
at com.swtdesigner.properties.table.PropertyTable.g(SourceFile:348)
at com.swtdesigner.properties.editors.ColorPropertyEditor.j(SourceFile:151)
at com.swtdesigner.properties.editors.ColorPropertyEditor$1.focusLost(SourceFile:23)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:108)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:871)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:856)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:664)
at com.swtdesigner.controls.CCombo.c(SourceFile:1146)
at com.swtdesigner.controls.o.handleEvent(SourceFile:87)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:871)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:1711)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:3534)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2917)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:2698)
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:603)
at org.eclipse.swt.widgets.Control.setFocus(Control.java:2003)
at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:438)
at org.eclipse.pde.internal.runtime.logview.LogView.setFocus(LogView.java:640)
at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.java:442)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1018)
at org.eclipse.core.runtime.Platform.run(Platform.java:461)

Let me know if I can provide any further information.

-Chad
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby geoffbeaumont » Fri Nov 14, 2003 4:35 pm

I've (finally) tried it with Eclipse 3 - it works. I'm not sure if all the plugins I'm looking at right now are available for 3 yet, but for now that'll do fine.

Unfortunately I can't get Eclipse to actually run the trivial app I've created. I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3024 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:112)
at Test2.main(Test2.java:23)

Test2.java line 23 is:
final Display display = new Display();
in the main() method.

I'm running the app from within Eclipse, so it should be taking care of the library dependencies - at a glance this looks like an internal SWT problem?

I notice the Eclipse guys are up to 3.0 M4 now (I'm running M1), so I'll try upgrading to that and see if it fixes it.

Cheers,
Geoff
geoffbeaumont
 
Posts: 4
Joined: Sun Nov 09, 2003 4:27 pm

Postby admin » Sun Nov 16, 2003 8:45 pm

We have fixed problem with "java.lang.IllegalArgumentException: Path must include project and resource name: /SWTClock" in latest beta.

"java.lang.UnsatisfiedLinkError" is common problem for all beginners with SWT. You should have SWT libraries (.so in Linux) in LD_LIBRARY_PATH. When Eclipse starts itself, it loads library from right place. But when you start your own SWT application, even it you do this from Eclipse, you should configure its location.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby geoffbeaumont » Thu Nov 20, 2003 2:27 pm

Thanks - that put me on the right track. I found this FAQ article on setting the library path when running apps from Eclipse:

http://dev.eclipse.org/viewcvs/index.cg ... standalone

The path given needs a bit of tweaking for Eclipse 3.0, but that's not exactly rocket science.
Geoff
geoffbeaumont
 
Posts: 4
Joined: Sun Nov 09, 2003 4:27 pm


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest