Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9764 closed defect (fixed)

SCI: Multiple games assertion failures in resource_audio.cpp

Reported by: Laylia27 Owned by: csnover
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game:

Description

Game: EcoQuest: The Search for Cetus (CD/DOS/English)
ScummVM version: 1.10.0git3248-ga403523faf (May 7 2017 12:57:54)
Platform: Win32
Still works with ScummVM version 1.9.0.2

When starting up EcoQuest 1 CD I get the following error message:


Microsoft Visual C++ Runtime Library

Assertion failed!

Program: C:\Program Files (x86)\ScummVM\ScummVM.exe
File: engines/sci/resource_audio.cpp
Line: 417

Expression: offset + syncSize <= SrcSize

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)

Options: Abort, Retry, or Ignore


If I click Ignore a new error pops up, same file, but this time line 457, the expression being: offset + syncSize < srcSize

Clicking Ignore cycles between these two errors.

Attachments (3)

ecoquest1errors.txt (321.4 KB ) - added by Laylia27 7 years ago.
ecoquest 1 error output
pharkaserrors.txt (128.9 KB ) - added by Laylia27 7 years ago.
Freddy Pharkas error output
kq6errors.txt (375.7 KB ) - added by Laylia27 7 years ago.
King's Quest VI error output

Download all attachments as: .zip

Change History (19)

comment:1 by Laylia27, 7 years ago

Similar error for EcoQuest II (DOS/floppy/English):

File: resource_audio.cpp
Line: 339

Expression: offset < srcSize

comment:2 by Laylia27, 7 years ago

Similar error for Freddy Pharkas (CD/DOS/English)

Line: 457

Expression: offset + syncSize < srcSize

comment:3 by Laylia27, 7 years ago

Similar error for Hoyle Classic Card Games (DOS/English):

Line: 417

Expression: offset + syncSize <= srcSize

cycles with:

Line: 457

Expression: offset + syncSize < srcSize

comment:4 by Laylia27, 7 years ago

Add King's Quest VI (CD/DOS/English) to the list. Cycles between 3 errors:

Line 417, Expression: offset + syncSize <= srcSize
Line 431, Expression: offset + syncSize + HiresSyncSize <= srcSize
Line 457, Expression: offset + syncSize < srcSize

I'm wondering if this is somehow related to lip syncing...

comment:5 by csnover, 7 years ago

Thanks for your report! We have not yet been able to reliably reproduce this problem, so I have added some improved resource corruption detection and reporting in commit 554a73e01209643161f8adecba825a5bc39f87f8 to try to determine the source of the issue (and to make resource corruption problems more obvious in general).

This functionality is available starting in build 1.10.0git-3251 and later, so please try the next daily build once it is available and report back with any warnings that are now given by ScummVM. Thanks!

comment:6 by csnover, 7 years ago

Keywords: startup crash SCI removed
Summary: EcoQuest 1 CD crash with error on startupSCI: Multiple games assertion failures in resource_audio.cpp

comment:7 by Laylia27, 7 years ago

Tried EcoQuest 2. Warning about corrupt resources. Game runs. Even plays the two snippets of speech at the beginning. The following errors in other window:

User picked target 'ecoquest2' (gameid 'sci')...

Looking for a plugin supporting this gameid... SCI [SCI0, SCI01, SCI10, SCI11, SCI32]
Starting 'Sierra SCI Game'

WARNING: Resource audio.916 from 65535.MAP points beyond end of RESOURCE.AUD (1764924 >= 1739095)!
WARNING: Resource audio.917 from 65535.MAP points beyond end of RESOURCE.AUD (1788938 >= 1739095)!
WARNING: Resource audio.918 from 65535.MAP points beyond end of RESOURCE.AUD (1814952 >= 1739095)!
WARNING: Resource audio.919 from 65535.MAP points beyond end of RESOURCE.AUD (1844966 >= 1739095)!
WARNING: Resource audio.920 from 65535.MAP points beyond end of RESOURCE.AUD (1864980 >= 1739095)!
WARNING: Resource audio.921 from 65535.MAP points beyond end of RESOURCE.AUD (1882994 >= 1739095)!
WARNING: Resource audio.924 from 65535.MAP points beyond end of RESOURCE.AUD (1903008 >= 1739095)!
WARNING: Resource audio.923 from 65535.MAP points beyond end of RESOURCE.AUD (1931022 >= 1739095)!
WARNING: Resource audio.925 from 65535.MAP points beyond end of RESOURCE.AUD (1959036 >= 1739095)!
WARNING: Resource audio.926 from 65535.MAP points beyond end of RESOURCE.AUD (1975050 >= 1739095)!
WARNING: Resource audio.927 from 65535.MAP points beyond end of RESOURCE.AUD (1999064 >= 1739095)!
WARNING: Resource audio.928 from 65535.MAP points beyond end of RESOURCE.AUD (2023078 >= 1739095)!
WARNING: Resource audio.929 from 65535.MAP points beyond end of RESOURCE.AUD (2039092 >= 1739095)!
WARNING: Resource audio.930 from 65535.MAP points beyond end of RESOURCE.AUD (2069106 >= 1739095)!
WARNING: Resource audio.931 from 65535.MAP points beyond end of RESOURCE.AUD (2099120 >= 1739095)!
WARNING: Resource audio.932 from 65535.MAP points beyond end of RESOURCE.AUD (2123134 >= 1739095)!
WARNING: Resource audio.903 from 65535.MAP points beyond end of RESOURCE.AUD (2145148 >= 1739095)!
WARNING: Resource audio.904 from 65535.MAP points beyond end of RESOURCE.AUD (2179162 >= 1739095)!
WARNING: Resource audio.905 from 65535.MAP points beyond end of RESOURCE.AUD (2207176 >= 1739095)!
WARNING: Resource audio.906 from 65535.MAP points beyond end of RESOURCE.AUD (2241190 >= 1739095)!
WARNING: Resource audio.955 from 65535.MAP points beyond end of RESOURCE.AUD (2267204 >= 1739095)!
WARNING: Resource audio.956 from 65535.MAP points beyond end of RESOURCE.AUD (2289218 >= 1739095)!
WARNING: Resource audio.957 from 65535.MAP points beyond end of RESOURCE.AUD (2331232 >= 1739095)!
WARNING: Resource audio.958 from 65535.MAP points beyond end of RESOURCE.AUD (2349246 >= 1739095)!
WARNING: Resource audio.970 from 65535.MAP points beyond end of RESOURCE.AUD (2375260 >= 1739095)!
WARNING: Resource audio.971 from 65535.MAP points beyond end of RESOURCE.AUD (2393274 >= 1739095)!
WARNING: Resource audio.952 from 65535.MAP points beyond end of RESOURCE.AUD (2409288 >= 1739095)!
WARNING: Resource audio.953 from 65535.MAP points beyond end of RESOURCE.AUD (2433302 >= 1739095)!
WARNING: Resource audio.954 from 65535.MAP points beyond end of RESOURCE.AUD (2465316 >= 1739095)!
WARNING: Resource audio.723 from 65535.MAP points beyond end of RESOURCE.AUD (2503330 >= 1739095)!
WARNING: Resource audio.305 from 65535.MAP points beyond end of RESOURCE.AUD (2555344 >= 1739095)!
WARNING: Resource audio.205 from 65535.MAP points beyond end of RESOURCE.AUD (2611358 >= 1739095)!
WARNING: Resource audio.311 from 65535.MAP points beyond end of RESOURCE.AUD (2659372 >= 1739095)!
WARNING: Resource audio.983 from 65535.MAP points beyond end of RESOURCE.AUD (2709386 >= 1739095)!
WARNING: Resource audio.423 from 65535.MAP points beyond end of RESOURCE.AUD (2729400 >= 1739095)!
WARNING: Resource audio.166 from 65535.MAP points beyond end of RESOURCE.AUD (2767414 >= 1739095)!
WARNING: Resource audio.110 from 65535.MAP points beyond end of RESOURCE.AUD (2779428 >= 1739095)!
WARNING: Resource audio.869 from 65535.MAP points beyond end of RESOURCE.AUD (2791442 >= 1739095)!

by Laylia27, 7 years ago

Attachment: ecoquest1errors.txt added

ecoquest 1 error output

comment:8 by Laylia27, 7 years ago

I attached a txt file of the errors from running EcoQuest 1 since they were too long to post in a comment. The game starts. Digital sounds play fine, but speech does not play at all. When characters speak, their portraits appear for a moment then disappear.

Thanks for looking into this! I'm going to try the other games I listed above.

comment:9 by Laylia27, 7 years ago

Freddy Pharkas: game runs. Speech and digital sounds play fine. I'll attach a txt file of errors.

by Laylia27, 7 years ago

Attachment: pharkaserrors.txt added

Freddy Pharkas error output

comment:10 by Laylia27, 7 years ago

Ran Hoyle 4. Game started with warning about corrupt resources. Honestly, it's been so long since I've played this that I couldn't tell if anything wasn't working right. Errors:

User picked target 'hoyle4' (gameid 'sci')...

Looking for a plugin supporting this gameid... SCI [SCI0, SCI01, SCI10, SCI11, SCI32]
Starting 'Sierra SCI Game'

WARNING: Resource sync36.1017(1, 0, 0, 27) from resource.000 points beyond end of RESOURCE.AUD (3334911 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 27) from resource.000 points beyond end of RESOURCE.AUD (3335049 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 28) from resource.000 points beyond end of RESOURCE.AUD (3338054 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 28) from resource.000 points beyond end of RESOURCE.AUD (3338196 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 29) from resource.000 points beyond end of RESOURCE.AUD (3342303 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 29) from resource.000 points beyond end of RESOURCE.AUD (3342445 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 30) from resource.000 points beyond end of RESOURCE.AUD (3346092 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 30) from resource.000 points beyond end of RESOURCE.AUD (3346230 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 31) from resource.000 points beyond end of RESOURCE.AUD (3349513 + 134 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 31) from resource.000 points beyond end of RESOURCE.AUD (3349647 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 2) from resource.000 points beyond end of RESOURCE.AUD (3385937 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 2) from resource.000 points beyond end of RESOURCE.AUD (3386079 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 24) from resource.000 points beyond end of RESOURCE.AUD (3325149 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 24) from resource.000 points beyond end of RESOURCE.AUD (3325287 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 25) from resource.000 points beyond end of RESOURCE.AUD (3328186 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 25) from resource.000 points beyond end of RESOURCE.AUD (3328328 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 26) from resource.000 points beyond end of RESOURCE.AUD (3331567 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 26) from resource.000 points beyond end of RESOURCE.AUD (3331705 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 7) from resource.000 points beyond end of RESOURCE.AUD (3401288 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 7) from resource.000 points beyond end of RESOURCE.AUD (3401426 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3389251 + 150 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3389401 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 4) from resource.000 points beyond end of RESOURCE.AUD (3392665 + 150 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 4) from resource.000 points beyond end of RESOURCE.AUD (3392815 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 1) from resource.000 points beyond end of RESOURCE.AUD (3377461 + 134 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 1) from resource.000 points beyond end of RESOURCE.AUD (3377595 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 6) from resource.000 points beyond end of RESOURCE.AUD (3398371 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 6) from resource.000 points beyond end of RESOURCE.AUD (3398509 >= 3321346)!
WARNING: Resource sync36.1017(1, 0, 0, 5) from resource.000 points beyond end of RESOURCE.AUD (3396329 + 134 > 3321346)!
WARNING: Resource audio36.1017(1, 0, 0, 5) from resource.000 points beyond end of RESOURCE.AUD (3396463 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 8) from resource.000 points beyond end of RESOURCE.AUD (3375402 + 134 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 8) from resource.000 points beyond end of RESOURCE.AUD (3375536 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 6) from resource.000 points beyond end of RESOURCE.AUD (3365522 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 6) from resource.000 points beyond end of RESOURCE.AUD (3365664 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 7) from resource.000 points beyond end of RESOURCE.AUD (3368428 + 142 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 7) from resource.000 points beyond end of RESOURCE.AUD (3368570 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 2) from resource.000 points beyond end of RESOURCE.AUD (3372554 + 134 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 2) from resource.000 points beyond end of RESOURCE.AUD (3372688 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 4) from resource.000 points beyond end of RESOURCE.AUD (3359102 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 4) from resource.000 points beyond end of RESOURCE.AUD (3359240 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 5) from resource.000 points beyond end of RESOURCE.AUD (3362112 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 5) from resource.000 points beyond end of RESOURCE.AUD (3362250 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3355815 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3355953 >= 3321346)!
WARNING: Resource sync36.1017(1, 22, 0, 1) from resource.000 points beyond end of RESOURCE.AUD (3352746 + 138 > 3321346)!
WARNING: Resource audio36.1017(1, 22, 0, 1) from resource.000 points beyond end of RESOURCE.AUD (3352884 >= 3321346)!
WARNING: Resource sync36.1017(1, 23, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3380434 + 130 > 3321346)!
WARNING: Resource audio36.1017(1, 23, 0, 3) from resource.000 points beyond end of RESOURCE.AUD (3380564 >= 3321346)!
WARNING: Resource audio.111 from resource.000 points beyond end of RESOURCE.AUD (3409255 >= 3321346)!

comment:11 by Laylia27, 7 years ago

King's Quest VI: Game starts and seems to run fine. Narration speech and digital sound effects play as expected. However, whenever a dialogue portrait appears the console comes up with the message:

"ERROR: could not translate offset to compressed offset in audio volume!"

Attaching txt file with errors...

by Laylia27, 7 years ago

Attachment: kq6errors.txt added

King's Quest VI error output

comment:12 by Laylia27, 7 years ago

I have all but maybe two or three of the Sierra SCI titles, and I've been going down the compatibility list to see if they run properly. So far I'm at Quest for Glory 2, and the only games I've had this sort of problem with are the 4 mentioned above (EcoQuest 1 & 2, Freddy Pharkas, and King's Quest VI). Hoyle 1 had a different issue, so I filed a separate ticket for it.

comment:13 by csnover, 7 years ago

Game: EcoQuest 1
Priority: highnormal

Thank you for the additional information. There are two bugs here.

(1) The games that are raising warnings have had their audio files compressed by the ScummVM audio compression tool. The runtime code for this had previously relied on hot patching volume file offsets at the moment that a resource was loaded, instead of correcting file offsets when reading audio maps. The code added for sanity checking audio volumes started to report warnings because the offsets being received were for the original uncompressed audio volume, which (naturally) is larger than the compressed audio volume.

(2) Compressed audio volumes generated for KQ6 are missing Rave resources (used for the portraits in high-resolution mode), so crash with the error "could not translate offset to compressed offset in audio volume" when trying to load Rave resources.

I have a patch for these issues that I plan to commit within the next day, after additional testing. For the first problem, compressed audio volume handling has been changed to translate offsets while resources are being scanned and added. For the second problem, the validation code detects that these resources are missing and prevents them from being added. ScummVM will continue to (correctly) report that resource corruption is detected, but the game will no longer crash when rendering portraits. Please retrieve and use your original RESOURCE.AUD volume for this game.

comment:14 by Laylia27, 7 years ago

Wow... I completely forgot that I compressed the audio for several games, back when disk space was much more of an issue than it is now. I could re-rip KQ6, but I think I'll just replace it with my GOG version.

Thanks for the detailed explanation. It's good to know about the sanity checks.

comment:15 by csnover, 7 years ago

Owner: set to csnover
Resolution: fixed
Status: newclosed

This bug has been fixed in dd13c3be43b2566d7ee6449be7918a86428bb4da. The fix will be available in daily builds 1.10.0git-3268 and higher.

comment:16 by csnover, 7 years ago

m-kiewitz schooled me on IRC about the non-standard way Sierra added Rave resources to KQ6, and with that information I was able to determine that the Rave data does actually exist in the compressed volumes and just needs to be accessed a little differently. So, that feature should also work now as of ea6eebca09f9303cd08aa6d767123ba383c548e8.

Note: See TracTickets for help on using tickets.