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 for program with floats and division #870

Open
LukasSpukas opened this issue Dec 6, 2024 · 2 comments
Open

segmentation fault for program with floats and division #870

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

Comments

@LukasSpukas
Copy link

I have encountered a segmentation fault in the MiniZincIDE while trying to convert a model description written in the product configuration language COOM.
SCIP and HiGHS both give this fault when I try running the program.
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 6.

I think the other solvers don't suppert all the features needed for this problem.
My MiniZinc representation is this:

type SundayBike = record (
  float: reach,
  float: stack,
  float: seatTubeAngle,
  float: effectiveTopTubeLength,
  TopTubeBag: topTubeBag
);

enum TopTubeBag = {short, middle, long};
array[TopTubeBag] of int: topTubeBag_length = {550, 600, 650};

var SundayBike: sundayBike;

constraint sundayBike.reach == 470.0;
constraint sundayBike.stack == 600.0;
constraint sundayBike.seatTubeAngle == 0.0174533;
constraint sundayBike.effectiveTopTubeLength == sundayBike.reach + (sundayBike.stack / tan(sundayBike.seatTubeAngle));

constraint topTubeBag_length[sundayBike.topTubeBag] + 30 < sundayBike.effectiveTopTubeLength;
@Dekker1 Dekker1 transferred this issue from MiniZinc/MiniZincIDE Dec 8, 2024
@Dekker1
Copy link
Member

Dekker1 commented Dec 8, 2024

The problem seems to occur in output processing. The instance is still linear, but a float_times is moved to the output model, where no definition appears to be present.

@Dekker1
Copy link
Member

Dekker1 commented Dec 9, 2024

I've resolved the issue that caused the segfault, but currently the instance still doesn't solve because the instance remains quadratic in the compiler. This seems to be caused by the tan function not using the par function. We will further investigate whether we can resolve this as well.

@Dekker1 Dekker1 added bug resolved Issue is resolved and the feature or fix will be part of next release labels Dec 9, 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

2 participants