Author Topic: In a desperate need of help!!!  (Read 610 times)

0 Members and 1 Guest are viewing this topic.

Offline amirkle

In a desperate need of help!!!
« on: May 07, 2017, 06:11:37 AM »
Hi guys,

I'm writing these words with trembling hands:

I've been working on a game for a few weeks now (I'm new to the world of programming, and actually started learning from scratch using the tutorials - but have made some decent headway).
after about a week of hard work, i got a strange error all of a sudden: "Error enumerating items: Corrupt resource header - mismatched types". I got it while using the program, not when i tried to open my game's template. it just seems like all the scripts are gone suddenly!! one second it was OK, and the next - boom, got the error. and that's it, couldn't do anything anymore but starting the whole project all from the beginning.

During the time that has passed since then i have been saving my work every too often into a USB drive, replacing the whole game's folder to the one i was working on when it crashed (it has been happening more and more often).

last night i made some serious progress in my game, then saved it both on my PC and USB drive, and went to bed.

this morning, though, i got the message just when i opened my game (it was all OK last night when i saved it), and i get the error both when opening the version on my PC and the one on my flash drive. what's more - i have an older version of the game (from 2 days ago), that has been working fine, but now i can't open it either - get this error message...

sometimes i get another error when i try to open the game - "Unable to open resource map: Corrupt resource header - mismatched types".

PLEASE, CAN ANYONE HELP ME??
WHAT SHOULD I DO?
HAVE YOU HAD THESE KINDS OF PROBLEMS BEFORE?


Desperately yours...




Offline Kawa

Re: In a desperate need of help!!!
« Reply #1 on: May 07, 2017, 07:57:22 AM »
Hypothesis: the map and the volume don't match up.
Theory: given the raw volume without a map and something that doesn't care about the map, one might be able to extract the data and rebuild.

Test: I took The Dating Pool's copy of resource.000, put it in an isolated location away from its resource.map, and opened it in SV. I could see it all right there, without a map. Just for completeness' sake I tried a multivolume game, Conquests of Camelot, which also works fine.

More practically, SV-CLI's Resource tool can read it all mapless too, and extract everything in one go. It may be meant for command lines, but just drag and drop resource.000 or whatever onto its icon and wait. To save you the effort of finding a copy, I've attached one.

Offline troflip

Re: In a desperate need of help!!!
« Reply #2 on: May 07, 2017, 12:40:50 PM »
Does this happen after you save a particular resource? Which version of SCI Companion are you using?

Are there any .bak files in your game's folder? When saving, SCI Companion writes out the new resource map and volume to resource.map.bak and resource.000.bak respectively. Then it copies them over the originals and deletes the bak. The volume file is copied first, then the resource map. If something interferes with the second one (maybe some anti-virus software, or the game currently running - but the latter usually prevents the volume file from being written, so it would fail early and you'll be ok), then you'll get mismatched map and volume files, but then presumably there should be a resource.map.bak file laying around which could be renamed to resource.map to fix the problem.

(also, I strongly recommend using a version control system).

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline amirkle

Re: In a desperate need of help!!!
« Reply #3 on: May 07, 2017, 01:48:47 PM »
Hypothesis: the map and the volume don't match up.
Theory: given the raw volume without a map and something that doesn't care about the map, one might be able to extract the data and rebuild.

Test: I took The Dating Pool's copy of resource.000, put it in an isolated location away from its resource.map, and opened it in SV. I could see it all right there, without a map. Just for completeness' sake I tried a multivolume game, Conquests of Camelot, which also works fine.

More practically, SV-CLI's Resource tool can read it all mapless too, and extract everything in one go. It may be meant for command lines, but just drag and drop resource.000 or whatever onto its icon and wait. To save you the effort of finding a copy, I've attached one.


WOW, THANKS!

I really appreciate the quick reply and the help!
Downloaded the file and could see the data alright. but couldnt run the game, of course.
because i really dont know my way around computers much (thats why i wanted to try and build my own game, to see how far i could go without understanding myself what im doing... by now im pretty pleased!  :)  ) i didnt really understand much of what you advised me to do.. i just started a new game, copied all the scripts i've modified and created, loaded as much as i could of the vies and pics and created again the ones i couldnt get my hands on, and managed to rebuild my game.

thing is, im waiting for that moment when the game crashes again i lose all the data, because its been happening quite a lot...
but im saving it every other step i go, in different folders, plus the views and pics' data.
thing is, it is not normal, to go like this. i should see what i can do about it. because when im up to room 10, i wouldnt like to start the whole thing over again...


thanks for your help though!
i couldn't make it without it!

Offline amirkle

Re: In a desperate need of help!!!
« Reply #4 on: May 07, 2017, 01:57:13 PM »
Does this happen after you save a particular resource? Which version of SCI Companion are you using?

Are there any .bak files in your game's folder? When saving, SCI Companion writes out the new resource map and volume to resource.map.bak and resource.000.bak respectively. Then it copies them over the originals and deletes the bak. The volume file is copied first, then the resource map. If something interferes with the second one (maybe some anti-virus software, or the game currently running - but the latter usually prevents the volume file from being written, so it would fail early and you'll be ok), then you'll get mismatched map and volume files, but then presumably there should be a resource.map.bak file laying around which could be renamed to resource.map to fix the problem.

(also, I strongly recommend using a version control system).


it doesnt necessarily happen when i save a resource. sometimes it just happens as im writing something in the script, or when i create a new view. in short, just happens randomly, when i use the program.
im using the new version of SCI Companion 3, a release from 1/27/2016, in here - - http://scicompanion.com/download/
can't find ant .bak files in the folder, but ill look for one if it happens again.. maybe i deleted it at the old game's folder..

im sorry for the question - whats a version control system and how to use it?
these problems have never happened to any of you guys??

Offline Kawa

Re: In a desperate need of help!!!
« Reply #5 on: May 07, 2017, 03:17:46 PM »
Congratulations, you did basically what I was gonna tell you to do!

Offline troflip

Re: In a desperate need of help!!!
« Reply #6 on: May 07, 2017, 05:46:01 PM »
these problems have never happened to any of you guys??

I've never heard of any problems like this. Do you have any anti-virus software installed that might be interfering?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline amirkle

Re: In a desperate need of help!!!
« Reply #7 on: May 07, 2017, 06:22:55 PM »
i got Avira and ESET, but i dont think they should cause any problem...
strange

Offline troflip

Re: In a desperate need of help!!!
« Reply #8 on: May 07, 2017, 08:23:35 PM »
I think the only way to diagnose this is to send me the project folder when this happens, and I can try to look at the contents of the resource.map and resource.000 and see how they're out of sync. Also take note of the timestamp of the two files (they should be written at the same time - if the timestamps are different then that's a clue that the issue is that one of the files couldn't be written for some reason.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline amirkle

Re: In a desperate need of help!!!
« Reply #9 on: May 07, 2017, 08:38:45 PM »
I think the only way to diagnose this is to send me the project folder when this happens, and I can try to look at the contents of the resource.map and resource.000 and see how they're out of sync. Also take note of the timestamp of the two files (they should be written at the same time - if the timestamps are different then that's a clue that the issue is that one of the files couldn't be written for some reason.

That'd be great, if you could take a look!
ill send it over if it happens again.. up till now its been ok, keeping my fingers crossed... :)

Thanks a lot though!

Offline Kawa

Re: In a desperate need of help!!!
« Reply #10 on: May 08, 2017, 06:01:55 AM »
And ffs don't just overwrite your backups!

Offline amirkle

Re: In a desperate need of help!!!
« Reply #11 on: May 08, 2017, 07:41:25 PM »
And ffs don't just overwrite your backups!

yeah but how many backups can you have??!?!?! lol

Offline Kawa

Re: In a desperate need of help!!!
« Reply #12 on: May 08, 2017, 08:25:01 PM »
Answer: never enough

Offline troflip

Re: In a desperate need of help!!!
« Reply #13 on: May 08, 2017, 10:18:20 PM »
Hence why version control is a good idea (preferably on a remote server, so if your computer explodes or house burns down you're still good).

Unfortunately the way (the official release of) SCI Companion manages the resources (all packaged into one binary blob) isn't well-suited for version control. The unreleased dev build (which you need to build yourself) lets you manage all the resources with patch files instead, which works a lot better (unfortunately there are still some issues with doing that with SCI1.1 that I haven't got around to fixing).
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline gumby

Re: In a desperate need of help!!!
« Reply #14 on: May 27, 2017, 05:51:09 PM »
Just ran into this problem multiple times.  I'm using source control so it wasn't too painful. Each time I rolled back to a previous commit it would clear the issue temporarily but then it would resurface a few script compiles later.

I believe that the issue is that the resources hadn't been rebuilt in a long time.  Ever since I've done a rebuild the error hasn't reoccurred.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.11 | SMF © 2015, Simple Machines
Simple Audio Video Embedder

Page created in 0.157 seconds with 22 queries.