Bug 538377 - Java crash after org.eclipse.swt.internal.cocoa.NSApplication.setDelegate on macos 10.14 mojave with touch bar
Summary: Java crash after org.eclipse.swt.internal.cocoa.NSApplication.setDelegate on ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: Macintosh Mac OS X
: P3 critical with 2 votes (vote)
Target Milestone: 4.10 M3   Edit
Assignee: Till Brychcy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 539867 (view as bug list)
Depends on:
Blocks: 538976
  Show dependency tree
 
Reported: 2018-08-29 02:46 EDT by Andrey Sobolev CLA
Modified: 2021-09-11 08:36 EDT (History)
26 users (show)

See Also:


Attachments
Error log for java 8 (61.29 KB, application/octet-stream)
2018-08-29 02:47 EDT, Andrey Sobolev CLA
no flags Details
Error log for java 10 (362.38 KB, application/octet-stream)
2018-08-29 02:48 EDT, Andrey Sobolev CLA
no flags Details
Crash log with Java 1.8.0_181, macOS Mojave 18A391, Eclipse 4.7.3a (54.37 KB, application/octet-stream)
2018-09-26 05:23 EDT, Alexis Drogoul CLA
no flags Details
Crash log with Java 1.8.0_172, macOS 10.14 (18A391), Eclipse Photon I20180611-0500 (55.56 KB, application/octet-stream)
2018-09-26 06:53 EDT, Nobody - feel free to take it CLA
no flags Details
crash log (58.38 KB, application/octet-stream)
2018-09-26 06:57 EDT, Mel T. CLA
no flags Details
Crash log with Java 10.0.0.2, macOS Mojave 18A391, Eclipse 4.9.0 (140.80 KB, application/octet-stream)
2018-09-26 06:58 EDT, Yannic Soethoff CLA
no flags Details
Crash log with Java 10.0.0.2, macOS Mojave 18A391, Eclipse 4.9.0, NSZombieEnabled=YES (87.58 KB, application/octet-stream)
2018-09-26 07:42 EDT, Yannic Soethoff CLA
no flags Details
Crash log with Java 1.8.0_181, macOS Mojave 18A391, Eclipse 4.7.3a [Automatic switch of graphics card disabled] (53.67 KB, application/octet-stream)
2018-09-26 21:57 EDT, Alexis Drogoul CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Sobolev CLA 2018-08-29 02:46:30 EDT
Hi,

I'm using a macOS Mojave Beta 9 and see following errors always then I want to debug or run my application from Eclipse Java/PDE.

Stack: [0x00007ffee7e55000,0x00007ffee8655000],  sp=0x00007ffee86506b8,  free space=8173k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [CoreFoundation+0x386fc]  CFDictionaryGetValue+0xb
C  [libswt-pi-cocoa-4880.jnilib+0x10335]  Java_org_eclipse_swt_internal_cocoa_OS_objc_1msgSend__JJJ+0x35
j  org.eclipse.swt.internal.cocoa.OS.objc_msgSend(JJJ)J+0
j  org.eclipse.swt.internal.cocoa.NSApplication.setDelegate(Lorg/eclipse/swt/internal/cocoa/id;)V+19
j  org.eclipse.swt.widgets.Display.init()V+100
j  org.eclipse.swt.graphics.Device.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+168
j  org.eclipse.swt.widgets.Display.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+2
j  org.eclipse.swt.widgets.Display.<init>()V+2
j  org.eclipse.ui.internal.Workbench.createDisplay()Lorg/eclipse/swt/widgets/Display;+81
j  org.eclipse.ui.PlatformUI.createDisplay()Lorg/eclipse/swt/widgets/Display;+0
j  com.fnfr.svt.rcp.Application.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+127
j  org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+135
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+85
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+82
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+105
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+132
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x2ee5b6]
V  [libjvm.dylib+0x4d3488]
V  [libjvm.dylib+0x4d39bc]
V  [libjvm.dylib+0x3469b8]
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
j  org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+205
j  org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+160
j  org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j  org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x2ee5b6]
V  [libjvm.dylib+0x3253ce]
V  [libjvm.dylib+0x31e145]
C  [java+0x3931]  JavaMain+0x9c4
C  [java+0x5590]  -[JavaLaunchHelper launchJava:]+0x2a
C  [Foundation+0xa8f0e]  __NSThreadPerformPerform+0x147
C  [CoreFoundation+0xb35d9]  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__+0x11
C  [CoreFoundation+0xaed0]  __CFRunLoopDoSource0+0x6c
C  [CoreFoundation+0x9ad65]  __CFRunLoopDoSources0+0xc3
C  [CoreFoundation+0x9a30e]  __CFRunLoopRun+0x4c3
C  [CoreFoundation+0x99c35]  CFRunLoopRunSpecific+0x1cf
C  [java+0x6465]  CreateExecutionEnvironment+0x367
C  [java+0x218c]  JLI_Launch+0x7a0
C  [java+0x84c2]  main+0x65
C  [java+0x19e4]  start+0x34
C  0x0000000000000027


I mostly suppose it is caused by beta macOS but not sure.

Any help would be appreciate.

Andrey.
Comment 1 Andrey Sobolev CLA 2018-08-29 02:47:53 EDT
Created attachment 275597 [details]
Error log for java 8
Comment 2 Andrey Sobolev CLA 2018-08-29 02:48:22 EDT
Created attachment 275598 [details]
Error log for java 10
Comment 3 Yannic Soethoff CLA 2018-09-25 09:28:05 EDT
Hello everyone,

I'm now getting the same error as Andrey after updating to the release version of Mojave today. The interesting fact is, that this does not appear if you are closing the lid and using a separate monitor. As soon as I'm using my MacBook open (with or without a connected monitor) running or debugging a application from Eclipse is not possible anymore.  

Thanks for your help! 
Regards, Yannic
Comment 4 Matthias Becker CLA 2018-09-25 09:50:35 EDT
@Till: Can you help here?
Comment 5 Alexis Drogoul CLA 2018-09-25 10:43:34 EDT
Same behaviour and crash with Eclipse Oxygen (4.7.3a).
Comment 6 Till Brychcy CLA 2018-09-25 11:41:16 EDT
I cannot reproduce this using 4.7.3a or 4.9 with  or without external monitor on macOS 10.14 (18A391)
What java version are you using?
Is the external monitor run in HiDPI?
Comment 7 Andrey Sobolev CLA 2018-09-25 12:07:17 EDT
I'm not alone, this is good news at lest for me, 

I'm fight'ing with this issue since Mojave beta 1 for few months already.
I've checked with/without monitor, but not checked with closed MacBook connected to external monitor.

One interesting thing it is happening every time for Eclipse 4.7/4.8/4.9 ( Java 1.8/1.9/10) just on my Macbook Pro, but not with Macbook, 
so this is definitely something with Mojave, 

I've send feedback to Apple already about this, but no response as in most cases. 

My Macbook is on recovery, so will try in few days and write after upgrade to release version of Mojave.
Comment 8 Andrey Sobolev CLA 2018-09-25 12:10:53 EDT
I've working with LG4k, same for both laptops.

Java 1.8.131/1.8.181/10.0.1+10/
Comment 9 Alexis Drogoul CLA 2018-09-25 21:40:03 EDT
(In reply to Till Brychcy from comment #6)
> I cannot reproduce this using 4.7.3a or 4.9 with  or without external
> monitor on macOS 10.14 (18A391)
> What java version are you using?
> Is the external monitor run in HiDPI?

I'm using only the MBP monitor. 
Java version is 1.8.0_181, MacOS version is 18A391 (like yours) and Eclipse is Oxygen 3A (aka 4.7.3a). When running from Eclipse, it crashes immediately. When compiled and run as a stock macOS app, it works.
Comment 10 Mel T. CLA 2018-09-25 22:38:24 EDT
Exact same error, MacBook Pro 2018, Mojave (macOS 10.14 (18A391)), both on Photon and 2018-09, java build 1.8.0_181-b13.
Comment 11 Mel T. CLA 2018-09-25 22:54:19 EDT
(In reply to Mel T. from comment #10)
> Exact same error, MacBook Pro 2018, Mojave (macOS 10.14 (18A391)), both on
> Photon and 2018-09, java build 1.8.0_181-b13.

I should add that I have no extra monitor. 
And that the built RCP app runs fine standalone.
The crash occurs when starting in the IDE.
Comment 12 Till Brychcy CLA 2018-09-26 02:01:33 EDT
Interesting question: why doesn't the main eclipse crash, but the nested one.

Previously we had effects where this depended on what macOS sdk the main binary was linked against.

Maybe it crashes for you, if you launch with java instead of the eclipse launcher.

So one interesting question is: Does your main eclipse also crash if you start it from command line (Terminal) with java, e.g.

/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -XstartOnFirstThread -jar /Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar

(this example is for eclipse 4.9 installed to /Applications - you need to adjust the path for it and for the java version and also the launcher version if you use another eclipse build)
Comment 13 Yannic Soethoff CLA 2018-09-26 03:17:47 EDT
That's the same question which I'm asking myself.

I tried to start Eclipse with java via the command line and it worked as aspected (used your command). Also I tried to start the target platform, which I want to start from Eclipse, directly via the command line (again using your command) and it also worked. I was able to choose my workspace and use the application as expected.

So, if I'm using this way to start eclipse or the corresponding target platform I get no crashes.
Comment 14 Till Brychcy CLA 2018-09-26 05:15:11 EDT
Can other users who have this problem attach a crash log (hs_err_pid?????.log), maybe having more samples allows us to narrow this down?
Comment 15 Alexis Drogoul CLA 2018-09-26 05:23:03 EDT
Created attachment 275989 [details]
Crash log with Java 1.8.0_181, macOS Mojave 18A391, Eclipse 4.7.3a
Comment 16 Nobody - feel free to take it CLA 2018-09-26 06:53:04 EDT
Created attachment 275992 [details]
Crash log with Java 1.8.0_172, macOS 10.14 (18A391), Eclipse Photon I20180611-0500
Comment 17 Mel T. CLA 2018-09-26 06:57:44 EDT
Created attachment 275993 [details]
crash log
Comment 18 Yannic Soethoff CLA 2018-09-26 06:58:55 EDT
Created attachment 275994 [details]
Crash log with Java 10.0.0.2, macOS Mojave 18A391, Eclipse 4.9.0
Comment 19 Yannic Soethoff CLA 2018-09-26 07:03:50 EDT
I also checked if it's possible to run / debug a simple Java Class with 'Run as java application' as well as execute some PDE tests via 'JUnit Plug-in Test'. 
Both are working as expected.
Comment 20 Till Brychcy CLA 2018-09-26 07:16:54 EDT
Hmm thanks for the extra dumps.
Interesting: In the Java 10 dumps, the pc is shown as 0 (and no native frames are listed, but this may be related)

I wonder if some object is released to early (or not retained though it should?)

Please try running with the environment variable NSZombieEnabled set to YES is the launch configuration (see https://stackoverflow.com/questions/1324868/how-best-to-debug-a-crash-within-objc-msgsend)
Comment 21 Yannic Soethoff CLA 2018-09-26 07:41:27 EDT
Unfortunately no success with the environment variable 'NSZombieEnabled' set to YES for me. Still getting the same error.
 
I'm adding a new log with the variable set.
Comment 22 Yannic Soethoff CLA 2018-09-26 07:42:15 EDT
Created attachment 275995 [details]
Crash log with Java 10.0.0.2, macOS Mojave 18A391, Eclipse 4.9.0, NSZombieEnabled=YES
Comment 23 Till Brychcy CLA 2018-09-26 08:13:30 EDT
(In reply to Yannic Soethoff from comment #22)
> Created attachment 275995 [details]
> Crash log with Java 10.0.0.2, macOS Mojave 18A391, Eclipse 4.9.0,
> NSZombieEnabled=YES

Hmm it looks like this somehow didn't work, this crash log doesn't show the environment variable, it only lists:

[...]
Environment Variables:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
SHELL=/bin/bash

Signal Handlers:
[...]
Comment 24 Yannic Soethoff CLA 2018-09-26 09:30:51 EDT
(In reply to Till Brychcy from comment #23)
> Hmm it looks like this somehow didn't work, this crash log doesn't show the
> environment variable, it only lists:

Ok, I checked that and if I start the target platform (closed lid) with the environment variable defined I can find the variable set with the correct value in the "About -> Installation Details -> Configuration" tab. Within this section I can also find several other environment variables which are not included in the log too. 

[...]
*** System environment variables:
APP_ICON_5195=../Resources/Eclipse.icns
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.qN0sVAxjE3/Render
HOME=/Users/d069676
JAVA_MAIN_CLASS_5473=org.eclipse.equinox.launcher.Main
JAVA_STARTED_ON_FIRST_THREAD_5195=1
JAVA_STARTED_ON_FIRST_THREAD_5473=1
LOGNAME=d069676
NSZombieEnabled=YES
PATH=/usr/bin:/bin:/usr/sbin:/sbin
SHELL=/bin/bash
SNC_LIB=/Applications/Secure Login Client.app/Contents/MacOS/lib/libsapcrypto.dylib
SNC_LIB_64=/Applications/Secure Login Client.app/Contents/MacOS/lib/libsapcrypto.dylib
SSF_LIBRARY_PATH=/Applications/Secure Login Client.app/Contents/MacOS/lib/libsapcrypto.dylib
SSF_LIBRARY_PATH_64=/Applications/Secure Login Client.app/Contents/MacOS/lib/libsapcrypto.dylib
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.R8oNMKS4sX/Listeners
TMPDIR=/var/folders/ns/jyvybyqx1fzfk89df9bsgyc80000gn/T/
USER=d069676
XPC_FLAGS=0x0
XPC_SERVICE_NAME=org.eclipse.platform.ide.2780
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
[...]

So maybe I'm doing something wrong. If so, can you please give me an advice how to do this?
Comment 25 Till Brychcy CLA 2018-09-26 09:46:28 EDT
Thanks for checking.

It looks like the crash dump only contains some specific env variables. Sorry for the confusion.

Unfortunately that means that this settings doesn't lead to new information.

Another idea to narrow this down: 
Can you launch SWT snippets (in the org.eclipse.swt.snippets project in the eclipse.platform.swt git repository) or do they crash in the same way?
Comment 26 Yannic Soethoff CLA 2018-09-26 10:36:20 EDT
No problem! Unfortunately I have to disappoint you. I tested several snippets and all are working as expected.
Comment 27 Till Brychcy CLA 2018-09-26 15:25:30 EDT
Given that closing the lid changes the behaviour: 

Does it make a difference if you tell the system to always use the discrete graphics processor (system preferences > energy saving (or something like that) > disable automatic card graphics switching)?
Comment 28 Alexis Drogoul CLA 2018-09-26 21:57:10 EDT
Created attachment 276013 [details]
Crash log with Java 1.8.0_181, macOS Mojave 18A391, Eclipse 4.7.3a [Automatic switch of graphics card disabled]

Added an attachment containing the log with discrete graphic card always on. Does not seem to make a huge difference, unfortunately...
Comment 29 Matthias Becker CLA 2018-09-27 03:19:51 EDT
Is it maybe related to the touch bar that may be "off" when the lid is closed?
Comment 30 Till Brychcy CLA 2018-09-27 04:03:20 EDT
(In reply to Matthias Becker from comment #29)
> Is it maybe related to the touch bar that may be "off" when the lid is
> closed?

That is a very interesting idea: I cannot reproduce it and I use a macbook pro 2014 without touch bar.
Comment 31 Till Brychcy CLA 2018-09-27 04:24:50 EDT
(In reply to Till Brychcy from comment #30)
> (In reply to Matthias Becker from comment #29)
> > Is it maybe related to the touch bar that may be "off" when the lid is
> > closed?
> 
> That is a very interesting idea: I cannot reproduce it and I use a macbook
> pro 2014 without touch bar.

Matthias, you are right! I can reproduce this now by enabling the touch bar simulator in XCode (Window > Show Touch Bar)
Comment 32 Till Brychcy CLA 2018-09-27 04:49:32 EDT
I have a workaround: add 
-nosplash
to the "Program arguments" in the launch configuration's "Arguments" tab.
Comment 33 Alexis Drogoul CLA 2018-09-27 07:06:40 EDT
I confirm the workaround with "-nosplash" added to the Program Arguments. Thanks Till ! RCP App is now launching from Eclipse without a problem (albeit w/o splash screen).
Comment 34 Till Brychcy CLA 2018-09-27 14:18:47 EDT
When the problem appears, the objective-c class of the instance returned by the NSApplication.sharedApplication-call in Display.createDisplay
is not  NSApplication, but NSKVONotifying_NSApplication. 

The code tries to change the type of the instance to the dynamically created subclass SWTApplication (using the OS.object_setClass call; this is called "isa swizzling" )

I came across some websites that mention that NSKVONotifying_* classes are used for "Key-value observing" and creating subclasses of these doesn't work.
Comment 35 Mel T. CLA 2018-09-27 14:23:30 EDT
I too confirm that -nosplash is a good workaround for me too.

(In reply to Till Brychcy from comment #32)
> I have a workaround: add 
> -nosplash
> to the "Program arguments" in the launch configuration's "Arguments" tab.
Comment 36 Till Brychcy CLA 2018-09-27 14:24:29 EDT
The answer to this SO question suggests that method swizzling is needed instead of isa swizzling for KVO classes:

https://stackoverflow.com/questions/11221110/my-isa-swizzling-breaks-kvo
Comment 37 Eclipse Genie CLA 2018-09-27 16:37:06 EDT
New Gerrit change created: https://git.eclipse.org/r/130110
Comment 38 Till Brychcy CLA 2018-09-27 16:40:36 EDT
(In reply to Eclipse Genie from comment #37)
> New Gerrit change created: https://git.eclipse.org/r/130110

Actually it shouldn't matter if the touch bar software isn't notified about property changes of the application object, so the strategy in this simple patch is to use NSApplication explicitly as super class in this situation.
Comment 39 Till Brychcy CLA 2018-09-28 02:46:25 EDT
(In reply to Till Brychcy from comment #38)
> (In reply to Eclipse Genie from comment #37)
> > New Gerrit change created: https://git.eclipse.org/r/130110
> 
> Actually it shouldn't matter if the touch bar software isn't notified about
> property changes of the application object, so the strategy in this simple
> patch is to use NSApplication explicitly as super class in this situation.

BTW: Of course this is kind of hacky.

This all being closed source, I can't guarantee that this doesn't break anything, but it is better than an immediate crash. In the end, we could just try it now and that future macOS releases don't break it.

Alternatively, somebody could e.g. try to find a fix based on method swizzling if a KVO-class is detected.
Comment 40 Till Brychcy CLA 2018-09-28 02:47:19 EDT
(In reply to Till Brychcy from comment #39)
> just try it now and that future macOS releases don't break it.
and >hope< that
Comment 41 Thomas Schindl CLA 2018-09-28 03:06:25 EDT
The reason for the crash has something to with the Splash. If you launch with "-nosplash" everything is OK.
Comment 42 Matthias Becker CLA 2018-09-28 03:13:43 EDT
(In reply to Thomas Schindl from comment #41)
> The reason for the crash has something to with the Splash. If you launch
> with "-nosplash" everything is OK.

yes, we know that already. See comment 32.
Comment 43 Till Brychcy CLA 2018-09-28 03:14:08 EDT
(In reply to Thomas Schindl from comment #41)
> The reason for the crash has something to with the Splash. If you launch
> with "-nosplash" everything is OK.

That is already written above :-)

My guess is that the touch bar software installs some hook to add an value observer on the application object that is executed when the events for the splash screen are processed in Keywindow dispatch: (in eclipseCocoa.c).

I have no idea why this only happens for a nested eclipse. Maybe Apple added some code to be compatible with SWT-based applications that doesn't get triggered in this Sitution?
Comment 44 Thomas Schindl CLA 2018-09-28 03:22:17 EDT
I more think PDE is the root of the problem because it reuses the the Eclipse executable currently running see "org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration"
Comment 45 Till Brychcy CLA 2018-09-28 03:32:35 EDT
(In reply to Thomas Schindl from comment #44)
> I more think PDE is the root of the problem because it reuses the the
> Eclipse executable currently running see
> "org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration"

And this causes the class of the application object in the nested process to be changed to NSKVONotifying_NSApplication, because ...?
Comment 46 Till Brychcy CLA 2018-09-28 03:39:08 EDT
BTW: you can copy the command line from the crashed process from its properties in the debug view and execute it in terminal and it'll crash, too.
Comment 47 Till Brychcy CLA 2018-10-06 17:04:22 EDT
*** Bug 539867 has been marked as a duplicate of this bug. ***
Comment 48 Hari Krishna Gurram CLA 2018-10-09 06:03:34 EDT Comment hidden (obsolete)
Comment 49 Till Brychcy CLA 2018-10-09 07:02:13 EDT Comment hidden (obsolete)
Comment 50 Hari Krishna Gurram CLA 2018-10-10 10:51:28 EDT Comment hidden (obsolete)
Comment 51 Till Brychcy CLA 2018-10-10 17:25:46 EDT Comment hidden (obsolete)
Comment 52 saurav sarkar CLA 2018-10-29 22:12:42 EDT
Will the workaround -nosplash argument work for standalone SWT applications not RCP ?

Best Regards,
Saurav
Comment 53 Matthias Becker CLA 2018-11-15 03:57:49 EST
What about the Gerrit Patch. Any Plans to merge it before the next releasee?
Comment 55 Till Brychcy CLA 2018-11-18 06:39:55 EST
(In reply to Eclipse Genie from comment #54)
> Gerrit change https://git.eclipse.org/r/130110 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=6b498d085fe2e1e0f03402782ee7c8203d9d2202

Released for 4.10M3
Comment 56 Matthias Becker CLA 2018-11-19 03:44:53 EST
(In reply to Till Brychcy from comment #55)
> (In reply to Eclipse Genie from comment #54)
> > Gerrit change https://git.eclipse.org/r/130110 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > ?id=6b498d085fe2e1e0f03402782ee7c8203d9d2202
> 
> Released for 4.10M3

Thank you Till!
Comment 57 Lakshmi P Shanmugam CLA 2018-11-19 07:00:32 EST
Thanks for the fix Till!
Comment 58 Lakshmi P Shanmugam CLA 2018-11-21 03:29:57 EST
Verified with I20181119-2315
Comment 59 Scott Pelton CLA 2020-02-18 10:43:17 EST
I am currently experiencing this same issue on my MacBookPro16 with Mac OS 10.15 .3 when launching from IDE - Eclipse 4.14.0. Yes the -nosplash Program Argument is a workaround for me as well but I was under the impression/understanding this was fixed in 4.10 M3.

Should I create a new bug?

MY SYSTEM CONFIG:
-----------------

Eclipse IDE for RCP and RAP Developers

Version: 2019-12 (4.14.0)
Build id: 20191212-1212 

System Software Overview:

  System Version:	macOS 10.15.3 (19D76)
  Kernel Version:	Darwin 19.3.0
  Boot Volume:	Macintosh HD
  Boot Mode:	Normal

Hardware Overview:

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro16,1
  Processor Name:	8-Core Intel Core i9
  Processor Speed:	2.3 GHz
  Number of Processors:	1
  Total Number of Cores:	8
  L2 Cache (per Core):	256 KB
  L3 Cache:	16 MB
  Hyper-Threading Technology:	Enabled
  Memory:	16 GB
  Boot ROM Version:	1037.80.53.0.0 (iBridge: 17.16.13050.0.0,0)
Comment 60 Scott Pelton CLA 2020-02-18 10:56:20 EST
Here is my stack frame trace from hr_err*.log:

Stack: [0x00007ffee0db4000,0x00007ffee15b4000],  sp=0x00007ffee15af080,  free space=8172k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libobjc.A.dylib+0x1107d]  -[NSObject superclass]+0x11
C  [libswt-pi-cocoa-4880.jnilib+0xff7d]  Java_org_eclipse_swt_internal_cocoa_OS_objc_1msgSend__JJ+0x2d
j  org.eclipse.swt.internal.cocoa.OS.objc_msgSend(JJ)J+0
j  org.eclipse.swt.widgets.Display.finishLaunching(JJ)V+32
j  org.eclipse.swt.widgets.Display.applicationProc(JJ)J+79
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x2eab0e]
V  [libjvm.dylib+0x321820]
V  [libjvm.dylib+0x319a12]
C  [libswt-cocoa-4880.jnilib+0x2826]  callback+0x536
C  [libswt-cocoa-4880.jnilib+0x5143]  fn0_2+0x23
C  [libswt-pi-cocoa-4880.jnilib+0xff7d]  Java_org_eclipse_swt_internal_cocoa_OS_objc_1msgSend__JJ+0x2d
j  org.eclipse.swt.internal.cocoa.OS.objc_msgSend(JJ)J+0
j  org.eclipse.swt.internal.cocoa.NSApplication.finishLaunching()V+7
j  org.eclipse.swt.widgets.Display.init()V+113
j  org.eclipse.swt.graphics.Device.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+168
j  org.eclipse.swt.widgets.Display.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+2
j  org.eclipse.swt.widgets.Display.<init>()V+2
j  org.eclipse.ui.internal.Workbench.createDisplay()Lorg/eclipse/swt/widgets/Display;+81
j  org.eclipse.ui.PlatformUI.createDisplay()Lorg/eclipse/swt/widgets/Display;+0
j  com.worldpac.pde.application.Application.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+0
j  org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+135
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+85
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+82
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+105
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+132
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x2eab0e]
V  [libjvm.dylib+0x4caf44]
V  [libjvm.dylib+0x4cb478]
V  [libjvm.dylib+0x342cc0]
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
j  org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+205
j  org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+160
j  org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j  org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x2eab0e]
V  [libjvm.dylib+0x321820]
V  [libjvm.dylib+0x31a59a]
C  [java+0x393e]  JavaMain+0x9b1
C  [java+0x559c]  -[JavaLaunchHelper launchJava:]+0x2a
C  [Foundation+0x9c8ab]  __NSThreadPerformPerform+0xfe
C  [CoreFoundation+0x84b21]  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__+0x11
C  [CoreFoundation+0x84ac0]  __CFRunLoopDoSource0+0x67
C  [CoreFoundation+0x848d4]  __CFRunLoopDoSources0+0xd1
C  [CoreFoundation+0x83740]  __CFRunLoopRun+0x4f8
C  [CoreFoundation+0x82bd3]  CFRunLoopRunSpecific+0x1f3
C  [java+0x6463]  CreateExecutionEnvironment+0x367
C  [java+0x21ac]  JLI_Launch+0x7a0
C  [java+0x84c0]  main+0x65
C  [java+0x1a04]  start+0x34
C  0x0000000000000026
Comment 61 Scott Pelton CLA 2020-02-18 12:01:19 EST
I am sorry I posted the wrong stack frame. This is the frame corresponding to jvm crash:

Stack: [0x00007ffee7602000,0x00007ffee7e02000],  sp=0x00007ffee7dfd278,  free space=8172k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.eclipse.swt.internal.cocoa.OS.objc_msgSend(JJJ)J+0
j  org.eclipse.swt.internal.cocoa.NSApplication.setDelegate(Lorg/eclipse/swt/internal/cocoa/id;)V+19
j  org.eclipse.swt.widgets.Display.init()V+100
j  org.eclipse.swt.graphics.Device.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+168
j  org.eclipse.swt.widgets.Display.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+2
j  org.eclipse.swt.widgets.Display.<init>()V+2
j  org.eclipse.ui.internal.Workbench.createDisplay()Lorg/eclipse/swt/widgets/Display;+81
j  org.eclipse.ui.PlatformUI.createDisplay()Lorg/eclipse/swt/widgets/Display;+0
j  com.worldpac.pde.application.Application.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+0
j  org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+135
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+85
j  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+82
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+105
j  org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+132
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
j  org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+205
j  org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+160
j  org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j  org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v  ~StubRoutines::call_stub
Comment 62 Till Brychcy CLA 2020-02-18 15:39:11 EST
If the problem reappears on 10.15, please create a fresh bug and also mention your java version, which might make a difference.

(But I personally currently cannot analyze this in the near future, as I don't have any Mac with 10.15 because of its lack of 32-bit support)
Comment 63 Lorenz Gerber CLA 2020-02-20 02:13:46 EST
Hi I can confirm same problem, macOS 15.3, Eclipse RCP platform (2019-12). I tried initially with a number of different JRE's and versions of JRE's until I found this bug report. Workaround with -nosplash works also here.
Comment 64 Scott Pelton CLA 2020-02-20 15:19:15 EST
Per Till's recommendation I created Bug 560364.
Comment 65 Eclipse Genie CLA 2020-09-07 04:05:27 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/168518
Comment 66 Eclipse Genie CLA 2020-09-07 04:13:45 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/168906
Comment 69 Eclipse Genie CLA 2021-03-29 10:37:48 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178117
Comment 71 arjan tijms CLA 2021-09-11 08:36:15 EDT
Perhaps related, on macOS 10.15 I get this with the latest Eclipse 4.21 using its embedded VM when I close a tree item in the Navigator:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff2031e92e __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff2034d5bd pthread_kill + 263
2   libsystem_c.dylib             	0x00007fff202a2406 abort + 125
3   libjvm.dylib                  	0x000000000f6b13c1 os::abort(bool, void*, void const*) + 49
4   libjvm.dylib                  	0x000000000f894248 VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) + 2984
5   libjvm.dylib                  	0x000000000f893675 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) + 149
6   libjvm.dylib                  	0x000000000f8942e1 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) + 33
7   libjvm.dylib                  	0x000000000f75d4b9 JVM_handle_bsd_signal + 265
8   libsystem_platform.dylib      	0x00007fff20392d7d _sigtramp + 29
9   ???                           	0xaaaaaaaaaaaaaaaa 0 + 12297829382473034410
10  com.apple.Foundation          	0x00007fff2117861d -[NSConcreteMapTable objectForKey:] + 62
11  com.apple.AppKit              	0x00007fff22d7ba72 -[NSOutlineView rowForItem:] + 75
12  libswt-pi-cocoa-4946r21.jnilib	0x0000000016faca45 Java_org_eclipse_swt_internal_cocoa_OS_objc_1msgSend__JJJ + 53
13  ???                           	0x0000000020383b68 0 + 540556136
14  ???                           	0x000000002143b064 0 + 558084196


Process:               eclipse
Path:                  /Users/USER/*/Eclipse.app/Contents/MacOS/eclipse
Identifier:            org.eclipse.platform.ide
Version:               4.21.0 (4.21.0.I20210830-0600)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           eclipse

OS Version:            macOS 11.5.2 (20G95)