News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

RC crash when rotating map

Started by killwater, December 09, 2012, 12:26:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

killwater

Hello
There is a problem with rotating map more then once: it gives an error: "FATAL ERROR: sim_new_handler() OUT OF MEMORY or other error allocating a new object"
This seem to be connected with both speed of rotating and amount of rotations. New games with few vehicles require more rotations to crash than developed one.

jamespetts

Thank you for the report.

Hmm, this looks like a possible memory leak. Bernd - any thoughts on this?

Bernd Gabriel

#2
Rotating a 1024x768 game consumed about 2 MB per rotation for the first 4 rotations.
The 5th rotation crashed the game:

void stadt_t::rotate90( const sint16 y_size ) produces ways too many city connexions!
I saw it generating 43386 new connections for originally 16.
Most probably it is not the best idea to remove items from connected_cities without using the iterator while iterating through it.

I pushed a fix to my "112.x merge" branch.

jamespetts

Thank you for that - merged with my own 112.x branch.