Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crash]: New game with certain NewGRF causes crash #9562

Closed
MontyMontana opened this issue Sep 19, 2021 · 3 comments
Closed

[Crash]: New game with certain NewGRF causes crash #9562

MontyMontana opened this issue Sep 19, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@MontyMontana
Copy link

MontyMontana commented Sep 19, 2021

Version of OpenTTD

12.0-beta2 on Linux Mint 20.2 using OpenTTD for Linux Ubuntu Focal 20.04 (x86_64, 64 bit)

Steps to reproduce

  1. Set NewGRF Hungarian Truck Set 2.1 at the NewGRF configuration (NewGRF attached).
  2. Start a new game.
  3. Before the game and scenario is even created, game crashes.

Also, savegames from previous versions containing this NewGRF causes crash when loading. Scenario editor too.

Attached: crash log, dmp and sav, NewGRF causing crashes, image containing NewGRF info.

Upload crash files

Crash.zip
teherautow.GRF.zip
NewGRF_info

@TrueBrain
Copy link
Member

TrueBrain commented Sep 19, 2021

Backtrace:

#0  0x000055556337c537 in NewSpriteGroup (buf=0x7fffd83b0620) at OpenTTD/src/newgrf.cpp:5194
#1  0x000055556339bea2 in DecodeSpecialSprite (buf=0x60d000293420 "\002\001\022", num=13, stage=GLS_ACTIVATION) at OpenTTD/src/newgrf.cpp:9346
#2  0x000055556339cd91 in LoadNewGRFFileFromFile (config=0x617000213280, stage=GLS_ACTIVATION, file=...) at OpenTTD/src/newgrf.cpp:9412
#3  0x000055556339d57d in LoadNewGRFFile (config=0x617000213280, stage=GLS_ACTIVATION, subdir=NEWGRF_DIR, temporary=false) at OpenTTD/src/newgrf.cpp:9474
#4  0x00005555633a2c09 in LoadNewGRF (load_index=6164, num_baseset=2) at OpenTTD/src/newgrf.cpp:9862
#5  0x0000555563182382 in LoadSpriteTables () at OpenTTD/src/gfxinit.cpp:222
#6  0x00005555631847c5 in GfxLoadSprites () at OpenTTD/src/gfxinit.cpp:352

Local variables:

(gdb) print loaded
$1 = std::vector of length 0, capacity 0
(gdb) print loading
$2 = std::vector of length 0, capacity 0
(gdb) print num_loaded
$3 = 0 '\000'
(gdb) print num_loading
$4 = 0 '\000'

@TrueBrain TrueBrain added the bug Something isn't working label Sep 19, 2021
@glx22
Copy link
Contributor

glx22 commented Sep 19, 2021

num_loaded and num_loading are both 0 for setid 18 (0x12) but https://newgrf-specs.tt-wiki.net/wiki/Action2/Vehicles states "Neither num-loadtypes nor num-loadingtypes may be zero, there must be at least one state for each"

@JGRennison
Copy link
Contributor

Seems to point to: 40cec34 #9344

@TrueBrain TrueBrain added this to the 12.0 milestone Sep 19, 2021
PeterN added a commit to PeterN/OpenTTD that referenced this issue Sep 19, 2021
PeterN added a commit to PeterN/OpenTTD that referenced this issue Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants