Closed GoogleCodeExporter closed 9 years ago
Patch File:
Original comment by ikani...@gmail.com
on 15 Mar 2014 at 10:10
Attachments:
While it doesn't cause problems here, your patch look like a fix. While reading
it, I remembered another way to specify the end of an array, but without
hard-coding the size.
Could you try the following patch, and check whether it fixes your problem as
well?
I cannot trigger usage of the copy and assignment methods, it seems, so it's
untestable by me.
It should do the same as your patch, but without the 5*256 hard-coded.
Original comment by Alberth2...@gmail.com
on 15 Mar 2014 at 7:20
Attachments:
Yep, your patch worked with non-hard coded locations. I am not sure if it would
work with dynamically allocated arrays vs fixed arrays though. As for the
trigger for the assignment operator, the line was person.cpp:185
"this->recolour = person_type_data.graphics.MakeRecolouring(&this->rnd);".
This line would be triggered when a new guest was about to be created.
The actual problem though as I found through gdb was that whenever this line
was run on my machine, the parameter to member function person::activate const
Point16 &start, would actually change to different values after this line. This
weird behavior of const violation could be described because the assignment
operator function would alter addresses it was not meant to.
Perhaps you are not getting the problem on your machine because it is
allocating the same memory in different addresses, where different data would
be overwrote. I am using mingw on windows, which may allocate memory addresses
differently than what your machine does.
Original comment by ikani...@gmail.com
on 16 Mar 2014 at 1:38
In order to get person.cpp:185 to activate, set a break point at that line and
simply build a path to the edge of the map. The side of the map that has
openings for building paths to the complete edge without "invisible fencing" is
the top left. There are only certain sections that do not have the "invisible
fencing," so you may have to test every voxel for being able to build a path
there.
Original comment by ikani...@gmail.com
on 16 Mar 2014 at 1:44
Fixed in r1087, thanks!
Original comment by Alberth2...@gmail.com
on 16 Mar 2014 at 11:14
Original issue reported on code.google.com by
ikani...@gmail.com
on 15 Mar 2014 at 9:54Attachments: