Opened 20 months ago
Closed 20 months ago
#12987 closed defect (fixed)
KYRA: Lands of Lore: The Throne of Chaos (Multi)
|Reported by:||BeWorld2018||Owned by:||athrxx|
|Version:||Keywords:||kyra lands lore morphos load save|
|Cc:||Game:||Lands of Lore|
ScummVM 2.5.0 release (but older same bug)i
When i load saved game from this game, ScummVM crash....
Test on Windows = OK
I suppose big endian problem.
Change History (16)
comment:1 by , 20 months ago
comment:2 by , 20 months ago
Platform: MorphOS (PowerPc)
I launch game, start to play a little and save game with scummVM, next i just try to load saved game... and crash.
I will send mail to Raziel (AmigaOS 4 PPC) to know if same problem with AmigaOS Platform.
comment:3 by , 20 months ago
Thanks, let's see if it really is an endian issue.
Did Lands of Lore ever work on MorphOS? Or is the bug new to ScummVM 2.5.0?
Unfortunately, this is difficult to debug for me, since I simply don't get the bug on my platforms. The easiest way would probably be if someone with an affected platform would do a Git bisect...
comment:4 by , 20 months ago
I just test v2.2.0 and same crash
I test older version 1.7.0.. it's ok... mmm
I try to rebuild ScummVM just with this engine and try to find where crash is (if i can...)
comment:5 by , 20 months ago
Thanks. If you tested 1.7.0 and 2.2.0 that's roughly a period from middle of 2014 to Sept 2020. Maybe you could test some versions in between to narrow it down some more.
Does it also crash if you try loading from the launcher? Or only when loading ingame?
by , 20 months ago
comment:6 by , 20 months ago
so i debug on MorphOS to check location of crash.
First think, i build exe with -Os option on GCC...
I try to build with -00 -g and ScummVM dont crash after load game but i see alway a bug and with time ScummVM and MorphOS became unstable..
i found strcpy crash here :
after that.. not sur if BE problem....
I put to your curiosity my MorphOS screenshot with some debug
comment:7 by , 20 months ago
-> i test from launcher or ingame.. same problem
comment:8 by , 20 months ago
Thanks, that strcpy crash is a good find. Interesting that this never came up on other platforms. I've pushed a fix for it. Would you please test?
comment:9 by , 20 months ago
I'm afraid i can't be of any help here.
I don't own the CD version and my floppy version is asserting after the king invites ego to the throne room (intro).
I have to admit, i didn't test the game for a long time, as it isn't my cup of tea.
Here is the log output:
User picked target 'lol' (engine ID 'kyra', game ID 'lol')...
Looking for a plugin supporting this target... Kyra
Running Lands of Lore: The Throne of Chaos (Extracted/DOS/English)
GENERAL.PAK: 0f1fabc1f67b772a30d8e05ece720ac5, 1383453 bytes.
CHAPTER7.PAK: 482308aba1c40ee32449b91b0c63b990, 325053 bytes.
assertion "idx < _size" failed: file "./common/array.h", line 238
The above is with the latest sources (including your fix) from today.
comment:10 by , 20 months ago
raziel, thanks for testing. Actually, you have been very helpful, since it confirms that the cause is probably a big endian issue.
And I think I have found it this time. It seems to be a regression from 3ae1d92f.
comment:11 by , 20 months ago
|Status:||new → pending|
I have committed a fix. Please test...
comment:12 by , 20 months ago
Can't test before Sunday, though...hope that's ok?
comment:13 by , 20 months ago
Sure, if BeWorld2018 (who got the exact same assert) gets to it first you won't even have to do it.
After finding it, it's actually pretty obvious. It's just a LE read I forgot to remove in my 2018 commit...
comment:14 by , 20 months ago
athrxx: Yeahhh working NOW, thanks !!!
comment:15 by , 20 months ago
|Resolution:||pending → fixed|
|Status:||pending → closed|
Thanks for your patience :-)
Thanks for your report. Which platform is it where you experience the crash? I understand that Windows works fine for you, but I'd also need to know which platform has the issue.
I would find it rather surprising (which doesn't mean that it is impossible) if we really had a generic endianness bug (affecting all BE platforms) in the savegame code and noone would ever come across it for the last ~10 years
EDIT: I just checked the code for a bit, the endianness handling has been like this since 75c00369 (13.12.2011). It really should read everything as big endian regardless of your platform if this is a ScummVM savegame (and not an original) savegame.