OpenRCT2 / OpenRCT2

An open source re-implementation of RollerCoaster Tycoon 2 🎢
https://openrct2.io
GNU General Public License v3.0
13.28k stars 1.52k forks source link

Game crash when switching from "Software" to "Software (Hardware display)" #22316

Closed Basssiiie closed 3 weeks ago

Basssiiie commented 1 month ago

Operating System

Windows 10, 64-bit

OpenRCT2 build

OpenRCT2, v0.4.12-60-g461b4b9 (461b4b9 on develop) provided by GitHub

Base game

RollerCoaster Tycoon 2

Area(s) with this issue?

No response

Describe the issue

My game crashes when I switch from the "Software" to the "Software (Hardware display)" drawing engine.

I get the following output in my stdout:

WARNING[D:\a\OpenRCT2\OpenRCT2\src\openrct2-ui\drawing\engines\HardwareDisplayDrawingEngine.cpp:103 (HardwareDisplayDrawingEngine::Resize)]: HWDisplayDrawingEngine::Resize error: Parameter 'renderer' is invalid

The second attempt also generated a crash with dump, along side more warnings and errors (probably because of the first warning):

WARNING[D:\a\OpenRCT2\OpenRCT2\src\openrct2\core\Imaging.cpp:55 (Imaging::PngWarning)]: Image width is zero in IHDR
WARNING[D:\a\OpenRCT2\OpenRCT2\src\openrct2\core\Imaging.cpp:55 (Imaging::PngWarning)]: Image height is zero in IHDR
ERROR[D:\a\OpenRCT2\OpenRCT2\src\openrct2\core\Imaging.cpp:60 (Imaging::PngError)]: Invalid IHDR data
openrct2 $ libpng error: Invalid IHDR data
ERROR[D:\a\OpenRCT2\OpenRCT2\src\openrct2\interface\Screenshot.cpp:73 (WriteDpiToFile)]: Unable to write png: PNG ERROR

Steps to reproduce

  1. Open Options.
  2. Select "Software" drawing engine.
  3. Select "Software (Hardware Display)" drawing engine.
  4. Crash.

Surprisingly enough everything works fine if I switch from OpenGL to "Software (Hardware Display)".

Attachments

crash.zip

cheweytoo commented 1 month ago

This seems to be OS-specific: I see no crash with the Linux AppImage build, from 3467760 develop.