beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
223 stars 102 forks source link

Check the "crash on model load fail" feature #1739

Closed sprunk closed 3 weeks ago

sprunk commented 4 weeks ago

1724 was resolved as "no can do, missing model" but 34fa44d2b54296d258f863bd65e96d266bfdeb65 was supposed to prevent that and crash at initialisation if a model fails to load. I guess the assert just gets compiled out and does nothing in release builds?

saurtron commented 4 weeks ago

Seems like this is controlled with the NDEBUG flag.

Not totally sure about how the release binaries are compiled, but the flag is most probably set for release builds. To bail out in standard operation a different mechanism should be used.

as seen in different places through the project, guess NDEBUG is standard for release builds:

lhog commented 4 weeks ago

Yep every assert() is a noop in the release code. That said I need to double-check how good this code works and possibly change that assert to a terminal error.