View Issue Details

IDProjectCategoryView StatusLast Update
0002784FSSCPmath-relatedpublic2013-11-06 19:00
ReporterFUBAR-BDHR Assigned ToWanderer  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.16 
Summary0002784: Null vec3d caused by shockwave from explosion effect at center of ship
DescriptionAttempting to reproduce another bug I set up a simple mission with a cargo container at 0,0,0. I also added an event to trigger an explosion effect at 0,0,0. Well a bug in the event logic triggered the explosion effect at mission start which resulted in the Null vec3d in vec3d normalize (yes I found another one). Best guess at this point is the shockwave and ship centers both being at 0,0,0 is the cause.
Steps To ReproduceRun the attached mission.
Additional Information     fs2_open_3_6_15d_INF_SSE2.exe!debug_int3(char * file, int line) Line 768 C++
     fs2_open_3_6_15d_INF_SSE2.exe!Warning(char * filename, int line, const char * format, ...) Line 1371 + 0x13 bytes C++
> fs2_open_3_6_15d_INF_SSE2.exe!vm_vec_copy_normalize(vec3d * dest, vec3d * src) Line 435 + 0x18 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!physics_apply_shock(vec3d * direction_vec, float pressure, physics_info * pi, matrix * orient, vec3d * min, vec3d * max, float radius) Line 949 + 0x10 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!weapon_area_apply_blast(vec3d * force_apply_pos, object * ship_objp, vec3d * blast_pos, float blast, int make_shockwave) Line 5703 + 0x4a bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!shockwave_move(object * shockwave_objp, float frametime) Line 336 + 0x21 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!shockwave_move_all(float frametime) Line 625 + 0x20 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!game_simulation_frame() Line 4050 + 0x13 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!game_frame(bool paused) Line 4407 C++
     fs2_open_3_6_15d_INF_SSE2.exe!game_do_frame() Line 4822 + 0x7 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!game_do_state(int state) Line 6511 C++
     fs2_open_3_6_15d_INF_SSE2.exe!gameseq_process_events() Line 407 + 0x14 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!game_main(char * cmdline) Line 7086 + 0x5 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int nCmdShow) Line 7155 + 0x9 bytes C++
     fs2_open_3_6_15d_INF_SSE2.exe!__tmainCRTStartup() Line 275 + 0x2c bytes C
     fs2_open_3_6_15d_INF_SSE2.exe!WinMainCRTStartup() Line 189 C
     kernel32.dll!751633aa()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
     ntdll.dll!779e9ef2()
     ntdll.dll!779e9ec5()

vm_vec_copy_normailze() locals

- dest 0x0018ef80 {xyz={...} a1d=0x0018ef80 } vec3d *
- xyz {x=-1.0737418e+008 y=-1.0737418e+008 z=-1.0737418e+008 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
        x -1.0737418e+008 float
        y -1.0737418e+008 float
        z -1.0737418e+008 float
- a1d 0x0018ef80 float [3]
        [0] -1.0737418e+008 float
        [1] -1.0737418e+008 float
        [2] -1.0737418e+008 float
- src 0x0018f004 {xyz={...} a1d=0x0018f004 } vec3d *
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
- a1d 0x0018f004 float [3]
        [0] 0.00000000 float
        [1] 0.00000000 float
        [2] 0.00000000 float
        m 0.00000000 float
        im -1.0737418e+008 float


physics_apply_shock() locals

+ direction_vec 0x0018f150 {xyz={...} a1d=0x0018f150 } vec3d *
        pressure 500.00000 float
+ pi 0x01223648 {flags=2 mass=2774.7871 center_of_mass={...} ...} physics_info *
+ orient 0x012235f0 {vec={...} a2d=0x012235f0 a1d=0x012235f0 } matrix *
- min 0x0e302e18 {xyz={...} a1d=0x0e302e18 } vec3d *
+ xyz {x=-11.259947 y=-11.088040 z=-17.268265 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0e302e18 float [3]
- max 0x0e302e24 {xyz={...} a1d=0x0e302e24 } vec3d *
+ xyz {x=11.259949 y=11.627910 z=17.268267 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0e302e24 float [3]
        radius 23.407776 float
- local_torque {xyz={...} a1d=0x0018f004 } vec3d
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018f004 float [3]
- impact_vec {xyz={...} a1d=0x0018efc8 } vec3d
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018efc8 float [3]
- area {xyz={...} a1d=0x0018efb4 } vec3d
+ xyz {x=997.97363 y=777.75909 z=511.56082 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018efb4 float [3]
- normal {xyz={...} a1d=0x0018f018 } vec3d
+ xyz {x=1.0000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018f018 float [3]
- delta_rotvel {xyz={...} a1d=0x0018ef80 } vec3d
+ xyz {x=-1.0737418e+008 y=-1.0737418e+008 z=-1.0737418e+008 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018ef80 float [3]
- temp_torque {xyz={...} a1d=0x0018eff0 } vec3d
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018eff0 float [3]
- torque {xyz={...} a1d=0x0018efdc } vec3d
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018efdc float [3]
        velocity_scale -1.0737418e+008 float
        scale -1.0737418e+008 float
- sin {xyz={...} a1d=0x0018efa0 } vec3d
+ xyz {x=0.00000000 y=1.0000000 z=1.0000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018efa0 float [3]


weapon_area_apply_blast()

+ force_apply_pos 0x00000000 {xyz={...} a1d=0x00000000 } vec3d *
+ ship_objp 0x012235c0 {next=0x012237c0 prev=0x012233c0 signature=2 ...} object *
+ blast_pos 0x02503068 {xyz={...} a1d=0x02503068 } vec3d *
        blast 500.00000 float
        make_shockwave 1 int
- force {xyz={...} a1d=0x0018f150 } vec3d
+ xyz {x=1.0000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018f150 float [3]
- vec_blast_to_ship {xyz={...} a1d=0x0018f13c } vec3d
+ xyz {x=1.0000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018f13c float [3]
- vec_ship_to_impact {xyz={...} a1d=0x0018f128 } vec3d
+ xyz {x=0.00000000 y=0.00000000 z=0.00000000 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0018f128 float [3]
- pm 0x0e302d00 {id=902 version=2116 filename=0x0e302d08 "cargo02.pof" ...} polymodel *
        id 902 int
        version 2116 int
+ filename 0x0e302d08 "cargo02.pof" char [64]
        flags 0 unsigned int
        n_detail_levels 4 int
+ detail 0x0e302d50 int [8]
+ detail_depth 0x0e302d70 float [8]
        num_debris_objects 5 int
+ debris_objects 0x0e302d94 int [32]
        n_models 9 int
+ mins {xyz={...} a1d=0x0e302e18 } vec3d
+ maxs {xyz={...} a1d=0x0e302e24 } vec3d
+ bounding_box 0x0e302e30 {xyz={...} a1d=0x0e302e30 } vec3d [8]
        num_lights 0 int
+ lights 0x00000000 {pos={...} type=??? value=??? } bsp_light *
        n_view_positions 0 int
+ view_positions 0x0e302e9c {parent=0 pnt={...} norm={...} } eye [10]
+ autocenter {xyz={...} a1d=0x0e302fb4 } vec3d
        rad 23.407776 float
        core_radius 11.088041 float
        n_textures 3 int
+ maps 0x0e302fcc {textures=0x0e302fcc is_ambient=false is_transparent=false } texture_map [64]
+ submodel 0x0e2b2000 {name=0x0e2b2000 "transport02c-cargo" movement_type=-1 movement_axis=-1 ...} bsp_info *
        n_guns 0 int
        n_missiles 0 int
        n_docks 1 int
        n_thrusters 0 int
+ gun_banks 0x00000000 {num_slots=??? pnt=0x00000004 norm=0x00000130 ...} w_bank *
+ missile_banks 0x00000000 {num_slots=??? pnt=0x00000004 norm=0x00000130 ...} w_bank *
+ docking_bays 0x0e1671f0 {num_slots=2 type_flags=1 num_spline_paths=1 ...} dock_bay *
+ thrusters 0x00000000 {num_points=??? points=??? wash_info_pointer=??? ...} thruster_bank *
+ ship_bay 0x0e0f9508 {num_paths=0 path_indexes=0x0e0f950c arrive_flags=0 ...} ship_bay *
+ shield {nverts=0 ntris=0 verts=0x00000000 ...} shield_info
+ shield_collision_tree 0x00000000 <Bad Ptr> unsigned char *
        sldc_size 0 int
        n_paths 1 int
+ paths 0x0e153b50 {name=0x0e153b50 "$path01" parent_name=0x0e153b70 "dock01-01" parent_submodel=-1 ...} model_path *
        mass 2774.7871 float
+ center_of_mass {xyz={...} a1d=0x0e304918 } vec3d
+ moment_of_inertia {vec={...} a2d=0x0e304924 a1d=0x0e304924 } matrix
+ octants 0x0e304948 {min={...} max={...} nverts=16 ...} model_octant [8]
        num_xc -1 int
+ xc 0x00000000 {z=??? radius=??? } cross_section *
        num_split_plane 0 int
+ split_plane 0x0e304a94 float [5]
+ ins 0x0e304aa8 {detail_level=0 num_faces=0 faces=0x0e304ab0 ...} insignia [6]
        num_ins 0 int
        ram_used 287213 int
        debug_info_size 188 int
+ debug_info 0x0e1c10b0 "Started with 388 vertices and 730 faces.
Ended with 382 vertices and 580 faces.
Texture splitting created 0 vertices and 0 faces.
Command line: BSPGEN cargo02.p3d
Scale factor: 0.025
" char *
        used_this_mission 2 int
        n_glow_point_banks 0 int
+ glow_point_banks 0x00000000 {type=??? glow_timestamp=??? on_time=??? ...} glow_point_bank *
        gun_submodel_rotation 0.00000000 float
        vertex_buffer_id 3 int


TagsNo tags attached.

Activities

FUBAR-BDHR

2013-02-01 08:55

developer  

2784.fs2 (4,923 bytes)

FUBAR-BDHR

2013-02-01 09:06

developer   ~0014676

Last edited: 2013-02-01 09:21

OK this is apparently not caused by the explosion effect and the ship both being at 0,0,0. I get the same issue with the explosion moved to 0,5,0.

Also get the issue with the ship moved to 0,1,0 so it's not due to being at 0,0,0 either. Moved the explosion to 1,5,1 and did not get the issue.

Wanderer

2013-11-06 19:00

developer   ~0015389

Fix committed to trunk@10018.

Related Changesets

fs2open: trunk r10018

2013-11-06 14:25

Wanderer


Ported: N/A

Details Diff
Fix for Mantis 0002784 Affected Issues
0002784
mod - /trunk/fs2_open/code/physics/physics.cpp Diff File

Issue History

Date Modified Username Field Change
2013-02-01 08:54 FUBAR-BDHR New Issue
2013-02-01 08:55 FUBAR-BDHR File Added: 2784.fs2
2013-02-01 09:06 FUBAR-BDHR Note Added: 0014676
2013-02-01 09:21 FUBAR-BDHR Note Edited: 0014676
2013-11-04 11:23 Wanderer Assigned To => Wanderer
2013-11-04 11:23 Wanderer Status new => assigned
2013-11-06 19:00 Wanderer Changeset attached => fs2open trunk r10018
2013-11-06 19:00 Wanderer Note Added: 0015389
2013-11-06 19:00 Wanderer Status assigned => resolved
2013-11-06 19:00 Wanderer Resolution open => fixed