Summary: | issue more appropriate message when workbench already running | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Kathy Endres <endres> |
Component: | Resources | Assignee: | DJ Houghton <dj.houghton> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse, grant_gayed, greg_adams, studnev, turnham |
Version: | 2.0 | Keywords: | investigate |
Target Milestone: | 2.0.1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Kathy Endres
2002-07-08 05:27:33 EDT
*** Bug 21346 has been marked as a duplicate of this bug. *** One alternative to consider: don't show any warning/error dialog at all, and exit silently. This would have the result that trying to launch a second instance would just do nothing. Some other applications (VA/Java, Notes) seem to take this approach. *** Bug 21891 has been marked as a duplicate of this bug. *** Investigate and see if we can do something for 2.0.1. 2 options: display a message to the user or do nothing (as John suggests above) Option 1: display message For displaying a message to the user, look at InternalBootLoader.run(). We might be able to catch the CoreException which is being thrown by InternalPlatform and (based on severity, plugin-id, and error codes) determine that the error is because we are already running another platform and we could return an integer constant to Main. Note that displaying a message to the user would require work in the executable by SWT. Option 2: do nothing This would require the catching of the exception as described above. We would still want to log a message though, in case the user is in a weird state in which they don't have another platform launched but for some reason they still have the lock file around. They would need to know the reason that we aren't starting up and the location of the lock file to delete. Unfortuanatly due to visibility we cannot use CoreExceptions to indicate to the BootLoader that there is a problem. Code already exists in Main which calculates the log file location and the lock file is a sibling. Investigate putting the lock file check in Main. The changes to the launcher have been made to support option 1. When the JVM (Main) returns an exit code of 15, the following message is displayed and then the launcher exists: Another session is already running in the associated workspace. If this is not the case, please delete the ".lock" file in the workspace ".metadata" directory and try starting the platform again. Grant, you can rebuild the launchers. I've rebuilt and released the launchers for all platforms, to both the 2.0.1 and 2.1 streams. Fixed and released into both 2.0.1 and 2.1 streams. *** Bug 19718 has been marked as a duplicate of this bug. *** Fail to open Eclipse: "Problems during startup. Check the ".log" file in the ".metadata" dirctory of your workspace." My system is: XFree86:XFree86-4.3.0,1 jdk:jdk-1.4.2p6_4 eclipse:eclipse-2.1.3_1 !SESSION ---------------------------------------------------------------------- !ENTRY org.eclipse.core.launcher 4 0 ??? 05, 2004 20:32:03.17 !MESSAGE Exception launching the Eclipse Platform: !STACK java.lang.reflect.InvocationTargetException 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) Caused by: java.lang.reflect.InvocationTargetException at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:861) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:468) ... 7 more Caused by: java.lang.UnsatisfiedLinkError: /usr/local/eclipse/plugins/org.eclipse.swt.gtk_2.1.3/os/freebsd/x86/libswt-pi-gtk-2136.so: /usr/local/eclipse/plugins/org.eclipse.swt.gtk_2.1.3/os/freebsd/x86/libswt-pi-gtk-2136.so: ELF file OS ABI invalid at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1469) 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:108) at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19) at org.eclipse.swt.widgets.Display.createDisplay(Display.java:482) at org.eclipse.swt.widgets.Display.create(Display.java:469) at org.eclipse.swt.graphics.Device.<init>(Device.java:111) at org.eclipse.swt.widgets.Display.<init>(Display.java:303) at org.eclipse.swt.widgets.Display.<init>(Display.java:299) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1361) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) ... 8 more |