Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: JCDNWarrior on February 17, 2011, 03:12:50 pm

Title: (Solved) Corrupted .FS2 mission file
Post by: JCDNWarrior on February 17, 2011, 03:12:50 pm
UPDATE2: Both issues solved. Thanks again!


Ahh, I really don't know where to report/put it, so mods, feel free to move to the correct location if needed!



So, i'm in the middle of crunching in a lot of development for a long time project of mine, and now the newest work file apparently went corrupt! The report indicated that it had to be reported immediately, and I was unable to load the file afterwards.

Important notice: Made in SCP 3.6.10, with Inferno R1. To check it out, you may need to use Inferno R1 to test in FRED2.

Here are the files below.

[Removed as problem is solved!]

Also the prompt said:

"Unable to load the file "C:\Program Files (x86)\GOG.com\Freespace2\data\missions\(classified)_mission1_v04.fs2"

See attachment for that picture.

I'm using Windows Vista x64, SP2.

I really hope to hear an answer soon! I wanna continue my work before my creative buzz wears off. Thanks in advance!

-JC



[attachment deleted by ninja]
Title: Re: Corrupted .FS2 mission file
Post by: General Battuta on February 17, 2011, 03:18:49 pm
Please open the mission in a debug FRED build and post the resulting log. Also, FRED should autogenerate backup files - open one of those?
Title: Re: Corrupted .FS2 mission file
Post by: FUBAR-BDHR on February 17, 2011, 03:45:43 pm
Took a real quick look and there appear to be some issues in the messages section toward the end of the file.  I'd try removing the following:

//WARNING: Low-level EMP disruption. Uncommon to area. Advice caution.", -1)

Where ever it is found. 
Title: Re: Corrupted .FS2 mission file
Post by: JCDNWarrior on February 17, 2011, 03:49:19 pm
Thanks, Battuta and FUBAR. FUBAR, that line is part of one of the Training messages. It was never a problem, and is by far not my newest edit. Still, that helps a bit already.

I'm unable to debug the file right now - Could anyone else do that for me? I'm looking up the newest Debug builds now, hard to find though.

Thanks in advance!
Title: Re: Corrupted .FS2 mission file
Post by: General Battuta on February 17, 2011, 03:56:35 pm
I actually do recall hitting issues with //, try changing it to something else.
Title: Re: Corrupted .FS2 mission file
Post by: FUBAR-BDHR on February 17, 2011, 04:01:27 pm
Looks like the old ; issue (except with //).  The problem looks like every time that message is getting saved it is adding extra text that isn't supposed to be there.  It's probably to the point now that the line is so long its exceeding the 4096 character limit.  You will need to fix it in notepad. 
Title: Re: Corrupted .FS2 mission file
Post by: JCDNWarrior on February 17, 2011, 04:13:08 pm
I've managed to re-produce the problem, this time in the backup file, as I wasnt able to save it anyway.

Below the attachments. I hope that helps in the search!

I did try to fix all the extra symbols I didnt need; Sadly that wasn't enough. The //'s and ;'s were removed, but the problem, persisted.

More details:

Quote
Failed attempting to reload mission after saving.  Report this bug now!
ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fred2_open_3_6_12r_INF.exe! <no symbol>
fred2_open_3_6_12r_INF.exe! <no symbol>
msacm32.drv! widMessage + 18994 bytes
<no module>! <no symbol>
<no module>! <no symbol>

With the RC3 Exe's:

Couldn't open mission 'Classified_Mission1_v04.fs2'

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_12_RC3r_INF.exe! <no symbol>
fs2_open_3_6_12_RC3r_INF.exe! <no symbol>
fs2_open_3_6_12_RC3r_INF.exe! <no symbol>


[attachment deleted by ninja]
Title: Re: Corrupted .FS2 mission file
Post by: General Battuta on February 17, 2011, 05:05:56 pm
Probably best to post the whole fred2_open.log from /data/. Also, instead of using a 3.6.12 release candidate, try using 3.6.12 final.
Title: Re: Corrupted .FS2 mission file
Post by: JCDNWarrior on February 17, 2011, 05:16:11 pm
Here you go.

http://rapidshare.com/files/448504769/fred2_open.log
Title: Re: Corrupted .FS2 mission file
Post by: karajorma on February 17, 2011, 05:53:21 pm
Try this.

I'm pretty sure FUBAR is right about the cause. Don't use // in messages and you should be fine.

[attachment deleted by ninja]
Title: Re: Corrupted .FS2 mission file
Post by: JCDNWarrior on February 17, 2011, 06:08:14 pm
Thanks a lot, Karajorma. I'm still having issues though. No changes to it.

I'm curious where the problem could be. Everything's updated to the newest versions (at the very least, now) and so far no differences.

At least v.03 works fine, with not many differences -- Last big changes were adding many Training messages and improving skybox.

Any idea what it could be at this rate? I'll supply all information I can.

-JC
Title: Re: Corrupted .FS2 mission file
Post by: karajorma on February 18, 2011, 12:03:36 am
Looks like I didn't fix the correct problem, just one of many.

Basically you need to open the mission in wordpad and replace anything that looks like this

Code: [Select]
$MessageNew:  XSTR("//MILNET REPORT #00340 Jump completed. All systems nominal.", -1)

 //MILNET REPORT #00340 Jump completed. All systems nominal.", -1)

 //MILNET REPORT #00340 Jump completed. All systems nominal.", -1)


 //MILNET REPORT #00340 Jump completed. All systems nominal.", -1)



 //MILNET REPORT #00340 Jump completed. All systems nominal.", -1)

 $end_multi_text

with this


Code: [Select]
$MessageNew:  XSTR("MILNET REPORT #00340 Jump completed. All systems nominal.", -1)
 $end_multi_text


Your use of // has caused this problem. Do a search after you're done and make sure you aren't using that anywhere in the mission.
Title: Re: Corrupted .FS2 mission file
Post by: JCDNWarrior on February 18, 2011, 07:39:07 am
Okay, looks like that fixed it! There were dozen's of instances formed from two different texts with // . After removing, the level loaded correctly.

Thanks a great deal for all the help, Battuta, Karajorma and FUBAR. Let's see how good I can make these missions - Learned a lot lately and want to apply it as much as i can ;)

EDIT:

Ookay, while we are at it, a new problem has arrived. Mission 1 works great now, but now Mission 4 is having a different problem. I'm hoping we can take a look at it!

[Removed link]

Mission CTD's on load sometimes, and else it reports various problems with Special HP/Special Shield and other settings. Even after removing these entries through Notepad, it persisted.

Below, one of such warnings.

Quote
Error: C:\Program Files (x86)\GOG.com\Freespace 2\data\missions\Classified_Mission4_Gather.fs2(line 171:
Error: Required token = [#Wings] or [$Name:], found [+Special Hitpoints: 1050] .

File: PARSELO.CPP
Line: 670


Call stack:
------------------------------------------------------------------
------------------------------------------------------------------

It worked fine two days ago when I last tested it, and I haven't changed anything to the mission itself till now. Very strange and random.

Hope to hear more soon!
Title: Re: Corrupted .FS2 mission file
Post by: Iss Mneur on February 18, 2011, 03:02:36 pm
Below, one of such warnings.

Quote
Error: C:\Program Files (x86)\GOG.com\Freespace 2\data\missions\Classified_Mission4_Gather.fs2(line 171:
Error: Required token = [#Wings] or [$Name:], found [+Special Hitpoints: 1050] .

File: PARSELO.CPP
Line: 670


Call stack:
------------------------------------------------------------------
------------------------------------------------------------------

It worked fine two days ago when I last tested it, and I haven't changed anything to the mission itself till now. Very strange and random.

Hope to hear more soon!
Either you are using a version of FRED that does not support +Special Hitpoints: or when you were manually editing the file you put that tag in out of order (check the wiki for the correct order of the tags).
Title: Re: (New problem) Corrupted .FS2 mission file
Post by: Goober5000 on February 18, 2011, 10:58:26 pm
I've added $slash and $backslash to the FRED character set so that this can be bypassed in the future.
Title: Re: (New problem) Corrupted .FS2 mission file
Post by: JCDNWarrior on February 19, 2011, 03:59:15 am
Thanks, Goober. That will help so that no one else gets in trouble over it in the future.

I've managed to, miraculously, get Mission 4 to work fine again by loading it with the newest FRED2 3.6.12r. I'm putting the tag behind the thread now, but I may update if i run into more similar issues!

And once more, thanks for all the help. I'm glad I don't need to re-do a lot of the work I've done.

- JC