Homebrew COMPLETED ScummVM

LikeATrollFace

Well-Known Member
Newcomer
Joined
Apr 24, 2018
Messages
69
Trophies
0
Age
24
XP
180
Country
Netherlands
Well, if it doesn't work on them right now (don't know) then it will probably take some time..
Do you know why it crashes when I go into the start menu and then resuming the game? That's the only bug I've encountered so far on this version (switch version 2.0.0)
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
I could't reproduce the Broken Sword 1 crash on first, second or third try on the current version. :)
Starship Titanic crash still is present.

I have to test further (later in the day), but if Broken Sword 1 has become finishable... (Thats a "I love you man!" in brackets.. ;) )
 

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
44
XP
4,483
Country
France
I could't reproduce the Broken Sword 1 crash on first, second or third try on the current version. :)
Starship Titanic crash still is present.

I have to test further (later in the day), but if Broken Sword 1 has become finishable... (Thats a "I love you man!" in brackets.. ;) )

Well, I didn't even try it again for this release, as it was a lost cause to me :)
Starship still crashing is not encouraging thought, but let's be positive.
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
The smaller more frequent crashes in Broken Sword 1 are gone, the crashes because "a ressource file could not be read" are still present. Game still can not be completed.

(Broken Sword 2 still works without issues.)

7y9rKt5.jpg


As the smaller crashes are gone, its now "harder" to reproduce the issue - as you now need a save file. :)

I've uploaded one for everyones convenience.. ;)

https://www92.zippyshare.com/v/ACnIUQH2/file.html

To reproduce: Load the save file, click on the phone on the ground left of the character, click on the name on top of the envelope, skip through dialogue with B, then move the curser to the lower right of the tent on the ground - until a gear appears. Click on the gear or press A. Game should crash. If not, exit the screen left (hand icon) - this is another transition that may allow the game to crash. ;) Do all of it in a reasonably speedy fashion, as the crash might be related to the BGM sample that is playing.

Once in the debug log menu - quit and exit both crash the switch to white menu screen. Home button does nothing. Reboot is necessary.

*buhuu* ;)
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
@cpasjuste Thanks to that save file I now understand exactly what causes the issue. :)

First the setup for the explanation. :)

Broken Sword 1 has three sound layers.

Type 1: BGM
Type 2: speech
Type 3: contextual sound clues (think of Link opening a chest). :)

All get played "over each other" so sometimes at the same time.

The game uses the third kind (contextual sound clues) very frequently - to guide the player.

From the savefile uploaded above:

1. You pick up the phone, click on the name on the envelope, and the game transitions into a dialogue screen with a type 3 sound clue starting to play.
2. You click on the gear on the lower right of the tent, it triggers a type 3 sound clue.
3. You exit the screen on the left, it triggers a type 3 sound clue.
4. You go through the gateway on the right of the screen you are in right now, it triggers a type 3 sound clue.
5. You use the manholecover tool (you got in step 2) on the manhole cover, it triggers a type 3 sound clue. (Entering the manhole triggers a video sequence.)


Whenever a type 3 sound clue plays on its own - everything is fine, no issue. Whenever a type 3 sound clue plays in combination with speech or BGM, everything is fine, no issue (this might be new in the current build!). Whenever a type 3 sound clue plays - and you "initialize" another type 3 sound clue - while the first one is playing - the game crashes.

Now to the fun part - look at transitions 1 to 5 above. The game crashes on every one of those, when the first type 3 is still playing, and you go into the transition where another type 3 is triggered. If you wait for the sound queue to "finish playing" though, you can trigger the next one, WITHOUT the game crashing. The first one (telephone dialogue) takes a long time to finish, and is deceptive at the end, so wait longer than you think you have to wait on that one.. :)

You can go past four 100% reproducable crashes in the 1 to 5 sequence above, if you just wait for one type 3 sound clue to finish, before you continue. :)

This all ends once you enter the manhole though, because the game seems to transition from one type 3 into another type 3 on its own. So this time you cant wait. :)

Not finished. :)

From my knowledge of the game, all type 3 sound clues are stored as .ogg or .flac files, so it might be your implementation of the playback of those files that causes the crashes. (One file is played, then another play is triggered, while the first one is still playing.)

I understand, that this is _the_ definition of a race condition issue, but maybe its something slightly different (.ogg or .flac playback engine related).

Maybe you can look into it, if you find the time. :)
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
Kings Quest 7 now launches, but gets stuck in story sequences, and sometimes at screen transitions - so its not playable atm. Im therefore not posting images this time.. ;)

For those new to this thread, most (about 80-90%) games work without issues - that includes most Lucas Arts Games. Some more recent more complex games dont work as expected, probably because of an issue with how resources are loaded. ScummVM in general is very, very particular of having all the fully supported games working in all aspects, so those are port related issues (Libnx, ogg/flac implementation (?), ..).

I've also had an issue, with audio starting to sound metalic after standby/resume on 3.0.0 - but this stuff can be fixed by restarting the app (as most games offer a save anywhere functionality, this is not a huge deal.).
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
More information on the Broken Sword 1 crashes. If subtitles are disabled, all those type 3 caused crashes dont trigger anymore - which means, that its not just type 3 assets (ogg, flac), other resources are involved as well (race condition issue.. :/ ). In any case the game is still not playable - because the crash when entering the manhole cover still persists.

I'll play around with savegame swaps from the PC version a little more, to see how far the game is playable, if you continue from the next sequence with subtitles disabled.

edit: I've also replicated the type 3 related crashes with game versions that use .wav files, btw. And I have doublechecked, the type 3 sound clues are indeed those external files (.wav, .ogg, .flac). Also when entering the manhole, a video sequence should play if I'm not mistaken. So that would also be an external file.

Crash log from the manhole entry:
DDRee27.jpg
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
Huh, thats interesting. Last posting on the Broken Sword 1 topic btw. :)

I think we can now classify type 3 sound clues as "external files". Here is why. :)

When you enter the manhole cover a video sequence (external video file) is supposed to be played (While a type 3 is playing and while the main ressources file probably gets switched over (= this crash always happens)). The game crashes exactly at that point. So even the transition to that video sequence is present (subtitles disabled), but then the game crashes.

So now all crashes that are still in the game are related to external, physical files that should get loaded at the point of the crash (.dxa (video format), .wav, .ogg, or .flac).

Disabling subtitles allows all the type 3 sound clue crashes (while transitioning into type 3 sound clues) not to occur - but the crash related to the manhole entry (video should play) still happens (type 3 transitioning into video, with separate audio, and probably main ressource file change). So the first thing that came to mind was "maybe memory related", because video files are bigger. :)

But. I played onwards - from a save file after the manhole transition (created on a PC), and ran into another type 3 soundclue related crash - even though subtitles were disabled, and those crashes usually dont occur anymore with subtitles disabled - and here is how it went.

I pulled up the ScummVM Save menu - while a type 3 sound clue was playing - and tried to save the game - but there were no savefiles found (even though some existed, and werent corrupted), and when I exited the scummvm menu - the came crashed "as type 3 usual". :)

So this sounds VERY suspicially like a disk access issue. So here is the new proposal. :)

Prerequisite: type 3 sound clue is playing from the sdcard ->
a.) game trys to access another type 3 sound clue > crashes, if subtitles are enabled, does not crash if subtitles are disabled
b.) game trys to access a video file (with a separate audio file (the audio track is separate), maybe in combination with switching the main resource file away from paris1) > crashes
(and most importantly)
c.) scummvm menu trys to access the sdcards to look up savestates, FAILS, and once you exit the scummcm menu > crashes

So - this should be related to "simultaneous file accesses failing", for different files on the sdcard.

type 3 sound clues = different files on the sdcard
video sequence = different file on the sdcard
scummvm menu loading savestate previews = different file on the sdcard

while a type 3 sound clue (file on the sdcard) is playing == crash.

:)

Thats as far as I can get with "logic only" debugging.. ;)

edit: One more presumption. Because there are now fewer crashes than in previous builds. Maybe disc access for 2 resources race condition is solved, but for 3 resources still crashes the game? Crashes imho are definitely sdcard access related.
 
Last edited by notimp,

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
One more post on the Broken Sword 1 issue - found a way to streamline reproducing it from the uploaded save file.

In quick succession:
1. Move the cursor to the right of the screen - until the finger icon shows up and exit the screen to the right (click or by pressing B)
2. Quickly select the police station on the map as your destination.

This initiates a location change (paris1 to paris2 resource file), while a type 3 sound clue (.wav, .ogg or .flac) is playing (thats why you have to do step 2 quickly ;) ) - which always crashes the game - subtitles on, or off. :)

3. The enhanced version (more race conditions happening at once ;) ) is to try the same with subtitles enabled. :)

This is to quickly reproduce the issue. If someone ever thinks they've solved the sdcard access race condition issue - follow steps 1-5 in this posting (from the same savefile), to also look at a transition involving a video sequence being loaded (one more filetype of asset on the sdcard - type shouldnt matter - but just to be sure. :) ).

edit: Shortened the steps from 5 to 3. :)
 
Last edited by notimp,

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
44
XP
4,483
Country
France
One more post on the Broken Sword 1 issue - found a way to streamline reproducing it from the uploaded save file.

In quick succession:
1. Move the cursor to the right of the screen - until the finger icon shows up and exit the screen to the right (click or by pressing B)
2. Quickly select the police station on the map as your destination.

This initiates a location change (paris1 to paris2 resource file), while a type 3 sound clue (.wav, .ogg or .flac) is playing (thats why you have to do step 2 quickly ;) ) - which always crashes the game - subtitles on, or off. :)

3. The enhanced version (more race conditions happening at once ;) ) is to try the same with subtitles enabled. :)

This is to quickly reproduce the issue. If someone ever thinks they've solved the sdcard access race condition issue - follow steps 1-5 in this posting (from the same savefile), to also look at a transition involving a video sequence being loaded (one more filetype of asset on the sdcard - type shouldnt matter - but just to be sure. :) ).

edit: Shortened the steps from 5 to 3. :)
Many thanks for the intensive testing, once again. My next step will be to reproduce the problem in a simple sample, so it will be a lot easier to replicate/fix. Not sure when I'll find the time to do so but your finding will help a lot.
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
@cpasjuste: Its not a specific filetype thats causing the issue. :)

I could just make the game not load the speech layer anymore in one type 3 sound clue to location change transition. Apparently this doesnt cause a crash, so this time the game still ran afterwards, and the speech was bugged out. The crash then occured, trying to exit scummvm.

If you need that specific instance - I can work on reproducing it. ;) But with both the ScummVM menu loading savestate previews, being able to causing a crash (while type 3 is playing, then no saves are found, then crash on menu exit (resume)), and one time a type 3 into screen transition causing the game not to load the speech layer anymore (also - seperate asset. :) ) - this simply sounds like while type 3 (.wav, .ogg, .flac) is playing - the next (or the nextnext) asset that gets requested from the sdcard - doesnt get loaded. :)
 
Last edited by notimp,

cpasjuste

Well-Known Member
OP
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
44
XP
4,483
Country
France
@cpasjuste: Its not a specific filetype thats causing the issue. :)

I could just make the game not load the speech layer anymore in one type 3 sound clue to location change transition. Apparently this doesnt cause a crash, so this time the game still ran afterwards, and the speech was bugged out. The crash then occured, trying to exit scummvm.

If you need that specific instance - I can work on reproducing it. ;) But with both the ScummVM menu loading savestate previews, being able to causing a crash (while type 3 is playing, then no saves are found, then crash on menu exit (resume)), and one time a type 3 into screen transition causing the game not to load the speech layer anymore (also - seperate asset. :) ) - this simply sounds like while type 3 (.wav, .ogg, .flac) is playing - the next (or the nextnext) asset that gets requested from the sdcard - doesnt get loaded. :)
From what you said (and my previous digging), this is more a io/race problem, so I should be able to reproduce this with reading (the same file?) multiple time at once, maybe with one read from a different thread.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/FdYTKAVSsXY?si=9E-2AU0JN-4hRZi3