codenamecpp / carnage3d

Reimplementation of Grand Theft Auto 1 [GTA1]
MIT License
480 stars 38 forks source link

Instant crash when loading SANB.CMP #66

Closed MiroslavR closed 3 years ago

MiroslavR commented 3 years ago

Loading SANB.CMP crashes instantly. Can be reproduced with MIAMI.CMP and NYC.CMP too if you zoom out a bit.

Call stack:

1 SpriteBatch::GenerateSpritesBatches SpriteBatch.cpp      119 0x4c7adc 
2 SpriteBatch::Flush                  SpriteBatch.cpp      41  0x4c7576 
3 MapRenderer::RenderFrame            MapRenderer.cpp      131 0x49566d 
4 RenderingManager::RenderFrame       RenderingManager.cpp 66  0x4bf221 
5 System::ExecuteFrame                System.cpp           296 0x4e755d 
6 System::Run                         System.cpp           162 0x4e72e3 
7 main                                Main.cpp             8   0x49508b 

(looks like sprite->mTexture is nullptr)

codenamecpp commented 3 years ago

Damn. This crash never showed up in debug mode for some reason but only in release build. Fix [1957eba]