Opened 5 months ago

Closed 5 months ago

#13458 closed defect (fixed)

COMMON: Wrong game id detected during engine id upgrade

Reported by: TrivialBalderdash Owned by: sluicebox
Priority: normal Component: Common
Version: Keywords:
Cc: TrivialBalderdash Game:

Description

When trying to play games previously assed to ScummVM, I get a "Game Data Not Found" error. Upon further investigation, it's many, but not all, of the SCI games in my library.

I'm using ScummVM 2.5.1 on MacOS 11.6.5 (Intel)

Checking the ScummVM Preferences File '../Library/Preferences/ScummVM Preferences', I saw something interesting with the games not working:


Broken: (as-is)
[torin]
engineid=sci
gui_saveload_last_pos=0
platform=windows
enable_hq_video=true
originalsaveload=false
guioptions=sndNoMIDI noAspect gameOption2 gameOption9 gameOptionA lang_English
enable_black_lined_video=false
oldgameid=sci
description=Torin's Passage (Windows/English)
path=/Users/<removed>/Games/Game Data/Torin
gameid=sq5
language=en

Game deleted and re-added (working):
[torin]
platform=windows
enable_hq_video=true
gameid=torin
originalsaveload=false
description=Torin's Passage (Windows/English)
language=en
path=/Users/<removed>/Games/Game Data/Torin
enable_black_lined_video=false
engineid=sci
guioptions=sndNoMIDI noAspect gameOption2 gameOption9 gameOptionA lang_English

Here's another:
[lsl6hires]
engineid=sci
gui_saveload_last_pos=0
platform=pc
originalsaveload=false
guioptions=sndLinkSpeechToSfx noAspect gameOption2 lang_English
oldgameid=sci
description=Leisure Suit Larry 6: Shape Up or Slip Out! (Hi-res/DOS/English)
path=/Users/<removed>/Games/Game Data/LSL6Hi
gameid=lsl3
language=en

[lsl6hires]
platform=pc
gameid=lsl6hires
originalsaveload=false
description=Leisure Suit Larry 6: Shape Up or Slip Out! (Hi-res/DOS/English)
language=en
extra=Hi-res
gui_saveload_last_pos=0
path=/Users/<removed>/Games/Game Data/LSL6Hi
engineid=sci
guioptions=sndLinkSpeechToSfx noAspect gameOption2 lang_English


I have used development builds in the past to test new games/engines. Is it possible something was corrupted over time when switching versions?
Both games incorrectly listed above - Larry 3 & Space Quest 5 - are in my library and work fine.
The issue does seem to be isolated to SCI games.

Thank you for taking a look into this issue.

Change History (3)

comment:1 by sluicebox, 5 months ago

Hello, thank you for reporting this and including the relevant the config file info.

It's just fine to bounce back and forth between release and development versions. An exception to that could be if one of those versions is really *really* old. But that's unlikely. Although if that is what happened, it would be good to know.

My guess: the code that automatically upgrades the "gameid" in the config file picked the wrong one. I have a fuzzy memory of ending up with some wrong gameid's back when code was added in 2019. I'll try some tests with those games to see if I can reproduce, but the good news for you is that if that's what happened, it's a one-time thing.

In 2019 we changed how the gameid setting worked. When a game is launched with an old gameid, ScummVM detects that and automatically upgrades it to the new one. That involves asking the detection engine "which exact game is this?" and using the first result. It creates "oldgameid" as a record of the upgrade. At this point, that upgrade code doesn't run very much. You'd have to run a game that you had added before the 2019 change that you haven't run since. The upgrade code will continue to run less and less as time goes on.

comment:2 by sluicebox, 5 months ago

I can reproduce this with Torin and SQ5 going from 2.1.0 (pre-gameid) to latest. The upgrade does seem to be getting confused with other games that are in the config file. Yikes!

comment:3 by sluicebox, 5 months ago

Component: Engine: SCICommon
Owner: set to sluicebox
Resolution: fixed
Status: newclosed
Summary: SCI: SCI game detections corruptedCOMMON: Wrong game id detected during engine id upgrade

Fixed in: https://github.com/scummvm/scummvm/commit/799a9eb9428db1d749444aff58456b10ffc62318

If you ran a game, then returned to launcher and ran another game whose config entry needed to be upgraded, it was possible that the second game would be detected as the first. A cache wasn't cleared.

Thanks again for reporting!

Note: See TracTickets for help on using tickets.