#14197 closed defect (fixed)

AGS: Kathy Rain: "Image Editor" issue when using the PC

Reported by: tag2015 Owned by: tag2015
Priority: normal Component: Engine: AGS
Version: Keywords: ags, kathy rain, priority
Cc: Game:

Description (last modified by tag2015)

The PC in Kathy Rain has always been glitchy, but now it's no longer usable.
When using the PC you should see the login (login/password) screen, but on scummvm it disappears immediately and you can't enter anything.
One of the puzzles requires entering the wrong password on purpose to fool the IT guy, so this bug makes the puzzle unsolvable.
See walkthrough
https://youtu.be/wR4gaomsZ6c?t=4112

Steps to reproduce:

  1. Use Boot disc on PC
  2. Corrupt MBR
  3. Call IT guy using the phone
  4. When he asks you to login, see that the screen disappears immediately

An additional bug: The button to leave the PC screen (bottom right) is not visible (although it works)

This is most likely related to bugs #13725 #13724 and #13780
ScummVM 2.7.0 Win10

Attachments (3)

kathyrain.005 (863.5 KB ) - added by tag2015 16 months ago.
kathyrain.030 (784.0 KB ) - added by tag2015 15 months ago.
v2.6.0 Day 2 save
kathyrain.008 (801.8 KB ) - added by digitall 15 months ago.

Change History (28)

by tag2015, 16 months ago

Attachment: kathyrain.005 added

comment:1 by tag2015, 16 months ago

Description: modified (diff)

comment:2 by digitall, 15 months ago

I hit these same bugs a while back in Kathy Rain and it stopped me from progressing. This was on Linux x86_64 so not platform specific and this is not a recent regression.

If I can load from my savegame to replicate, I will try doing a check of older revisions of the AGS engine / bisection to see if I can locate if this is a regression.

comment:3 by digitall, 15 months ago

Did some testing. I can't bisect earlier than the following commit as the savegame format was changed to be incompatible at that point and will not load. The bug is still present until that point:
commit 91d25a3098b0ef967ae4eaf4e830d21cc1922631
Author: Paul Gilbert <dreammaster@…>
Date: Mon May 9 21:22:10 2022 -0700

AGS: Added animation volumes to save format


From upstream 752da45aa7666355e383df0f1017cf5c5842fea1

comment:4 by digitall, 15 months ago

@tag2015: Was this completable with v2.5.0 or v2.6.0 releases? If so, could you add savegames from those releases. I don't think it is possible to "shortcut" or boot param to this point so will need an old savegame or playtest.

by tag2015, 15 months ago

Attachment: kathyrain.030 added

v2.6.0 Day 2 save

in reply to:  4 comment:5 by tag2015, 15 months ago

Replying to digitall:

@tag2015: Was this completable with v2.5.0 or v2.6.0 releases? If so, could you add savegames from those releases. I don't think it is possible to "shortcut" or boot param to this point so will need an old savegame or playtest.

Thanks for bisecting. I wanted to do it myself but couldn't find the time.
In version 2.5.1 the login screen worked properly. There was another bug further on when you need to manipulate a photo (photo appeared but didn't update so you needed to apply the changes blindly) and another issue with the hospital computer (can't remember the exact problem). Anyway with some effort you could proceed, game was completable.
In 2.6.0 the same login issue is present. I attached a save (just remove the note and use the pc, see that the login disappears immediately).
I don't have a 2.5 save at the beginning of day2, if I have time later I'll try to speedrun it and attach a save

comment:6 by digitall, 15 months ago

@tag2015: Ah good, thanks for the detail and the savegame. I will try bisecting using that backwards from v2.6.0 and see if I can locate the point of regression / change to see if that helps determine the likely cause. If you can get a v2.5.1 save, that would help, but I can do a speedrun myself in worst case.

comment:7 by digitall, 15 months ago

OK. Did some testing with the v2.6.0 savegame. This has the same issue as the latest savegame i.e. "I can't bisect earlier than the following commit as the savegame format was changed to be incompatible at that point and will not load. The bug is still present until that point:
commit 91d25a3098b0ef967ae4eaf4e830d21cc1922631
Author: Paul Gilbert <​dreammaster@…>
Date: Mon May 9 21:22:10 2022 -0700

AGS: Added animation volumes to save format

From upstream 752da45aa7666355e383df0f1017cf5c5842fea1"

by digitall, 15 months ago

Attachment: kathyrain.008 added

comment:8 by digitall, 15 months ago

Right did a speedrun with v2.5.1 to the relevant point at the start of Day 2. The savegame is now attached as kathyrain.008 (d6). The bug with the computer does not occur on initial playtest or on loading from a fresh start with this savegame.

Will try using this savegame to try to bisect when the computer behaviour was changed.

comment:9 by digitall, 15 months ago

Testing using this savegame on v2.6.0 replicates the bug so it is _not_ a nasty one where the savestate is invalid or corrupted i.e. requiring a full playtest for each bisection step.

comment:10 by digitall, 15 months ago

Right. Have completed bisection. There are likely several issues here, but the first commit which causes the PC login UI to start disappearing randomly is:

46f1f776c96fda3d9d55294813d03000c2cd951f is the first bad commit
commit 46f1f776c96fda3d9d55294813d03000c2cd951f
Author: Paul Gilbert <dreammaster@…>
Date: Tue Mar 15 21:24:18 2022 -0700

AGS: Sort overlays along with GUI


From upstream 6b41b1f86ab2f6840c324d98e8e96ae5c61dad9f

engines/ags/engine/ac/draw.cpp | 47 +++++++++++++++----------------
engines/ags/engine/ac/sprite_list_entry.h | 2 +-
2 files changed, 23 insertions(+), 26 deletions(-)


comment:11 by digitall, 15 months ago

@tag2015: Hmm, looking at the code for that commit, it looks exactly like the kind of change likely to cause these issues. We may need to add an engine version to each of the AGS detection entries and guard changes like this to ensure the older games run on the "latest" engine without regressions. This would be similar to SCUMM, SCI and other engines which have evolved over time.

comment:12 by criezy, 15 months ago

Interesting. It would be interesting to check if that same regression also happened upstream (as I would expect) and if it was already fixed there. I might however be a ScummVM-specific bug if for example it is caused by a difference in the sorting algorithm used for the sprite list (difference in behaviour between std::sort and Common::sort). But hopefully that is not the case.

In any case there is no need to add an engine version to each of the AGS detection. The information is already included in the game data files, and is already used in places to control the behaviour of the engine. That is something that we could do here, although I am wondering if the change of behaviour was expected, or an oversight or bug.

comment:13 by digitall, 15 months ago

criezy: It looks like the upstream AGS code patches were last reviewed for inclusion around 2022-07-26 at least with the Engine/ac/draw.cpp code with our inclusion of "Plugin API: added render callback AGSE_POSTROOMDRAW" i.e. ags commit 4ff7e14400ab81693fb64195d9ada70e979647ac.

Reviewing the upstream commits since then to this file, https://github.com/adventuregamestudio/ags/commit/d6f02bf8523c9833dd5f9d38c5cb1e80c60e2891 may be relevan, but we should test if this issue can be replicated with the upstream latest master first.

comment:14 by tag2015, 15 months ago

Thanks for looking into this. The commit from upstream
https://github.com/adventuregamestudio/ags/commit/d6f02bf8523c9833dd5f9d38c5cb1e80c60e2891
does indeed fix the issue, not just for Kathy Rain but also bug #13780.
Haven't done any other checks though, maybe it breaks something else. I'll do some tests tomorrow

comment:15 by digitall, 15 months ago

@tag2015: Thanks. That is good to know. The current ScummVM AGS engine is currently in sync with the upstream to v3.60.36:
https://github.com/scummvm/scummvm/commit/f2a41c84769ac2cfb6399999307a91899f618c2b

I think you are aware of that since you committed it along with @criezy :)

However the upstream is now at v3.60.43 so quite a few patches there should be reviewed and included:
https://github.com/adventuregamestudio/ags/commit/8dce503b05728edabe6205e7fbf3f660ed31e957

comment:16 by digitall, 15 months ago

There are apparently 248 commits to be reviewed from the upstream AGS:

git log v.3.6.0.36..v.3.6.0.43 | grep -i ^commit | wc -l

Of those, a fair number only touch the build system, their Android backend etc. so the actual number of engine code changes which need review and inclusion is actually relatively small.

Last edited 15 months ago by digitall (previous) (diff)

comment:17 by digitall, 15 months ago

The commit which fixes this occurs between v3.6.0.40 and v3.6.0.41 so up to that at least :)

comment:18 by antoniou79, 15 months ago

The overlays bug might be responsible also for issues in bugs: #13412 (some missing button icons), and #13187 (a character's robe is not drawn).

I'll try and check when we port the fixes from upstream.
(it would take me too much time to try and build upstream locally and check now, at least that's my impression from the last time I tried it).

in reply to:  16 comment:19 by tag2015, 15 months ago

Replying to digitall:

There are apparently 248 commits to be reviewed from the upstream AGS:

git log v.3.6.0.36..v.3.6.0.43 | grep -i ^commit | wc -l

Of those, a fair number only touch the build system, their Android backend etc. so the actual number of engine code changes which need review and inclusion is actually relatively small.

Yes, actually I already started bringing more commits from upstream to master but I haven't opened a PR yet. By the way, it seems that upstream is going to release version 3.6 as stable in early march so it may be a good time to sync the codebase.

comment:20 by Gemba, 15 months ago

The issue does not exist when using ags engine standalone v3.6.0.43 built from source, I can confirm.

But there may be another bug looming upstream, also relating to the PC usage at day 2: https://github.com/adventuregamestudio/ags/issues/1936

in reply to:  20 comment:21 by Gemba, 15 months ago

Replying to Gemba:

But there may be another bug looming upstream, also relating to the PC usage at day 2: https://github.com/adventuregamestudio/ags/issues/1936

This is fixed upstream.

comment:22 by tag2015, 15 months ago

The "login screen" issue is now fixed on 2.8.0 daily builds.
The image editor, not yet.

comment:23 by tag2015, 15 months ago

Priority: highnormal

comment:24 by tag2015, 15 months ago

Summary: AGS: Kathy Rain: Impossible to use the PCAGS: Kathy Rain: "Image Editor" issue when using the PC

comment:25 by tag2015, 13 months ago

Owner: set to tag2015
Resolution: fixed
Status: newclosed

Image editor fixed in 2775d0e

Closing!

Note: See TracTickets for help on using tickets.