Author Topic: Can't load the first King's Quest with WinAGI  (Read 602 times)

0 Members and 2 Guests are viewing this topic.

Offline Gamrok

Can't load the first King's Quest with WinAGI
« on: November 09, 2019, 01:07:08 PM »
Hello everyone!

When I try to load the first King's Quest (1984) with WinAGI (1.2.6), I got this error and the software fails to load the content:
"Unhandled error (-2147220852: Unhandled error in LoadSound method(-2147220999: Invalid resource location (134703) in VOL.2)) encountered while loading resources."

Is the problem known? Or maybe my version of King's Quest is corrupted?
« Last Edit: November 09, 2019, 01:14:58 PM by Gamrok »



Offline AGKorson

Re: Can't load the first King's Quest with WinAGI
« Reply #1 on: November 13, 2019, 03:14:00 PM »
Hello everyone!

When I try to load the first King's Quest (1984) with WinAGI (1.2.6), I got this error and the software fails to load the content:
"Unhandled error (-2147220852: Unhandled error in LoadSound method(-2147220999: Invalid resource location (134703) in VOL.2)) encountered while loading resources."

Is the problem known? Or maybe my version of King's Quest is corrupted?

Are you saying only that one resource, with the bad pointer won't load? Or is the entire game not loading?  Because WinAGI should load the game and all valid resources, even if it encounters one or more with invalid data.

I only recently became aware that some Sierra games would leave behind invalid DIR file entries that would point to non-existent, unused resources. Since I never encountered it before, WinAGI originally would always try to validate all resources when initially loading, and give up if it detected something like a bad DIR file or VOL file. So I added extra error trapping that now allows the game to continue to load while just ignoring any invalid resources.

But if it's not loading anything, that's a problem I will need to address.

Offline Collector

Re: Can't load the first King's Quest with WinAGI
« Reply #2 on: November 13, 2019, 08:41:32 PM »
I have noticed that it crashes upon loading some Sierra games, like King's Quest 1 v2.0F int2.917 and some of the other KQ AGI games. The other AGI IDEs seem to have no problems opening them. If I have the other IDEs rebuild the VOL files WinAGI can then open them.
KQII Remake Pic

Offline AGKorson

Re: Can't load the first King's Quest with WinAGI
« Reply #3 on: November 14, 2019, 01:40:37 AM »
I have noticed that it crashes upon loading some Sierra games, like King's Quest 1 v2.0F int2.917 and some of the other KQ AGI games. The other AGI IDEs seem to have no problems opening them. If I have the other IDEs rebuild the VOL files WinAGI can then open them.

crashes? or just fails to load the game? I've never had WinAGI crash during loading- just fail to load a game or resource. If it's actually crashing, I'd like to have more details so I can track down the issue.

Offline AGKorson

Re: Can't load the first King's Quest with WinAGI
« Reply #4 on: November 14, 2019, 01:52:24 AM »
Hello everyone!

When I try to load the first King's Quest (1984) with WinAGI (1.2.6), I got this error and the software fails to load the content:
"Unhandled error (-2147220852: Unhandled error in LoadSound method(-2147220999: Invalid resource location (134703) in VOL.2)) encountered while loading resources."

Is the problem known? Or maybe my version of King's Quest is corrupted?

Are you saying only that one resource, with the bad pointer won't load? Or is the entire game not loading?  Because WinAGI should load the game and all valid resources, even if it encounters one or more with invalid data.

I only recently became aware that some Sierra games would leave behind invalid DIR file entries that would point to non-existent, unused resources. Since I never encountered it before, WinAGI originally would always try to validate all resources when initially loading, and give up if it detected something like a bad DIR file or VOL file. So I added extra error trapping that now allows the game to continue to load while just ignoring any invalid resources.

But if it's not loading anything, that's a problem I will need to address.

OK, I confirmed that the original KQ1 does indeed have four invalid DIR file entries - there are four sound resource entries in SNDDIR (for sounds 34, 35, 36, 37) that point to invalid locations in VOL.2. Presumably they existed at one time, but were removed before the game was released, without updating the DIR file.

I thought I had a check in the resource loader to catch this, but it is not working as I thought. Good news is that it's an easy fix, so if you can hang on for a few days, I will upload a new release that fixes this.

Sorry for the glitch!

Offline Collector

Re: Can't load the first King's Quest with WinAGI
« Reply #5 on: November 14, 2019, 07:45:27 AM »
Thanks. It looked like it just needed a try-catch to gracefully handle the exception.
KQII Remake Pic

Offline Gamrok

Re: Can't load the first King's Quest with WinAGI
« Reply #6 on: November 15, 2019, 04:42:57 PM »
Hi Andrew and Collector,

Thank you both for solving the problem! (and for the explanations)

I can wait for the next version, there's no hurry. If I want to download the last version, the official page is this one? http://agiwiki.sierrahelp.com/index.php?title=WinAGI

I ask because this one links to the 1.1.22 version: http://sciprogramming.com/scitools.php?id=23

Thank you for this great tool!
« Last Edit: November 15, 2019, 04:44:35 PM by Gamrok »

Offline Collector

Re: Can't load the first King's Quest with WinAGI
« Reply #7 on: November 16, 2019, 08:09:47 AM »
Use the Wiki for the current. Andrew has editing and uploading permissions there. I am a mod here with some admin privileges, but the tool entries are added on to the board. It will let me update, but does not save my changes. The WinAGI entry here will require Cloudee, the owner of SCI Programming to update. Unfortunately he has not been around for sometime.
KQII Remake Pic

Offline AGKorson

Re: Can't load the first King's Quest with WinAGI
« Reply #8 on: November 20, 2019, 03:16:17 AM »
Version 1.2.7 is now available; it will load KQ1 (and any other games that have invalid DIR entries) by just skipping those invalid entries.

It's available on the Wiki: http://agiwiki.sierrahelp.com/index.php?title=File:WinAGI_1_2_7.zip

Thx for your patience while I addressed this.

Offline Collector

Re: Can't load the first King's Quest with WinAGI
« Reply #9 on: November 20, 2019, 03:40:57 PM »
Thanks.
KQII Remake Pic

Offline Gamrok

Re: Can't load the first King's Quest with WinAGI
« Reply #10 on: November 21, 2019, 11:36:46 AM »
Thank you! Now, it works nicely! I've just to remove the .wag file before opening the game.


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.118 seconds with 24 queries.