Community
Participate
Working Groups
when i plugged in another module which uses a third-party package to convert .dll to .jar, i got the following error message and the application cannot be launched ? !ENTRY org.eclipse.osgi Oct 14, 2004 18:39:52.161 !MESSAGE Application error !STACK 1 org.eclipse.swt.SWTError: Cannot initialize Drop at org.eclipse.swt.dnd.DND.error(DND.java:220) at org.eclipse.swt.dnd.DND.error(DND.java:181) at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:135) at org.eclipse.ui.internal.EditorSashContainer.addDropSupport (EditorSashContainer.java:388) at org.eclipse.ui.internal.EditorSashContainer.createControl (EditorSashContainer.java:382) at org.eclipse.ui.internal.EditorAreaHelper.<init> (EditorAreaHelper.java:47) at org.eclipse.ui.internal.WorkbenchPage.init(WorkbenchPage.java:1933) at org.eclipse.ui.internal.WorkbenchPage.<init>(WorkbenchPage.java:430) at org.eclipse.ui.internal.WorkbenchWindow.restoreState (WorkbenchWindow.java:1371) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1224) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1185) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1096) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1029) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState (WorkbenchConfigurer.java:167) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows (WorkbenchAdvisor.java:652) at org.eclipse.ui.internal.Workbench.init(Workbench.java:819) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at test.rcp.RcpApplication.run(RcpApplication.java:14) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) 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:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)
Which other module? Do we have access to it to try to reproduce the problem? What is test.rcp.RcpApplication?
The module is built in-house, which use another .jar named JIntegra. This package is to wrap the .dll and acts as a bridge to convert the APIs in .dll to java API. That module works fine if it is plugged with other pure java application which my team and I used to have. But not with eclipse plug-in. I tried to trace the problem and found that that when this module is loaded, the jintegra.jar will register some system libraries, and when it comes to initializing eclipse plug-in, and the line at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:135) if (COM.RegisterDragDrop( control.handle, iDropTarget.getAddress()) != COM.S_OK) DND.error(DND.ERROR_CANNOT_INIT_DROP); It does not return COM.S_OK, but something like -214xxxxxx And then the application quits. I am not sure if you would like to get a trial version from http://j- integra.intrinsyc.com. Include this package into the library path and set the java argument to -DJINTEGRA_NATIVE_MODE (which will load the system library) FYI, I tried to workaround and initialized my packages after eclipse plug-in's (which is not what I want actually - I would like to initialize my packages, do the login, before loading GUI (eclipse plug-in)). Though the application successfully loaded, when I shutdown my application, it fails to clean up the jintegra package (which I am not sure if it's eclipse's plug-in again?) test.rcp.RcpApplication is the testing application I used for eclipse plug-in. Exception thrown on line Display display = PlatformUI.createDisplay(); ********************************************************************** package test.rcp; import org.eclipse.core.runtime.IPlatformRunnable; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.application.WorkbenchAdvisor; import com.clsa.core.comp.Shell; public class RcpApplication implements IPlatformRunnable { public Object run(Object args) { WorkbenchAdvisor workbenchAdvisor = new RcpWorkbenchAdvisor(); Display display = PlatformUI.createDisplay(); try { int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor); if (returnCode == PlatformUI.RETURN_RESTART) { return IPlatformRunnable.EXIT_RESTART; } else { return IPlatformRunnable.EXIT_OK; } } finally { display.dispose(); } } }
Can you give the exact error returned by COM.RegisterDragDrop(you said - 214xxxxxx - but I need to know is the exact error code)? In your second scenario, can you include the full exception thrown by Display display = PlatformUI.createDisplay() ?
it returns -2147024882, instead of COM.S_OK (constant zero), and so the error thrown on line DND.error(DND.ERROR_CANNOT_INIT_DROP) to correct my previous statement, the exception should have been thrown on line (as shown in trace log) int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor); but not Display display = PlatformUI.createDisplay(); Regarding the workaround I did, the exception was thrown from the JIntegra package, which was supposed to do some cleanup work on system libraries, again, it orginally works fine with pure java application, but when I plug-in the module with eclipse, so I am not sure if eclipse has worked on the same system libraries as JIntegra which makes the crashes
The error is "0x8007000E -2147024882 Ran out of memory". Do you start the VM with any memory size arguments? e.g.: eclipse -vmargs -Xmx256M
yes. the eclipse starts with argument '-vmargs -Xmx384m -Xms256m' and the application starts with argument '-Xms256M -Xmx256m' is it 256m not enough ? but i run the application in pure java with just '- Xms64M -Xmx64m' and everything works fine. again, the line with error thrown is at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:135) if (COM.RegisterDragDrop( control.handle, iDropTarget.getAddress()) != COM.S_OK) DND.error(DND.ERROR_CANNOT_INIT_DROP); if i am correct, this line is to load/register the system library ? is it there is issue in loading system library at eclipse plug-in if that has been loaded by others in the same jvm process ? fyi, the JIntegra does load some system libraries, but I don't know if eclipse plug-in crashes with those ? or brings to window's issue ?
Got same exception when our application was ran on a terminal server (W2000 Terminal SP2). Application was tested on Windows XP and ASP linux (GTK) and this problem was never encountered. Our application is built on a RCP 3.0.
Hello, it's really long since the bug was last touched, but do you have any thoughts what could the root cause be? Did it ever worked on terminal server? Did it worked with any higher memory size values?
I don't have Terminal Server to reproduce this problem. Are you running into this problem now?
no it wasn't on terminal connection. It was a one-time issue and doesn't occur any more.
Closing, as WinXP is no longer a supported OS platform. You can reopen this bug if it still happens with any of the current supported platforms with valid steps to reproduce this issue.