Hi,

In Gecode 4.1 creating n-ary union of variable ranges and assigning to a 
NaryUnion causes a segmentation fault, whereas in Gecode 3.7.3 it seems to 
work: 
Region myRegion(*this); 
Iter::Ranges::NaryUnion narr[2];
IntVarRanges* varRange = myRegion.alloc<IntVarRanges>(x.size()); // x is 
IntVarArray variables of the model 
for (int r=0; r < x.size(); r++) {
    varRange[r].init(x[r]);
}

narr[0]  =  Iter::Ranges::NaryUnion(myRegion, varRange, x.size());

If we instead create only one NaryUnion then it works fine in Gecode 4.1:
Iter::Ranges::NaryUnion uni(myRegion, varRange, x.size());

I also attached a minimal code demonstrating this issue. Do you think if there 
is something I'm missing here?

Attachment: test5.cpp
Description: Binary data


Cheers,
Farshid
_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to