The International Simutrans Forum


Author Topic: r9178 Win pak128.german 2.0 - Enlarging the map causes an array out of bounds  (Read 360 times)

0 Members and 1 Guest are viewing this topic.

Offline Constantin A.

  • *
  • Posts: 2
  • Languages: DE, EN
When enlarging a map in its width, the coordinate space doesn't seem to get enlarged as well.
The simu.log contains the exact same error message:
Code: [Select]
Simutrans version 121.1 Nightly from Aug  7 2020 r9178
FATAL ERROR: array2d_tpl<T>::at() - index out of bounds: (414,265) not in (0..383, 0..383)
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum at
(Unfortunately it doesn't state where this exception happened)
I tried enlarging the map from 768x768 to 1664x1664 (enlarging to 768x1664 works, enlarging to 896x768 doesn't work either).

pak128 seems to have the same issue.

Steps to reproduce:
  • Create a new map
  • Open the map enlargement dialog
  • Put a larger value in the first field (or in both)
  • The game crashes

Offline Constantin A.

  • *
  • Posts: 2
  • Languages: DE, EN
One thing I just noticed: When enlarging by small values (e.g. 10, I'm still experimenting), it doesn't crash.
EDIT: Sometimes it does crash, even when using small values.

Offline ceeac

  • Devotee
  • *
  • Posts: 259
This patch should fix the crash.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10669
  • Languages: De,EN,JP
Thanks for spotting this one. In in r9180