From: Guimarans S. D. <d.g...@hv...> - 2016-11-04 13:53:35
|
Hello, I am writing to report an issue I found when trying to execute Java code with calls to eclipse.jar on Mac OS X 10.12.1 (Sierra). The JDK version is 1.8.0_112-b16. The Java code executes normally if calls to the ECLiPSe engine are removed. The JVM crashes when trying to create an instance of EclipseEngineOptions, providing the following error: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fffd8abdb92, pid=20115, tid=0x0000000000001703 # # JRE version: Java(TM) SE Runtime Environment (8.0_112-b16) (build 1.8.0_112-b16) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.112-b16 mixed mode bsd-amd64 compressed oops) # Problematic frame: # C [libsystem_c.dylib+0x1b92] strlen+0x12 # # Failed to write core dump. 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: # /Users/Matthijs/Documents/Workspace/Gate_Assignment_Problem/hs_err_pid20115.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # The problem only exists when executed in the last Mac OS X update. I run a class with about 40 students, but only 4 of them found this issue (the ones who had upgraded to the last OSX version). I upgraded one of my computers and obtained the same error. Previous versions of OSX and Windows users found no issues. I have not tested it on other OS. A sample of the call creating the problem is attached in the following code: import com.parctechnologies.eclipse.*; import java.io.*; public class EclipseConnection { private EclipseEngine eclipse; private Object f; private Object w; private Object cost; private Object costSwaps; private Object costPAX; private Object costBAX; public EclipseConnection(String eclipseDirectory, String problemSolver, String instanceFileName) { EclipseEngineOptions eclipseEngineOptions = new EclipseEngineOptions(new File(eclipseDirectory)); eclipseEngineOptions.setUseQueues(true); try { eclipse = EmbeddedEclipse.getInstance(eclipseEngineOptions); eclipse.compile(new File(instanceFileName)); eclipse.compile(new File(problemSolver)); } catch (EclipseException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public void callSolver(int alpha, int beta, int gamma, int timeout) { CompoundTerm result; try { result = eclipse.rpc("solve_gap(" + alpha + "," + beta + "," + gamma + "," + timeout + ",F,W,Cost,CostSwaps,CostPAX,CostBAX)"); f = result.arg(5); w = result.arg(6); cost = result.arg(7); costSwaps = result.arg(8); costPAX = result.arg(9); costBAX = result.arg(10); } catch (EclipseException e) { System.out.println("No feasible solution"); } catch (IOException e) { e.printStackTrace(); } } public void destroy() { try { ((EmbeddedEclipse) eclipse).destroy(); } catch (IOException e) { e.printStackTrace(); } } } Kind regards, Daniel — Daniel Guimarans Aviation Academy, Amsterdam University of Applied Sciences dguimarans.net<http://dguimarans.net> |