Error when instanciating a HighsLp object #1569
Replies: 9 comments
-
Strange, I'll have a look tomorrow |
Beta Was this translation helpful? Give feedback.
-
I've no idea what might be wrong with clearing these vectors. |
Beta Was this translation helpful? Give feedback.
-
Thank you for having take time to investigate. I will continue to search on my side |
Beta Was this translation helpful? Give feedback.
-
Was the HiGHS build you tried in debug or release? I will try to reproduce the error on one windows machine. Thank you for flagging this up! |
Beta Was this translation helpful? Give feedback.
-
The build was in Debug config |
Beta Was this translation helpful? Give feedback.
-
My mistake, it was in Release config. Sorry |
Beta Was this translation helpful? Give feedback.
-
I have faced with the same issue and found the root of the problem. It was different compilation options used by a project and pre-build library. In my case it's highs64int options, my project had define for it, but vcpkg prebuild library not, so incompatible types were used. |
Beta Was this translation helpful? Give feedback.
-
That's excellent, @IIIypuk09! I'll convert this issue into a discussion |
Beta Was this translation helpful? Give feedback.
-
Hello all, Note: I find an unpleasant fix. When installing the dll with a Debug configuration ( |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am using Highs for a cpp project. In this project, I need to create a HighsLp object. Unfortunately, this error occurs :
Exception thrown at 0x00007FFB3F2C076C (highs.dll) in TestHighsLp.exe: 0xC0000005: Access violation writing location 0x0000000000000000.
I made a test project to isolate the issue. Here are the cpp file and the cmake configuration file :
I am working on Windows11 with MSVC :
Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x86.
I have tried to generate the lib from the latest release (1.6) and from master (SHA 806a56a) and in both case, I got the issue.
The Highs lib and dll have been generated with the following configuration.
I have instigated a little bit more the issue :
The issue is raised by HighsLp::clear() method that has been called by the HighsLp constructor.
HiGHS/src/lp_data/HighsLp.h
Line 24 in 806a56a
By editing this method :
https://github.com/ERGO-Code/HiGHS/blob/806a56aa81ab13eed79dddd7cd36b43c87845780/src/lp_data/HighsLp.cpp#L150C24-L150C24
I find that the issue comes from the initialisation of the model_name_ and objective_name variables.
When running the same code from the Highs repository by editing "call_highs_from_cpp.cpp" file, it works correctly
Does someone have any ideas how to fix this issue or how to big deeper ?
Beta Was this translation helpful? Give feedback.
All reactions