Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Colt on July 17, 2019, 03:17:18 pm

Title: Unable to open FRED mission
Post by: Colt on July 17, 2019, 03:17:18 pm
So I was doing some editing, but when I went to save the mission, I got an error about some sexp expressions (this usually happens when inserting new events between other events). Whenever this happens I just press continue and then proceed to fix them. This time however I got the following error.

Code: [Select]
Error: Failed attempting to reload mission after saving.  Report this bug now!
File: freddoc.cpp
Line: 658

ntdll.dll! ZwWaitForSingleObject + 20 bytes
KERNELBASE.dll! WaitForSingleObjectEx + 147 bytes
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
USER32.dll! DispatchMessageW + 1702 bytes
USER32.dll! DispatchMessageW + 450 bytes
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
fred2_open_3_8_1_20190514_69ebdd0_x64_SSE2.exe! <no symbol>
KERNEL32.DLL! BaseThreadInitThunk + 20 bytes
ntdll.dll! RtlUserThreadStart + 33 bytes

Every time I try to load the mission in FRED I get a window that says it is unable to load the mission file. How would I go about fixing this?
Title: Re: Unable to open FRED mission
Post by: Nightmare on July 17, 2019, 04:35:24 pm
Can have a wide range of causes. IIRC running a debug built _might_ be able to bring you to the point where it happens, not 100% sure.

-You forgot a space after an event name ("Destroy Gemini ")
-Change hierarchy of events so "is-event-true-delay" will show <Gemini Event>

basically everything that throws out a error (apart from the usual GTF Ship 0 not part of wing stuff) can cause FRED to refuse to load your mission nowadays.
Title: Re: Unable to open FRED mission
Post by: Colt on July 17, 2019, 05:10:55 pm
-Change hierarchy of events so "is-event-true-delay" will show <Gemini Event>
Yep that's what it was.

Also I remembered that I could edit the mission via a text file  :banghead:. All's working now!
Title: Re: Unable to open FRED mission
Post by: Nightmare on July 17, 2019, 05:30:09 pm
-Change hierarchy of events so "is-event-true-delay" will show <Gemini Event>
Yep that's what it was.

Also I remembered that I could edit the mission via a text file  :banghead:.

Be super careful with that, 1 typo and you've got a good chance to end up in the same issue again.
Title: Re: Unable to open FRED mission
Post by: Nyctaeus on July 18, 2019, 07:50:45 am
-Change hierarchy of events so "is-event-true-delay" will show <Gemini Event>
Yep that's what it was.

Also I remembered that I could edit the mission via a text file  :banghead:.

Be super careful with that, 1 typo and you've got a good chance to end up in the same issue again.
Pfff... Real Freders use notepad!
Title: Re: Unable to open FRED mission
Post by: Nightmare on July 18, 2019, 08:21:19 am
Copy + Paste = Win
Title: Re: Unable to open FRED mission
Post by: Woolie Wool on July 19, 2019, 07:59:04 pm
Confirmed that sexps with illegal entries (bad hangar bay assignments, ships that don't actually exist, etc.) cause FRED to treat a mission as entirely corrupted rather than spit out a list of the errors in the mission like normal. I'm working on a Github issue now.

E: Posted. (https://github.com/scp-fs2open/fs2open.github.com/issues/2067)
Title: Re: Unable to open FRED mission
Post by: karajorma on July 21, 2019, 01:45:49 am
Yeah, the game should at least spit out what might be the cause even if it can't load the mission.
Title: Re: Unable to open FRED mission
Post by: Colt on July 21, 2019, 12:02:08 pm
Confirmed that sexps with illegal entries (bad hangar bay assignments, ships that don't actually exist, etc.)
Posted. (https://github.com/scp-fs2open/fs2open.github.com/issues/2067)
Yikes. Gonna be super careful for the time being. Thanks for finding that.
Title: Re: Unable to open FRED mission
Post by: Cyborg17 on July 21, 2019, 03:08:51 pm
Possible fix submitted. Next nightly (not today's) will probably have it.  Until then, you can try editing any bad sexp in notepad.
Title: Re: Unable to open FRED mission
Post by: Nightmare on July 21, 2019, 04:59:54 pm
Thank you~ :yes: :yes: