Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 539867

Summary: SIGSEGV with Mac OS X Mojave when running a launch configuration
Product: [Eclipse Project] Platform Reporter: Olivier Prouvost <olivier.prouvost>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: blocker    
Priority: P3 CC: register.eclipse
Version: 4.8   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Bug Depends on:    
Bug Blocks: 538976, 539850    
Attachments:
Description Flags
Log in my Eclipse launcher (got in console)
none
The log file got when I launch using the command line (2nd case) none

Description Olivier Prouvost CLA 2018-10-05 18:24:28 EDT
Created attachment 276146 [details]
Log in my Eclipse launcher (got in console)

My Eclipse works well (Eclipse Modeling installed with XText, WindowBuilder, ...)

But... I have a blocker bug with SWT. 

There are 2 different results : 

FIRST RESULT 
=============

I use a launch configuration to test my eclipse (I am fixing the bug on window builder with Mojave), I get a SIGSEVG in my log file. 

This bug appears whatever the JDK I use : 1.8, 10 or 11. 

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=696, tid=775
#
# JRE version: OpenJDK Runtime Environment (11.0+28) (build 11+28)
# Java VM: OpenJDK 64-Bit Server VM (11+28, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Applications/EclipsePhoton09.app/Contents/MacOS/hs_err_pid696.log


SECOND RESULT 
==============

I use the command provided by the launch configuration dialog, I get an : 

org.eclipse.swt.SWTException: Invalid thread access

There is no trace about the SIGSEGV (but it is probably raised and it breaks with an invalid Thread Access). I attach the file result.txt for this trace.



CONCLUSION 
===========

With Mojave we can launch Eclipse, but we can not launch it twice with another launch configuration, when the first Eclipse is running, and whatever the JDK we use.
Comment 1 Olivier Prouvost CLA 2018-10-05 18:26:06 EDT
Created attachment 276147 [details]
The log file got when I launch using the command line (2nd case)

This is the log file I got when I launched with the command line proposed by the launch configuration dialog. 

Actually it was (I added the > result.txt at the end) : 

/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java -Declipse.pde.launch=true --add-modules=ALL-SYSTEM -Dfile.encoding=UTF-8 -classpath /Applications/EclipsePhoton09.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar org.eclipse.equinox.launcher.Main -launcher /Applications/EclipsePhoton09.app/Contents/Eclipse/Eclipse.app/Contents/MacOS/eclipse -name Eclipse -showsplash 600 -product org.eclipse.platform.ide -data /Users/olivier/Documents/OPCoach/workspaces/windowbuilder/../runtime-windowbuilder -configuration file:/Users/olivier/Documents/OPCoach/workspaces/windowbuilder/.metadata/.plugins/org.eclipse.pde.core/windowbuilder/ -dev file:/Users/olivier/Documents/OPCoach/workspaces/windowbuilder/.metadata/.plugins/org.eclipse.pde.core/windowbuilder/dev.properties -os macosx -ws cocoa -arch x86_64 -nl fr_FR -consoleLog > result.txt
Comment 2 Olivier Prouvost CLA 2018-10-05 18:35:52 EDT
The bug is the same with Eclipse Photon 4.8.0 and Eclipse Photon Version: 2018-09 (4.9.0).  Of September... 

as the bug is in SWT
Comment 3 Till Brychcy CLA 2018-10-06 17:04:22 EDT
The SIGSEGV is a duplicate of bug 538377:
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


For the other bug, maybe the "Show command line"-Button doesn't work correctly for Eclipse Application launches.
Can you please look at the command line at the properties of the already terminated process and compare if the command line is the same. If not, this might be the root cause for the other bug. In that case, please create a bug for that.

*** This bug has been marked as a duplicate of bug 538377 ***
Comment 4 Till Brychcy CLA 2018-10-06 17:06:30 EDT
BTW: The workaround from bug 538377 is to launch without slash screen (use -nosplash instead of the -showsplash 600)
Comment 5 Olivier Prouvost CLA 2018-10-06 17:18:46 EDT
Thank you for the Work Around... -no splash works well ...
Comment 6 Olivier Prouvost CLA 2018-10-06 17:37:36 EDT
For the command, it seems to be the same. The class path is not mentioned in the log after the crash when using the launch configuration but I guess this is the same than the generated command line.