View Issue Details

IDProjectCategoryView StatusLast Update
0002779FSSCPgameplaypublic2013-01-12 21:58
ReporterInglonias Assigned ToFUBAR-BDHR  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWindows 7OS VersionHome (64 bit)
Product Version3.6.14 
Summary0002779: ~+U Crashes the game
DescriptionAfter enabling cheats, pressing ~+U crashes the game. This is a minor issue, I guess, but the 'U' key is right next to the 'I' key, and trying to make myself invincible will occasionally crash the game because I pressed the wrong key.

PS: What is ~+U even supposed to do?
Steps To ReproduceEnter a mission
Enable cheats
Press ~+U

Watch the game crash.
Additional InformationDebug log attached
TagsNo tags attached.

Activities

Inglonias

2013-01-12 04:42

reporter  

fs2_open.log (71,726 bytes)

FUBAR-BDHR

2013-01-12 07:53

developer   ~0014633

I can't reproduce this. Can you try with 3.6.16rc1 and see if it still exists?

Inglonias

2013-01-12 18:31

reporter  

fs2_open v3.6.16rc1.log (43,838 bytes)

Inglonias

2013-01-12 18:31

reporter   ~0014634

Last edited: 2013-01-12 18:31

Reproduced the bug using the debug build for 3.6.16rc1. New log is uploaded.

FUBAR-BDHR

2013-01-12 21:23

developer  

asteroid_cheat.patch (685 bytes)   
Index: io/keycontrol.cpp
===================================================================
--- io/keycontrol.cpp	(revision 9490)
+++ io/keycontrol.cpp	(working copy)
@@ -884,11 +884,15 @@
 			// launch asteroid
 			object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int subtype);
 			object *objp = asteroid_create(&Asteroid_field, 0, 0);
+			if(objp == NULL) {
+				break;
+			}			
 			vec3d vel;
 			vm_vec_copy_scale(&vel, &Player_obj->orient.vec.fvec, 50.0f);
 			objp->phys_info.vel = vel;
 			objp->phys_info.desired_vel = vel;
 			objp->pos = Player_obj->pos;
+			HUD_sourced_printf(HUD_SOURCE_HIDDEN, XSTR( "Asteroid launched", 18));
 			break;
 		}
 
asteroid_cheat.patch (685 bytes)   

FUBAR-BDHR

2013-01-12 21:25

developer   ~0014635

Seems I was hitting shift+~+U. Shows how much I use cheat codes. Anyway this is supposed to fire an asteroid in an asteroid field. As there is no asteroid filed in the mission it can't create one and caused the crash. Attached patch.

Goober5000

2013-01-12 21:57

administrator   ~0014637

Fix committed to trunk@9498.

Goober5000

2013-01-12 21:58

administrator   ~0014638

Good catch. This has been crashing ever since retail.

Related Changesets

fs2open: trunk r9498

2013-01-12 17:34

Goober5000


Ported: N/A

Details Diff
FUBAR's fix for 0002779 -- don't crash when launching asteroids Affected Issues
0002779
mod - /trunk/fs2_open/code/io/keycontrol.cpp Diff File

Issue History

Date Modified Username Field Change
2013-01-12 04:42 Inglonias New Issue
2013-01-12 04:42 Inglonias File Added: fs2_open.log
2013-01-12 07:53 FUBAR-BDHR Note Added: 0014633
2013-01-12 18:31 Inglonias File Added: fs2_open v3.6.16rc1.log
2013-01-12 18:31 Inglonias Note Added: 0014634
2013-01-12 18:31 Inglonias Note Edited: 0014634
2013-01-12 21:23 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-01-12 21:23 FUBAR-BDHR Status new => assigned
2013-01-12 21:23 FUBAR-BDHR File Added: asteroid_cheat.patch
2013-01-12 21:25 FUBAR-BDHR Note Added: 0014635
2013-01-12 21:25 FUBAR-BDHR Status assigned => code review
2013-01-12 21:57 Goober5000 Changeset attached => fs2open trunk r9498
2013-01-12 21:57 Goober5000 Note Added: 0014637
2013-01-12 21:57 Goober5000 Status code review => resolved
2013-01-12 21:57 Goober5000 Resolution open => fixed
2013-01-12 21:58 Goober5000 Note Added: 0014638