Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on compilation #864

Open
kletzi opened this issue Nov 6, 2024 · 0 comments
Open

Segmentation fault on compilation #864

kletzi opened this issue Nov 6, 2024 · 0 comments
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release

Comments

@kletzi
Copy link

kletzi commented Nov 6, 2024

I have encountered several occasions of the following error with MiniZinc 2.8.7:

MiniZinc error: Memory violation detected (segmentation fault).
This is a bug. Please file a bug report using the MiniZinc bug tracker.
Process finished with non-zero exit code -1073740791.

I managed to reduce one occurrence of the problem to the following example:

array[1..10] of var 0..10: arr;
array[1..10] of var opt 0..10: arr_opt; 
constraint forall (j in 1..10) (arr_opt[j] == if j == 1 then <> else arr[j] endif);

solve satisfy;

It occurs in the compilation step independent of the selected solver, and with different optimization levels. It occurs on different machines with Windows 10 or 11, both from the IDE and command line. I am pretty sure that the original model I extracted this example from did work with a previous version of MiniZinc.

There are many small changes to the MiniZinc model that make the issue disappear:

  • Changing the constraint to if j == 1 then arr_opt[j] == <> else arr_opt[j] == arr[j] endif
  • Changing either the <> or the arr[j] in the constraint to a constant.
  • Adding the (redundant) constraint constraint arr_opt[1] == <>; to the model
@cyderize cyderize added the bug label Nov 6, 2024
@guidotack guidotack added the resolved Issue is resolved and the feature or fix will be part of next release label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release
Projects
None yet
Development

No branches or pull requests

3 participants