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

Game crashes before "missing NewGRFs" warning #2469

Closed
DorpsGek opened this issue Dec 21, 2008 · 9 comments
Closed

Game crashes before "missing NewGRFs" warning #2469

DorpsGek opened this issue Dec 21, 2008 · 9 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

planetmaker opened the ticket and wrote:

Using clean trunk checkout r14708: When trying to load this savegame http://www.openttdcoop.org/files/publicserver_archive/PublicServerGame_90_Final.sav OpenTTD crashes with an assertion:

/ottd/trunk.hg/src/pbs.cpp:83: failed assertion `(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0'

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2469
@DorpsGek
Copy link
Member Author

planetmaker wrote:

Hm... seems like it's a missing or changed NewGRF issue. I copied my old grfpack versions into the data dir and it loads now. Not sure though whether OpenTTD should crash on missing or changed grfs for savegames...


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5136

@DorpsGek
Copy link
Member Author

Rubidium wrote:

The only really safe way is to disallow starting a game without the correct NewGRFs. So should we everytime you change NewGRFs, either voluntary via the GUI or involuntary when not having the right NewGRFs, abort the game and tell you miss some NewGRFs?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5137

@DorpsGek
Copy link
Member Author

planetmaker wrote:

I guess not. But it might be an idea to notify the user that there are grf issues, requiring an active user acknowledgement of it, and only then continue to load (and risk crashing). That way the user at least knows why the game crashed.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5139

@DorpsGek
Copy link
Member Author

Rubidium wrote:

The problem is that we only know there are invalid NewGRFs halfway during the loading of the game. OpenTTD requires the state to be valid when doing the drawing. Especially in the case of missing NewGRFs we are in an invalid state.

So we need to abort the loading of the savegame and return to the main menu... to just show the message that there are missing NewGRFs. But at that time that information is lost by loading the intro game. That still leaves us with the question how to load the game overriding the fallback to the intro game.

That "leaves" catching all segfaults and assertions and checking whether the game contains an invalid NewGRF config in the handler and show stuff then... but that breaks the debuggers ability to catch the segfaults and assertions... which makes it harder to do debugging.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5153

@DorpsGek
Copy link
Member Author

PhilSophus wrote:

As for breaking debugging: IMHO this issue should at least trigger debugging output of grf level 0 or 1 (I would vote for 0, as risking to trigger an assertion seems to be a "severe warning"). But even with level 2 it does not give the slightest indication that NewGRFs with the correct GRF-ID but "wrong" MD5 hash (so-called "compatible" NewGRFs) were loaded.

I agree, that given the situation you describe, showing a warning in the GUI does seem overkill. The more as it could be argued that a NewGRF having such incompatibilities as ISR 0.7.x vs. 0.8.0 (changes between track and non-track station tiles) should not have the same GRF-ID.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5157

@DorpsGek
Copy link
Member Author

Rubidium wrote:

It's already dumping stuff to the console at debug level 0 (missing) and 1 ("compatible" loaded). The major problem with this is that Windows users usually don't see it because they don't have a console opened.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5158

@DorpsGek
Copy link
Member Author

PhilSophus wrote:

Strange, I must have missed both of these outputs (or they didn't come out). I'll check that.

Is the need to have a console open really an issue? I mean, the debugging output isn't very digestible to the end-user anyway ;-) and people benefiting from the output usually know what to do to get it.

EDIT: Hmmm, the debugging output is really there. It seems my glasses need an upgrade rather than OpenTTD ;-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5159

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Phil, you started about the debugging output (and therefore console). That has absolutely nothing to do with catching segfaults and assertions and showing an appropriate message (for end users) saying that the crash is most likely caused by missing NewGRFs.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469#comment5160

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

or something like that in r14773; we now try to catch the crash and tell which NewGRFs are not loaded.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2469

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant