News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

[r8387] Map size 20480x32: OutOfMemory error when opening city window

Started by Antarctica, May 24, 2018, 02:31:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Dwachs

Parsley, sage, rosemary, and maggikraut.

Antarctica

It is still/again there in 8460. The error message does not occur, but the game closes nevertheless.

Dwachs

Can you be more specific? What do you do to crash the program? The city window works for me.
Parsley, sage, rosemary, and maggikraut.

Antarctica

I have found that city windows of cities below a certain coordinate work, above it, crash, I think it's the magic number 16384.

x = 3900 works
x = 7700 works
x = 11600 works
x = 14800 works
x = 16800 crashes

Dwachs

I cannot reproduce this with the current version. Do you really have a current nightly running?
Parsley, sage, rosemary, and maggikraut.

DrSuperGood

How much RAM and what OS does your computer have? Out of Memory can be thrown if it really is out of memory.

Antarctica

My computer has 16 GB memory, of which Simutrans uses 71 MB (according to task manager) before closing unexpectedly.

Ters

If memory consumption goes from 71 MB instantly to crashing, then Simutrans must be attempting one very large memory allocation.

I have a hard time figuring out what the values for space in city_info_t::resize can be in practice, but if there is no space, it appears that the values for minimaps_size will become bad (negative).

Antarctica

Fixed in r8461, maybe as a side effect of the fix of the other bug I reported the same day. ([r8460] Auto-names of stops with coordinate > 16384)
That would explain why dwachs couldn't reproduce - he already had r8461 on his machine.

Ters

I missed the fact that the error message didn't happen after r8460. That makes it a different bug. Probably an access violation caused by the invalid coordinate calculation fixed in r8461.

Dwachs

Yes, there was indeed another bug, which was fixed in r8461: city->get_center() produced negative coordinates due to signed integer overflow: old code was (lo+ur)/2, changing this to lo/2 + ur/2 fixed it, as no overflow occurs anymore.
Parsley, sage, rosemary, and maggikraut.