views:

167

answers:

2

I previously had an eclipse rcp app based on eclipse 3.3 pugins deployed on both windows and mac OS X 10.4. i'm now trying to port the app to java 1.6 and eclipse 3.5 (Build id: 20100218-1602) plugins on Mac OS X 10.5.8 (Leopard).

I can launch the product from eclipse 3.5 on windows but not on Mac OS X. I have the 64bit cocoa eclipse IDE and java 6. In the launch configuration I set runtime JRE to JVM 1.6.0 and added required plugins. The plugins validate and everything else looks similar to windows configuration where it works, but when I launch i only get the following two lines in the console:

2010-03-16 13:29:32.742 java[758:10b] [Java CocoaComponent compatibility mode]: Enabled
2010-03-16 13:29:32.744 java[758:10b] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000

and then the program appears to just hang indefinitely. There is nothing written to the .log file so I'm not sure what error there is.

EDIT: Here's what Yourkit profiling says before all cpu activity stops.

+----------------------------------------------------------------------------+----------------+-----------------+  
|                                    Name                                    |   Time   (ms)    |  Own Time (ms)  |  
+----------------------------------------------------------------------------+----------------+-----------------+  
|  +---<All threads>                                                         |  2,799  100   %  |                 |
|    |                                                                       |                |                 |
|    +---org.eclipse.equinox.launcher.Main.main(String[])                    |  1,924  69% |              0  |  
|    |                                                                       |                |                 |  
|    +---org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run()  |    632   23 %  |              0  |
|    |                                                                       |                |                 |  
|    +---java.lang.Thread.run()                                              |    135    5 %  |              0  |
|    |                                                                       |                |                 |  
|    +---java.lang.ClassLoader.loadClassInternal(String)                     |    106    4 %  |              0  |  
+----------------------------------------------------------------------------+----------------+-----------------+  

, and this in the exceptions tab:

Exception staticstics

+----------------------------------------+--------------+
|                  Name                  |    Count     |
+----------------------------------------+--------------+
|  +---java.lang.ClassNotFoundException  |  102   11 %  |
|  |                                     |              |
|  +---java.net.MalformedURLException    |    4    0 %  |
|  |                                     |              |
|  +---java.lang.NoSuchMethodException   |    3    0 %  |
|  |                                     |              |
|  +---java.lang.NumberFormatException   |    2    0 %  |
|  |                                     |              |
|  +---java.io.FileNotFoundException     |    1    0 %  |
|  |                                     |              |
|  +---java.lang.UnsatisfiedLinkError    |    1    0 %  |
+----------------------------------------+--------------+

and here's more details on the ClassNotFoundExceptions mentioned above:

java.lang.ClassNotFoundException
Start Level Event Dispatcher native ID: 0x8B0B group: 'main'      78
Thread-4 native ID: 0x10B group: 'main'                           22
Framework Event Dispatcher native ID: 0xD207 group: 'main'         2

Anyone know why I don't see a trace for this in Eclipse or in any log files? any ideas where I should look?

[Updated on: Tue, 16 March 2010 09:37]

A: 

The SWT for Cocoa 64-bit is shaky for 3.5.

It wasn't supported at first (see this blog entry)

You could check if you see the same problem with the latest eclipse 3.6M6.

VonC
thanks for the reply, neither of those bugs seem like exactly the same problem I'm having but indeed do point to unstablity regarding Cocoa 64-bit. Ive not tried eclipse 3.6 yet as I'd prefer to use a stable version for production releases. I might try it as a last resort though if i cant figure this out.
Alb
@Alb: I agree with you, I only mentioned 3.6 just for testing purpose. I just would like to know if you see the same issue with the latest Helios Eclipse.
VonC
A: 

It turned out to be some code called from the main Plugin constructor that was causing the hang. It loaded a jpeg image file to a BufferedImage. This had been added in an earlier version as a hack to fix some bug regarding image handling on the mac version of the code. Now it seems that not only is it no longer required (bug did not reproduce after removing it) but it causes the app to hang at start-up!

Alb