Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 472259 - [Cocoa] El Capitan beta 3 10.11 hangs/freezes Eclipse
Summary: [Cocoa] El Capitan beta 3 10.11 hangs/freezes Eclipse
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Mac OS X
: P3 blocker with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 472300 472432 473333 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-09 04:58 EDT by Gerd Naschenweng CLA
Modified: 2016-08-19 09:50 EDT (History)
21 users (show)

See Also:


Attachments
jstack dump of hanging eclipse (10.29 KB, text/plain)
2015-07-09 06:26 EDT, Gerd Naschenweng CLA
no flags Details
jstack of MyEclipseIDE installer (10.66 KB, text/plain)
2015-07-09 06:34 EDT, Gerd Naschenweng CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerd Naschenweng CLA 2015-07-09 04:58:33 EDT
Install latest El Capitan Beta 3 (10.11 - 15A216g) and run any Eclipse based environment such as Eclipse, MyEclipseIDE etc.

The application will start slowly and then hang/freeze with the UI being unresponsive.
Comment 1 Andrey Loskutov CLA 2015-07-09 05:15:38 EDT
Can you run jstack on the hanging application and attach the dump here?
Comment 2 Gerd Naschenweng CLA 2015-07-09 06:26:15 EDT
Created attachment 255084 [details]
jstack dump of hanging eclipse

I started Eclipse (eclipse-jee-mars-R-macosx-cocoa-x86_64) from the command line via ./eclipse.

Eclipse will then start and show the workspace selection window with a spinning color-wheel. Eventually the colour wheel will disappear, but the workspace selection window will remain unresponsive and OS X shows Eclipse as "not responding".
Comment 3 Gerd Naschenweng CLA 2015-07-09 06:34:04 EDT
Created attachment 255085 [details]
jstack of MyEclipseIDE installer

FWIW - I can also reproduce this on the MyEclipseIDE installer (http://www.genuitec.com/products/myeclipse/download/get/?118)

I am not sure if holds any relevance, but if you compare both jstack files, both seem to hang in NSRunLoop:

Eclipse:
"main" #1 prio=6 os_prio=31 tid=0x000000010302b800 nid=0x50f runnable [0x00007fff5fbfd000]
   java.lang.Thread.State: RUNNABLE
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4740)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:828)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.prompt(ChooseWorkspaceDialog.java:93)
	at org.eclipse.ui.internal.ide.application.IDEApplication.promptForWorkspace(IDEApplication.java:343)
	at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:262)

vs MyEclipseIDEInstaller:
"main" #1 prio=5 os_prio=31 tid=0x0000000103041000 nid=0x50f runnable [0x00007fff5fbfd000]
   java.lang.Thread.State: RUNNABLE
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4610)
	at com.genuitec.pulse.installer.container.ui.base.BaseInstallerGUIContainer.waitForModule(Unknown Source)
	at com.genuitec.pulse.installer.module.ui.message.WelcomeModule.run(Unknown Source)
	at com.genuitec.pulse.installer.machine.internal.SequenceMachineImpl.runSequence(Unknown Source)
	at com.genuitec.pulse.installer.machine.internal.SequenceMachineImpl.run(Unknown Source)
	at com.genuitec.pulse.installer.application.CommonInstallerApplication.start(Unknown Source)
Comment 4 Brian de Alwis CLA 2015-07-09 12:29:54 EDT
Thanks for trying out Eclipse on 10.11.  Moving to SWT.
Comment 5 Andrey Loskutov CLA 2015-07-09 12:49:58 EDT
*** Bug 472300 has been marked as a duplicate of this bug. ***
Comment 6 Thomas Singer CLA 2015-07-13 03:39:22 EDT
Even the simplest shell snippet:

	public static void main(String[] args) {
		final Display display = new Display();

		final Shell shell = new Shell(display);

		shell.setSize(300, 200);
		shell.open();

		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}

		display.dispose();
	}

hangs at

 java.lang.Thread.State: RUNNABLE
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:4740)
Comment 7 Andrey Loskutov CLA 2015-07-13 03:45:15 EDT
*** Bug 472432 has been marked as a duplicate of this bug. ***
Comment 8 Lakshmi P Shanmugam CLA 2015-07-13 07:14:07 EDT
(In reply to Thomas Singer from comment #6)
> Even the simplest shell snippet:
> 
> 	public static void main(String[] args) {
> 		final Display display = new Display();
> 
> 		final Shell shell = new Shell(display);
> 
> 		shell.setSize(300, 200);
> 		shell.open();
> 
> 		while (!shell.isDisposed()) {
> 			if (!display.readAndDispatch()) {
> 				display.sleep();
> 			}
> 		}
> 
> 		display.dispose();
> 	}
> 
> hangs at
> 
>  java.lang.Thread.State: RUNNABLE
> 	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
> 	at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
> 	at org.eclipse.swt.widgets.Display.sleep(Display.java:4740)

I currently don't have the 10.11 beta to try out. 
Can you pls check if there is any exception thrown when the snippet is launching?
Comment 9 David Waite CLA 2015-07-13 11:29:05 EDT
10.11 is now in public beta. 

However, I have not confirmed the first public beta release matches beta 3. It may or may not manifest this issue.
Comment 10 Thomas Singer CLA 2015-07-13 12:24:24 EDT
(In reply to Lakshmi Shanmugam from comment #8)
> Can you pls check if there is any exception thrown when the snippet is
> launching?

There is no exception thrown. According to the thread-dump it just hangs in OS.objc_msgSend_bool.
Comment 11 Todor Todorov CLA 2015-07-13 13:07:53 EDT
Same issue for me with the official beta
Comment 12 Francisco Collao CLA 2015-07-13 13:56:06 EDT
Executing from console I have this log:

/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4842:21: note: candidate function not viable: requires 3 arguments, but 4 were provided
float4 __OVERLOAD__ clamp(float4 x, float4 minval, float4 maxval);
                    ^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4841:21: note: candidate function not viable: requires 3 arguments, but 4 were provided
float3 __OVERLOAD__ clamp(float3 x, float3 minval, float3 maxval);
                    ^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4840:21: note: candidate function not viable: requires 3 arguments, but 4 were provided
float2 __OVERLOAD__ clamp(float2 x, float2 minval, float2 maxval);
                    ^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4839:20: note: candidate function not viable: requires 3 arguments, but 4 were provided
float __OVERLOAD__ clamp(float x, float minval, float maxval);
                   ^
Unable to compile kernel. We should debug this.

Here more information from other user that have the same problem. Someone says the problem is the new core UI access. (https://forums.developer.apple.com/thread/8776)

Best Regards
Comment 13 Lakshmi P Shanmugam CLA 2015-07-20 06:03:33 EDT
I tried with the 10.11 official beta and it has the same problem.

This seems to be a problem with the OS and is mentioned as a known issue in the release notes: "Some versions of Eclipse may hang during use".
--> https://developer.apple.com/library/prerelease/mac/releasenotes/General/rn-osx-10.11/
Comment 14 Gerd Naschenweng CLA 2015-07-20 06:10:19 EDT
Question is, if this is something which should/can be fixed within Eclipse or if Apple will actually acknowledge/fix.

I posted the same bug to Apple  with id=21741973 on 9th July and have yet to receive acknowledgement/comment from Apple.
Comment 15 Pierre Frisch CLA 2015-07-21 14:29:30 EDT
And beta 4 fixes the issue
Comment 16 Gerd Naschenweng CLA 2015-07-22 01:46:13 EDT
Fixed in beta 4.
Comment 17 Lakshmi P Shanmugam CLA 2015-07-23 02:23:22 EDT
*** Bug 473333 has been marked as a duplicate of this bug. ***
Comment 18 Lakshmi P Shanmugam CLA 2015-07-27 06:40:54 EDT
Confirmed that it is fixed in public beta2.
Comment 19 Markus Persson CLA 2016-08-19 09:50:47 EDT
I just wanted to point out for the record that the resolve status of this bug is misleading as the cause of this is very likely to be an Eclipse bug, namely the same as bug 477979, where SWT relied on undocumented behavior. It is just that Apple worked around it by attempting to identify SWT applications and then revert to the old incorrect behavior. As noted in bug 477979, that identification attempt may fail.