Hi,
I am using the Java API to solve an optimization problem with CPLEX 12.6.3.0 on Windows 10. My issue is that the solver: sometimes work fine; sometimes starts solving and suddenly stop without any reasons and without sending any exit code; sometimes sends back the following error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd16e365a9, pid=11012, tid=26108
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.2+8 (17.0.2+8) (build 17.0.2+8)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (17.0.2+8, mixed mode, tiered, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [cplex1263remotejni.dll+0x865a9]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#
https://github.com/adoptium/adoptium-support/issues# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- S U M M A R Y ------------
Command Line: -Xms56G -Dfile.encoding=Cp1252 -XX:+ShowCodeDetailsInExceptionMessages mypack.Jfa_solve_exactly
Host: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz, 16 cores, 63G, Windows 10 , 64 bit Build 19041 (10.0.19041.1682)
Time: Tue Jul 19 14:46:10 2022 Eastern Daylight Time elapsed time: 0.820294 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x0000020ccf0bbb70): JavaThread "main" [_thread_in_native, id=26108, stack(0x0000003d83500000,0x0000003d83600000)]
Stack: [0x0000003d83500000,0x0000003d83600000], sp=0x0000003d835fad40, free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [cplex1263remotejni.dll+0x865a9]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j ilog.cplex.Cplex.CPXmipopt(JJ)I+0
j ilog.cplex.CplexI$SolveHandle.start()V+278
j ilog.cplex.CplexI.solve()V+12
j ilog.cplex.IloCplex.solve()Z+4
j mypack.prob.main([Ljava/lang/String;)V+288
v ~StubRoutines::call_stub
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), writing address 0x0000000000000000
The error log goes on.
The error doesn't seem to be related to the mathematical model because when I export the problem to a lp file, the CPLEX interactive optimizer of the command window can solve it successfully.
I have also tried various combination of constraints and various data samples, but the issue doesn't seem to be related to any specific constraint or data. I also tried simplifying my code to post it online, but as the code simplifies, the error disappears.
Any hint on how I could resolve my issue?
Thank you
------------------------------
Olivier B
------------------------------
#DecisionOptimization