[gecode-users] Some error - I just cannot find it (Windows)

Mailing List Email mailinglistx at gmail.com
Sat May 18 03:33:16 CEST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130518/68214b10/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Temp.cpp
Type: text/x-c++src
Size: 8060 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20130518/68214b10/attachment.cpp>


More information about the users mailing list