2018-02-21 12:44 EST


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002925wxFREDpublic2013-09-28 19:25
ReporterMjnMixael 
Assigned Toz64555 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformPCOSWindowsOS VersionWin7
Summary0002925: Assert "Assert failure" when opening certain editors
DescriptionAssert "Assert failure" when opening...

Mission Objectives
Background

Does not crash wxFRED, but OK and Cancel no longer work on these windows.
Steps To ReproduceSimply open the editors listed above.
Additional Information..\..\src\common\sizer.cpp(1402): assert "Assert failure" failed in wxGridSizer::DoInsert(): too many items (5 > 2*2) in grid sizer (maybe you should omit the number of either rows or columns?)
TagsNo tags attached.
Attached Files
  • patch file icon mantis_2925.patch (9,415 bytes) 2013-09-28 18:46 -
    Index: wxFRED_base.cpp
    ===================================================================
    --- wxFRED_base.cpp	(revision 9829)
    +++ wxFRED_base.cpp	(working copy)
    @@ -1674,7 +1674,7 @@
     	sbSizer33 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Current Objective") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer27;
    -	fgSizer27 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer27 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer27->AddGrowableCol( 1 );
     	fgSizer27->SetFlexibleDirection( wxBOTH );
     	fgSizer27->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -2425,7 +2425,7 @@
     	bSizer100->Add( chkToggleShipTrails, 0, wxALL, 3 );
     	
     	wxFlexGridSizer* fgSizer32;
    -	fgSizer32 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer32 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer32->SetFlexibleDirection( wxBOTH );
     	fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
     	
    @@ -2673,7 +2673,7 @@
     	sbSizer38 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Ambient Light") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer40;
    -	fgSizer40 = new wxFlexGridSizer( 2, 3, 0, 0 );
    +	fgSizer40 = new wxFlexGridSizer( 0, 3, 0, 0 );
     	fgSizer40->AddGrowableCol( 1 );
     	fgSizer40->SetFlexibleDirection( wxHORIZONTAL );
     	fgSizer40->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -2776,7 +2776,7 @@
     	bSizer1071->Add( fgSizer3121, 0, 0, 5 );
     	
     	wxFlexGridSizer* fgSizer41;
    -	fgSizer41 = new wxFlexGridSizer( 3, 2, 0, 0 );
    +	fgSizer41 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer41->SetFlexibleDirection( wxBOTH );
     	fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
     	
    @@ -2833,7 +2833,7 @@
     	sbSizer39->Add( m_checkBox48, 0, wxALL, 3 );
     	
     	wxFlexGridSizer* fgSizer37;
    -	fgSizer37 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer37 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer37->AddGrowableCol( 1 );
     	fgSizer37->SetFlexibleDirection( wxHORIZONTAL );
     	fgSizer37->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3250,7 +3250,7 @@
     	bSizer71 = new wxBoxSizer( wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer10;
    -	fgSizer10 = new wxFlexGridSizer( 2, 3, 0, 0 );
    +	fgSizer10 = new wxFlexGridSizer( 0, 3, 0, 0 );
     	fgSizer10->AddGrowableCol( 0 );
     	fgSizer10->AddGrowableCol( 1 );
     	fgSizer10->AddGrowableCol( 2 );
    @@ -3368,7 +3368,7 @@
     	sbSizer212 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Multiplayer") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer5;
    -	fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer5->AddGrowableCol( 1 );
     	fgSizer5->SetFlexibleDirection( wxBOTH );
     	fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3401,7 +3401,7 @@
     	sbSizer17 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Squadron Reassignment") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer3;
    -	fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer3->AddGrowableCol( 1 );
     	fgSizer3->SetFlexibleDirection( wxBOTH );
     	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3415,7 +3415,7 @@
     	fgSizer3->Add( txtSquadronName, 0, wxALL|wxEXPAND, 3 );
     	
     	btnSquadronLogo = new wxButton( this, wxID_ANY, wxT("Logo"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
    -	fgSizer3->Add( btnSquadronLogo, 1, wxALIGN_LEFT|wxALL|wxEXPAND|wxSHAPED, 3 );
    +	fgSizer3->Add( btnSquadronLogo, 1, wxALIGN_LEFT|wxALL|wxEXPAND, 3 );
     	
     	txtSquadronLogo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
     	txtSquadronLogo->SetMaxLength( 0 ); 
    @@ -3545,7 +3545,7 @@
     	sbSizer211 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Built-in Command Messages") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer7;
    -	fgSizer7 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer7 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer7->AddGrowableCol( 1 );
     	fgSizer7->SetFlexibleDirection( wxBOTH );
     	fgSizer7->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3576,7 +3576,7 @@
     	sbSizer221 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Music and Sound") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer8;
    -	fgSizer8 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer8->AddGrowableCol( 1 );
     	fgSizer8->SetFlexibleDirection( wxBOTH );
     	fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3627,7 +3627,7 @@
     	sbSizer231 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("AI Options") ), wxHORIZONTAL );
     	
     	wxFlexGridSizer* fgSizer9;
    -	fgSizer9 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer9 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer9->AddGrowableCol( 1 );
     	fgSizer9->SetFlexibleDirection( wxBOTH );
     	fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    @@ -3651,7 +3651,7 @@
     	sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Loading Screen") ), wxVERTICAL );
     	
     	wxFlexGridSizer* fgSizer4;
    -	fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
    +	fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0 );
     	fgSizer4->AddGrowableCol( 1 );
     	fgSizer4->SetFlexibleDirection( wxBOTH );
     	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    Index: wxFRED_base.xrc
    ===================================================================
    --- wxFRED_base.xrc	(revision 9829)
    +++ wxFRED_base.xrc	(working copy)
    @@ -2512,7 +2512,7 @@
     								<flag>wxEXPAND</flag>
     								<border>5</border>
     								<object class="wxFlexGridSizer">
    -									<rows>2</rows>
    +									<rows>0</rows>
     									<cols>2</cols>
     									<vgap>0</vgap>
     									<hgap>0</hgap>
    @@ -3965,7 +3965,7 @@
     										<flag>wxEXPAND</flag>
     										<border>5</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -4509,7 +4509,7 @@
     								<flag>wxEXPAND</flag>
     								<border>5</border>
     								<object class="wxFlexGridSizer">
    -									<rows>2</rows>
    +									<rows>0</rows>
     									<cols>3</cols>
     									<vgap>0</vgap>
     									<hgap>0</hgap>
    @@ -4759,7 +4759,7 @@
     										<flag>wxEXPAND</flag>
     										<border>5</border>
     										<object class="wxFlexGridSizer">
    -											<rows>3</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -4891,7 +4891,7 @@
     								<flag>wxEXPAND</flag>
     								<border>5</border>
     								<object class="wxFlexGridSizer">
    -									<rows>2</rows>
    +									<rows>0</rows>
     									<cols>2</cols>
     									<vgap>0</vgap>
     									<hgap>0</hgap>
    @@ -5634,7 +5634,7 @@
     				<flag>wxEXPAND</flag>
     				<border>5</border>
     				<object class="wxFlexGridSizer">
    -					<rows>2</rows>
    +					<rows>0</rows>
     					<cols>3</cols>
     					<vgap>0</vgap>
     					<hgap>0</hgap>
    @@ -5848,7 +5848,7 @@
     										<flag>wxSHAPED</flag>
     										<border>0</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -5912,7 +5912,7 @@
     										<flag>wxEXPAND</flag>
     										<border>0</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -5939,7 +5939,7 @@
     											</object>
     											<object class="sizeritem">
     												<option>1</option>
    -												<flag>wxALIGN_LEFT|wxALL|wxEXPAND|wxSHAPED</flag>
    +												<flag>wxALIGN_LEFT|wxALL|wxEXPAND</flag>
     												<border>3</border>
     												<object class="wxButton" name="btnSquadronLogo">
     													<style>wxBU_EXACTFIT</style>
    @@ -6175,7 +6175,7 @@
     										<flag>wxEXPAND</flag>
     										<border>5</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -6233,7 +6233,7 @@
     										<flag>wxEXPAND</flag>
     										<border>5</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -6343,7 +6343,7 @@
     										<flag>wxEXPAND</flag>
     										<border>5</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -6383,7 +6383,7 @@
     										<flag>wxEXPAND</flag>
     										<border>0</border>
     										<object class="wxFlexGridSizer">
    -											<rows>2</rows>
    +											<rows>0</rows>
     											<cols>2</cols>
     											<vgap>0</vgap>
     											<hgap>0</hgap>
    @@ -7654,7 +7654,7 @@
     											<object class="wxBitmapButton" name="btnPlayFailure">
     												<style>wxBU_AUTODRAW|wxBU_EXACTFIT</style>
     												<size>23,23</size>
    -												<bitmap>C:\Code\FreespaceOpen\fs2_open\code\wxfred2\res\play.xpm</bitmap>
    +												<bitmap>..\res\play.xpm</bitmap>
     												<default>0</default>
     											</object>
     										</object>
    
    patch file icon mantis_2925.patch (9,415 bytes) 2013-09-28 18:46 +

-Relationships
related to 0002926resolvedz64555 Assert "m_proportion==0" when opening Mission Specs 
+Relationships

-Notes

~0015298

z64555 (developer)

Patch uploaded. As with 2926, wxFormBuilder has a habit of declaring wxFlexGridSizers with a default value of 2 rows and 2 columns, but doesn't catch the error when you add more items to it in the editor.

~0015300

MjnMixael (manager)

Tested and it works.

~0015301

z64555 (developer)

Fix committed to trunk@9855.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-09-28 17:51 MjnMixael New Issue
2013-09-28 17:51 MjnMixael Status new => assigned
2013-09-28 17:51 MjnMixael Assigned To => z64555
2013-09-28 18:46 z64555 File Added: mantis_2925.patch
2013-09-28 18:48 z64555 Note Added: 0015298
2013-09-28 18:48 z64555 Status assigned => code review
2013-09-28 18:49 z64555 Relationship added related to 0002926
2013-09-28 19:18 MjnMixael Note Added: 0015300
2013-09-28 19:25 z64555 Changeset attached => fs2open trunk r9855
2013-09-28 19:25 z64555 Note Added: 0015301
2013-09-28 19:25 z64555 Status code review => resolved
2013-09-28 19:25 z64555 Resolution open => fixed
+Issue History