Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in FRED resulted in corrupt mission file #6285

Open
DefCynodont opened this issue Aug 8, 2024 · 4 comments
Open

Crash in FRED resulted in corrupt mission file #6285

DefCynodont opened this issue Aug 8, 2024 · 4 comments
Labels
bug An issue from unintended consequences fred A feature or issue related to the FReespace EDitor (FRED)

Comments

@DefCynodont
Copy link

I was saving a mission in FRED, (FSO 24.0.2) and when I clicked save, I got the following error message:

Error: C:\Games\FreespaceOpen\FS2\BtA-3.0.0\bta_core\data\missions\bta-af_m1_02.fs2(line 71):
Error: Required token = [#Wings] or [$Name:], found [$Team Color Setting: None 0.0000].

File: parselo.cpp
Line: 324

ntdll.dll! ZwWaitForSingleObject + 20 bytes
KERNELBASE.dll! WaitForSingleObjectEx + 142 bytes
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
USER32.dll! CallWindowProcW + 1548 bytes
USER32.dll! DispatchMessageW + 1188 bytes
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
fred2_open_24_0_2_x64_AVX.exe! <no symbol>
KERNEL32.DLL! BaseThreadInitThunk + 20 bytes
ntdll.dll! RtlUserThreadStart + 33 bytes

In addition, the mission file became heavily corrupted, more specifically: Most of the fixed strings are missing, starting with $Skybox Model: and $AI Profile And the text contains incorrect syntax, dislocated lines, dislocated strings, and huge amounts of missing data.

Example:

Vengeance 1        ;! Object #0
$Class: GTF Ulysses Friendly
$Team Color Setting: None 0.000000, 0.000000, 0.000000
    1.000000, 0.000000, 0.000000,
    0.000000, 1.000000, 0.000000,
    0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" "player-start" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( "attack ship" "guard ship" "ignore ship" "form on wing" "cover me" "attack any" )
+Use Table Score: 12 Khabash        ;! Object #1
$Class: PVSC Imhotep Friendly -1463.004150, 0.000000, 1032.130493
    1.000000, 0.000000, 0.000000,
    0.000000, 1.000000, 0.000000,
    0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot
+Subsystem: turret01
+Subsystem: turret02
+Subsystem: turret03
+Subsystem: turret04
+Subsystem: turret05 Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 50 Sigma 2        ;! Object #2
$Class: PVFr Bast Friendly -1487.023193, 0.000000, 732.876526
    1.000000, 0.000000, 0.000000,
    0.000000, 1.000000, 0.000000,
    0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Sigma 1        ;! Object #3
$Class: PVFr Bast Friendly -1406.280884, 0.000000, 734.748230

No major or unusual thing was being done by me in FRED when this occurred, I have no idea how this happened.

@Goober5000 Goober5000 added bug An issue from unintended consequences fred A feature or issue related to the FReespace EDitor (FRED) labels Aug 8, 2024
@Goober5000
Copy link
Contributor

Goober5000 commented Aug 8, 2024

I don't suppose you have a copy of the mission that, when saved, produces this error? This is the sort of thing that's difficult to track down without a test case.

Do any of your ships/wings/IFFs/callsigns/strings/files (edit: or Notes or Mission Description) contain a quote or semicolon?

@DefCynodont
Copy link
Author

DefCynodont commented Aug 8, 2024

I only have the corrupted mission file post-error, the backups don't crash.

No such quotes or semicolons. I only just started on the mission and it's mostly empty. I'm not sure what could have caused it to crash when saving.

@DefCynodont
Copy link
Author

DefCynodont commented Aug 8, 2024

I will provide the corrupted mission file's full code here, know that it's made to run in BtA,

#Mission Info

$Version: 23.3
$Name:  XSTR("With Enemies Like These. . .", -1)
$Author: Kyle Mchugh
$Created: 07/31/24 at 13:06:28
$Modified: 08/06/24 at 17:55:42
$Notes:
This is a FRED2_OPEN created mission.
$End Notes:

$Mission Desc:
 XSTR("Put mission description here", -1)
$end_multi_text
+Game Type Flags: 1
+Flags: 0
+Fog Near Mult: 1.000000

+Fog Far Mult: 1.000000


+Disallow Support: 0
+Hull Repair Ceiling: 0.000000
+Subsystem Repair Ceiling: 100.000000

+Viewer pos: 1904.448853, 1573.210449, 1157.365356
+Viewer orient:
	-0.327183, 0.000005, 0.944961,
	-0.346684, 0.930269, -0.120041,
	-0.879069, -0.366879, -0.304366

$Starting wing names: ( "Vengeance" "Mu" "Phi" )
$Squadron wing names: ( "Vengeance" "Mu" "Phi" "Nu" "Chi" )
$Team-versus-team wing names: ( "Vengeance" "Zeta" ) antares-box.pof BTA

#Command Briefing

#Briefing
$start_briefing
$num_stages: 0
$end_briefing

#Debriefing_info

$Num stages: 0

#Players		;! 1 total

$Starting Shipname: Vengeance 1
$Ship Choices: (
	"GTF Apollo"	5
	"GTF Valkyrie"	5
	"GTF Hercules"	5
	"GTF Ulysses"	5
	"GTF Myrmidon"	5
	"GTF Loki"	5
	"GTB Athena"	5
	"GTB Zeus"	5
	"GTB Medusa"	5
	"GTB Ursa"	5
)

+Weaponry Pool: (
	"Avenger"	4
	"Interceptor"	20
)

#Objects		;! 13 total
 Vengeance 1		;! Object #0
$Class: GTF Ulysses Friendly
$Team Color Setting: None 0.000000, 0.000000, 0.000000
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" "player-start" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( "attack ship" "guard ship" "ignore ship" "form on wing" "cover me" "attack any" )
+Use Table Score: 12 Khabash		;! Object #1
$Class: PVSC Imhotep Friendly -1463.004150, 0.000000, 1032.130493
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot
+Subsystem: turret01
+Subsystem: turret02
+Subsystem: turret03
+Subsystem: turret04
+Subsystem: turret05 Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 50 Sigma 2		;! Object #2
$Class: PVFr Bast Friendly -1487.023193, 0.000000, 732.876526
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Sigma 1		;! Object #3
$Class: PVFr Bast Friendly -1406.280884, 0.000000, 734.748230
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Vengeance 2		;! Object #4
$Class: GTF Ulysses Friendly
$Team Color Setting: None -101.354851, -0.001968, -98.535965
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( "attack ship" "guard ship" "ignore ship" "form on wing" "cover me" "attack any" )
+Use Table Score: 12 Nile		;! Object #5
$Class: PVT Qeb Friendly -1457.244019, -0.000244, 434.976074
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100
+Initial Shields: 100 Pilot
+Subsystem: turret01a
+Subsystem: turret02a
+Subsystem: turret03a
+Subsystem: turret04a Hyperspace ( true )  Hyperspace ( false )  10 ( "cargo-known" "no-shields" )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 40 Capricorn 1		;! Object #6
$Class: HLB Sekhmet Hostile -2281.763184, 0.000854, -767.845032
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Capricorn 2		;! Object #7
$Class: HLB Sekhmet Hostile -2406.932129, 0.000854, -885.789612
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Capricorn 3		;! Object #8
$Class: HLB Sekhmet Hostile -2165.937500, 0.000854, -854.908875
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Capricorn 4		;! Object #9
$Class: HLB Sekhmet Hostile -2267.106445, 0.000854, -1004.841125
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( )
+Flags2: ( )
+Respawn priority: 0
+Orders Accepted List: ( )
+Use Table Score: 20 Aries 1		;! Object #10
$Class: PVF Thoth Friendly -2254.749023, 0.000702, -439.840027
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Use Table Score: 14 Aries 2		;! Object #11
$Class: PVF Thoth Friendly -2360.026611, 0.000702, -526.531189
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Use Table Score: 14 Aries 3		;! Object #12
$Class: PVF Thoth Friendly -2173.982666, 0.000702, -536.976379
	1.000000, 0.000000, 0.000000,
	0.000000, 1.000000, 0.000000,
	0.000000, 0.000000, 1.000000  XSTR("Nothing", -1) 33 100 Pilot Hyperspace ( false )  Hyperspace ( false )  10 ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Use Table Score: 14		;! 3 total Vengeance 1 0 0		;! Vengeance 1 Hyperspace ( true )  Hyperspace ( false )  (		;! 2 total
	"Vengeance 1"
	"Vengeance 2"
) 0 ( ) Capricorn 1 0 0		;! Capricorn 1 Hyperspace ( true )  Hyperspace ( false )  (		;! 4 total
	"Capricorn 1"
	"Capricorn 2"
	"Capricorn 3"
	"Capricorn 4"
) ( ) Aries 1 0 0		;! Aries 1 Hyperspace ( true )  Hyperspace ( false )  (		;! 3 total
	"Aries 1"
	"Aries 2"
	"Aries 3"
) ( )		;! 4 total
 ( when ( true ) ( do-nothing ) )  >>> MISSION AND CAMPAIGN << 1 1
$Annotations Start
+Background Color: 0, 0, 255
$Annotations End ( when ( true ) ( do-nothing ) )  >>> INTITAL CONDITIONS <<< 1 1
$Annotations Start
+Background Color: 0, 0, 0
$Annotations End ( when ( true ) ( do-nothing ) )  >>> EVENTS <<< 1 1
$Annotations Start
+Background Color: 0, 0, 255
$Annotations End ( when ( true ) ( do-nothing ) )  >>> END STATES <<< 1 1
$Annotations Start
+Background Color: 0, 0, 0
$Annotations End		;! 0 total
		;! 0 lists total
		;! 0 total
		;! 0 total
		;! 1 total
 500 7895160
+Flags: ( "corrected angles" ) SunAntaresA 0.349066 0.000000 4.712389 0.500000 SunAntaresB 6.143559 0.000000 4.363323 1.000000 PlanetAnt7 5.969026 6.265732 1.605703 8.000000 10.000000 1 1 40 1 0
+Field Debris Type Name: Medium Asteroid 0.000000 -10000.000000, -750.000000, -50000.000000 10000.000000, 750.000000, 50000.000000
+Inner Bound:
$Minimum: -2000.000000, -350.000000, -49500.000000
$Maximum: 500.000000, 350.000000, 49500.000000 None None

#Custom Data

$begin_data_map
+Val: AlphaDisruptors false
+Val: BonusHint ("No hint", -1)
+Val: CBriefMissionDate ("none", -1)
+Val: CBriefMissionLocation ("none", -1)
+Val: MissionDate ("none", -1)
+Val: MissionLocation ("none", -1)
+Val: ShipLoadoutBlocked ("none", "none")
+Val: UseInventory false
$end_data_map

@Goober5000
Copy link
Contributor

It reminds me of the corruption that motivated the #5517 fix, but this isn't using the mission importer.

@github-project-automation github-project-automation bot moved this to Critical Priority in Bug Triage Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue from unintended consequences fred A feature or issue related to the FReespace EDitor (FRED)
Projects
Status: Critical Priority
Development

No branches or pull requests

2 participants