View Issue Details

IDProjectCategoryView StatusLast Update
0002155FSSCPtablespublic2012-12-13 05:42
ReporterFUBAR-BDHR Assigned ToGenghis  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.12 RC1 
Fixed in Version3.6.12 
Summary0002155: FS2 not catching table<->model errors that FRED does on subsystems
DescriptionDid a conversion last night and misspelled subsystem susbystem in the $special=subsystem line of 3 subsystems (it was St. Patty's day what do you expect?) Tested the model in the F3 tech lab and it loaded just and the thrusters and glows attached to those subsystems worked as well (they were engines). Went to make a test mission for something else and as soon as FRED hit the ship it produced the warnings about the missing subsystems. Running debug in both FS2 and FRED.
TagsNo tags attached.

Relationships

related to 0002752 resolvedGoober5000 Loading a ship in lab then toggling test load on causes invalid invalid subsystem warnings 

Activities

2010-03-20 05:07

 

2155.rar (205,549 bytes)

FUBAR-BDHR

2010-03-20 05:08

developer   ~0011811

Attached a modified Ganymede Installation. 2 $special=subsystem entries are misspelled in the pof. FRED catches it ship lab doesn't

2010-03-23 02:57

 

fix_2155.diff (1,706 bytes)   
Index: code/lab/lab.cpp
===================================================================
--- code/lab/lab.cpp	(revision 6027)
+++ code/lab/lab.cpp	(working copy)
@@ -33,6 +33,7 @@
 #define LAB_FLAG_SHOW_DEBRIS		(1<<2)	// render debris instead of normal LOD
 #define LAB_FLAG_SUBMODEL_ROTATE	(1<<3)	// do rotation for any rotating ship subobjects
 #define LAB_FLAG_LIGHTNING_ARCS		(1<<4)	// show damage lightning
+#define LAB_FLAG_FULLY_LOAD			(1<<5)	// use create_ship() to test the ships
 
 // modes
 #define LAB_MODE_NONE		0	// not showing anything
@@ -1607,6 +1608,7 @@
 	// add all of the flags that we want/need...
 
 	// viewer flags
+	ADD_RENDER_FLAG("Test Load Ships", Lab_viewer_flags, LAB_FLAG_FULLY_LOAD);
 	ADD_RENDER_FLAG("Disable Model Rotation", Lab_viewer_flags, LAB_FLAG_NO_ROTATION);
 	ADD_RENDER_FLAG("Show Insignia", Lab_viewer_flags, LAB_FLAG_SHOW_INSIGNIA);
 	ADD_RENDER_FLAG("Show Damage Lightning", Lab_viewer_flags, LAB_FLAG_LIGHTNING_ARCS);
@@ -1838,6 +1840,16 @@
 	int ship_index = (int)(caller->GetSelectedItem()->GetParentItem()->GetData());
 	Assert( ship_index >= 0 );
 
+	// Genghis - Attempt to create and then immediately delete the selected ship type.
+	// This causes the full error-handling to kick-in, making the Lab viewer a more
+	// useful tool for checking model errors.
+	if (Lab_viewer_flags & LAB_FLAG_FULLY_LOAD)
+	{
+		The_mission.ai_profile = &Ai_profiles[Default_ai_profile];
+		int test_idx = ship_create(&vmd_identity_matrix, &vmd_zero_vector, ship_index);
+		obj_delete(test_idx);
+	}
+
 	Lab_last_selected_ship = Lab_selected_index;
 
 	labviewer_change_model(Ship_info[ship_index].pof_file, caller->GetSelectedItem()->GetData(), ship_index);
fix_2155.diff (1,706 bytes)   

Genghis

2010-03-23 03:01

developer   ~0011824

So the problem was that in the Lab it doesn't bother trying to actually load and fully error-check a ship, it just does the minimum necessary to load and view the model and its sub-models, without caring much about what type of sub-objects they are.

The candidate fix in fix_2155.diff adds an option to the Lab's render options menu called "Test Load Ships". When this is checked, each time you change the ship LOD or type it will do a full create/destroy of that ship type, therefore triggering all the error-checking code that was being skipped before.

I've left the option switched-off by default, because it slows-down rapid browsing of the ship list.

karajorma

2010-05-02 05:50

administrator   ~0011923

How hard would it be to display that test loading mode was on at the bottom of the screen? Something like this could probably use a visual clue that it was on rather than simply relying on the user to open up the rendering options menu or notice the longer load times.

That said I'll commit the fix as it is now since it is a useful feature already.

Issue History

Date Modified Username Field Change
2010-03-19 09:51 FUBAR-BDHR New Issue
2010-03-20 05:07 FUBAR-BDHR File Added: 2155.rar
2010-03-20 05:08 FUBAR-BDHR Note Added: 0011811
2010-03-20 12:51 Genghis Status new => assigned
2010-03-20 12:51 Genghis Assigned To => Genghis
2010-03-23 02:57 Genghis File Added: fix_2155.diff
2010-03-23 03:01 Genghis Note Added: 0011824
2010-05-02 05:50 karajorma Note Added: 0011923
2010-05-02 05:52 karajorma Status assigned => resolved
2010-05-02 05:52 karajorma Fixed in Version => 3.6.12
2010-05-02 05:52 karajorma Resolution open => fixed
2012-12-13 05:42 Goober5000 Relationship added related to 0002572
2012-12-13 05:42 Goober5000 Relationship deleted related to 0002572
2012-12-13 05:42 Goober5000 Relationship added related to 0002752