[gecode-users] Some error - I just cannot find it (Windows)
Guido Tack
tack at gecode.org
Wed May 29 01:28:33 CEST 2013
I tried it on Mac OS and it works, no crash. Perhaps it's a problem in the compiler's support for C++11, it's all still quite experimental it seems. Did you compile Gecode with exactly the same flags and compiler as the example?
Cheers,
Guido
On 29/05/2013, at 9:08 AM, Mailing List Email <mailinglistx at gmail.com> wrote:
> Hi,
>
> No, it's not entirely self contained. It was just a dumbed down cut and paste in order to see if anyone could find some quick glaring errors.
> Anyway, here is a minimal example that produced the bug - the crash, at least as far as I could conveniently reduce it to.
> To reproduce the crash: run Gist to find all solutions (press "A"). Then double-click twice on the solution node (the yellow node).
> The program will crash.
>
>
> On 28 May 2013 22:52, Guido Tack <tack at gecode.org> wrote:
> Hi,
>
> your sample code does not compile, are you sure it's self contained? E.g. XGecodeVector2 initialises m_valid which is not defined (and there seem to be other problems).
>
> Cheers,
> Guido
>
> --
> Guido Tack
> http://www.csse.monash.edu/~guidot/
>
>
>
> On 18/05/2013, at 11:33 AM, Mailing List Email <mailinglistx at gmail.com> wrote:
>
>> Hi all,
>>
>> In my project that I'm working on, I seem to get strange errors, but I cannot seem to be able to figure out why, so I figured perhaps you might give some insight into the problem.
>> I'm attaching a simplified version (but not a minimal example) of the code to where I have tracked down the problem. I don't want to force you to sift through tons of code. I included the most relevant parts only. I can provide the full source (it isn't that big) upon request, though. That is fine.
>>
>> My best guess is that there is some memory corruption - some memory getting freed and is then overwritten somewhere. But it might be something else entirely - like I said, I'm not sure because my results are conflicting.
>> I have the tracked the problem down to being the m_rectangle variable. The culprit seems to be the line
>>
>> r1 = std::move(m_rectangles.v().back());
>>
>> If I remove it, all works fine. I have tried using both a Gecode space allocator and the normal standard allocator - both produce the same thing.
>> Because it's memory corruption or something, the bug appears differently depending on how the code is run - never in a single place (unless run under the same parameters).
>>
>> Am I doing this right? Am I missing something? I just can't see what. I have been trying to wrap my head around this for a long time now, but I can't seem to find anything.
>> I hate to ask you to go through a lot of code, but I'm stuck here, so I'd appreciate a little insight -- any insight.
>>
>> I just hope the mailing list accepts attachments. I would hate to have to provide source inline.
>> <Temp.cpp>_______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
> <NoOverlap.cpp><SquarePacking.cpp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130529/23366eda/attachment.html>
More information about the users
mailing list