View Issue Details

IDProjectCategoryView StatusLast Update
0000629FSSCPgameplaypublic2005-11-23 06:45
Reporterphreak Assigned Totaylor  
PriorityhighSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformP4 3.6 GHzOSWindows XPOS VersionSP2
Product Version3.6.7 
Summary0000629: Cheat selecting unused missiles will crash the game
DescriptionWhen testing some features, I cheat selected the Helios. Upon firing i discovered it was not loaded since no ships were using the weapon at the beginning of the mission. Therefore, crashage ensued. The fatal error occured occurs here in the function weapon_create():

if ( wip->subtype == WP_MISSILE ){
*** objp->radius = model_get_radius(wip->model_num);

wip->model_num is -1 and model_get_radius() has no out of bounds check and therefore returns Polygon_models[-1].radius.

TagsNo tags attached.

Activities

taylor

2005-11-23 00:55

administrator   ~0003920

I cant' really remember cheat usage, do you have to enable cheats before a mission or during it? If it's before then making sure everything gets loaded would be simple. If it's after then we'll just have to make sure all weapon models get paged in during the mission when cheats are enabled.

phreak

2005-11-23 01:10

developer   ~0003921

cheats are enabled by typing www.freespace2.com during a mission. To cycle secondary weapons use ~ and 9 at the same time. It would be easiest to test this by loading the first mission and cheat switching to a helios.

taylor

2005-11-23 06:05

administrator   ~0003922

Ok, all weapon models that aren't already loaded will now. This only affects models since bitmaps will already be loaded but not in memory and you can't page them in after mission load. Those will instead get loaded the first time they are used so there might be a slight delay the first time. Fix will hit CVS shortly.

Oh and model_get_radius() should take the out-of-bounds checks from model_get() since it does do a few. That's why I didn't add them for each model_get_* function previously. Did it actually get past the model_get() Assert()?

phreak

2005-11-23 06:17

developer   ~0003923

i was running release so asserts don't fire then anyway.

taylor

2005-11-23 06:45

administrator   ~0003925

Fixered.

Issue History

Date Modified Username Field Change
2005-11-22 23:58 phreak New Issue
2005-11-23 00:55 taylor Note Added: 0003920
2005-11-23 00:55 taylor Status new => assigned
2005-11-23 00:55 taylor Assigned To => taylor
2005-11-23 01:10 phreak Note Added: 0003921
2005-11-23 06:05 taylor Note Added: 0003922
2005-11-23 06:17 phreak Note Added: 0003923
2005-11-23 06:45 taylor Status assigned => resolved
2005-11-23 06:45 taylor Resolution open => fixed
2005-11-23 06:45 taylor Note Added: 0003925