Hi,
However, when I convert this TSP solver to an object and call it from another Java application problem arises :
First, application executes some lines of code -which are independent from the TSP object- before creating the TSP solver object without any problem. Then, TSP solver object is created and run as expected, report a solution. After that, application runs another lines of code which are again not related to the TSP solver object but I'm getting the following error (see the attached log file for more detail)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fed6d0af94, pid=5348, tid=1540
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b15) (build 1.8.0_45-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [jniortools.dll+0xaaf94]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
As far as I understand, "jniortools.dll" does not free the memory in which JVM want to access. I checked the following most related topics to solve the issue :
Based on those discussions, I tried the following suggestions:
- changing both or-tools library and JVM from 64 bit to 32 bit,
- updating JVM,
- changing workspace directory and changing scope of objects,
- changing eclipse config.ini
- creating the object in a different thread
- Calling garbage collector after TSP solver object
but none of them solved the problem.
The only suggestion that I didn't try is downgrading JDK to 1.5 or older because I need to use recent language components (like streams API) that require the latest JDK.
Another interesting behavior of the application is that some runs are completed successfully without getting the error above. In addition, error message occurs it appears in different steps of the application. For example, if TSP solver object call is at line N, error occurs after executing line N+X where X changes everytime the application is executed
Thanks in advance for advices.
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 (6.1.7601.18869)
CPU:total 4 (2 cores per cpu, 2 threads per core)
Memory: 4k
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.45-b02) for windows-amd64 JRE (1.8.0_45-b15), built on Apr 30 2015 12:40:44 by "java_re" with MS VC++ 10.0 (VS2010)