Opened 11 years ago
Closed 5 years ago
#6145 closed defect (fixed)
TINSEL: DW1 PSX Assertion on Savegame Load
|Reported by:||raziel-||Owned by:||dreammaster|
ScummVM 1.6.0git (Sep 22 2012 10:37:02) Features compiled in: Vorbis FLAC MP3 RGB zLib Theora AAC FreeType2
On loading the attached save i get a black screen and an assertion assertion "g_McurObj" failed: file "engines/tinsel/cursor.cpp", line 225
I got this before when i had more problems with the PS version of this game, but it was fixed in the process. Now this assertion is back again.
Happens everytime i try to load the game. I can go back to an earlier save state but this assertion comes crawling back everytime
Discworld (CD/Sony PlayStation/English)
gcc (GCC) 4.2.4 (adtools build 20090118) AmigaOS4 - PPC - SDL - BE
Ticket imported from: #3570680. Ticket imported from: bugs/6145.
Change History (9)
by , 11 years ago
comment:1 by , 11 years ago
|Summary:||DW1: PS version gets an assertion on loading a save → TINSEL: DW1 PSX Assertion on Savegame Load|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
raziel_: This is due to the non-const global variable usage in the Tinsel Cursor functions. If you use RTL (Return To Launcher) or load via the Launcher Load, it is likely to error. The relevant lines are even marked with " // FIXME: Avoid non-const global vars".
dreammaster: Any ideas on how easy it would be to refactor this part of the Tinsel engine to move these variables to engine member variables?
comment:4 by , 11 years ago
Well, on the bright side, the major work of identifying global variables has already be done, so that's a plus. Given the state of the engine, I think we'd need to go with a compromise solution, having a single 'Globals' class and 'g_globals' pointer. The Globals constructor could then do all the initialisation to NULL of all the fields, allowing the engine to be properly re-enterable.
That way, each source file would include a 'globals.h', and we end up with code like 'g_globals->objectList' or 'g_globals->gCurrentCD'.
This refactoring could be done anyone with some time on their hands. If there's no volenteer's, I'll try to tackle it in the near future.
comment:5 by , 10 years ago
Interestingly the function in which this assert is located does not do what its comments claim in the case g_McurObj == 0. It has been like that since the original commit of the Tinsel engine, though.
comment:6 by , 10 years ago
This can be closed
I can't pinpoint the revision but it definitely does'nt come up anymore.
The attached save file though will still produce the error mentioned, so i'm tempted to say it has erroneous flags set or something like that
At least i played through the whole game without a crash or anything on saving, loading or playing
Thanks for the ongoing great work
comment:7 by , 10 years ago
Yeah, well, talked too early
The assertion is still there, as tdhs pointed out, when loading from the launcher.
Loading ingame through "F1" strangely works though, so i can at least replay the game without too much hassle
comment:8 by , 5 years ago
|Status:||new → closed|
Closing this; it turned out to be a problem only when loading savegames from the launcher that were saved whilst an item was being held. I've fixed the problem when loading savegames in such a case.
Assertion on loading