View Issue Details

IDProjectCategoryView StatusLast Update
0001977FSSCP---------public2009-09-06 08:30
ReporterFUBAR-BDHR Assigned ToWanderer  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.6.11 
Summary0001977: Assert: vm_vec_mag(plane_normal) > 0.999f && vm_vec_mag(plane_normal) < 1.001f
DescriptionCrash on the MediaVP standalone. No idea what this one even means. Call stack and other info:

Assert: vm_vec_mag(plane_normal) > 0.999f && vm_vec_mag(plane_normal) < 1.001f
File: vecmat.cpp
Line: 104

ϐ|ƒ¢‘|Ò! KiFastSystemCallRet
ø¸! WaitForSingleObject + 18 bytes
ø¸! SCP_DumpStack + 260 bytes
ø¸! WinAssert + 208 bytes
ø¸! vm_project_point_onto_plane + 104 bytes
ø¸! fvi_sphere_plane + 281 bytes
ø¸! mc_check_sphereline_face + 127 bytes
ø¸! mc_shield_check_common + 502 bytes
ø¸! mc_check_sldc + 391 bytes
ø¸! mc_check_sldc + 262 bytes
ø¸! mc_check_sldc + 262 bytes
ø¸! mc_check_sldc + 286 bytes
ø¸! mc_check_sldc + 262 bytes
ø¸! mc_check_sldc + 262 bytes
ø¸! mc_check_sldc + 262 bytes
ø¸! mc_check_sldc + 286 bytes
ø¸! mc_check_shield + 70 bytes
ø¸! mc_check_subobj + 425 bytes
ø¸! model_collide + 993 bytes
ø¸! beam_collide_ship + 1047 bytes
ø¸! obj_check_all_collisions + 219 bytes
ø¸! obj_move_all + 476 bytes
ø¸! game_simulation_frame + 1059 bytes
ø¸! game_frame + 491 bytes
ø¸! game_do_frame + 237 bytes
ø¸! game_do_state + 379 bytes
ø¸! gameseq_process_events + 237 bytes
ø¸! game_main + 728 bytes
ø¸! WinMain + 366 bytes
ø¸! __tmainCRTStartup + 358 bytes
ø¸! WinMainCRTStartup + 15 bytes
ø¸! RegisterWaitForInputIdle + 73 bytes


     fs2_open_3_6_11d.exe!debug_int3(char * file=0x00dd1b84, int line=897) Line 760 C++
     fs2_open_3_6_11d.exe!WinAssert(char * text=0x00dd0b00, char * filename=0x00dd0a76, int linenum=104) Line 897 + 0x13 bytes C++
> fs2_open_3_6_11d.exe!vm_project_point_onto_plane(vec3d * new_point=0x0012df50, vec3d * point=0x0012dd78, vec3d * plane_normal=0x02e4e4cc, vec3d * plane_point=0x03b8a15c) Line 104 + 0x4a bytes C++
     fs2_open_3_6_11d.exe!fvi_sphere_plane(vec3d * intersect_point=0x0012df50, vec3d * sphere_center_start=0x01fe23dc, vec3d * sphere_velocity=0x01fe23e8, float sphere_radius=8.2500000, vec3d * plane_normal=0x02e4e4cc, vec3d * plane_point=0x03b8a15c, float * hit_time=0x0012df20, float * crossing_time=0x0012df2c) Line 567 + 0x15 bytes C++
     fs2_open_3_6_11d.exe!mc_check_sphereline_face(int nv=3, vec3d * * verts=0x0012e090, vec3d * plane_pnt=0x03b8a15c, float face_rad=10000.000, vec3d * plane_norm=0x02e4e4cc, uv_pair * uvl_list=0x00000000, int ntmap=0, unsigned char * poly=0x00000000) Line 200 + 0x30 bytes C++
     fs2_open_3_6_11d.exe!mc_shield_check_common(shield_tri * tri=0x02e4e4b0) Line 561 + 0x26 bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3441) Line 617 + 0x9 bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3404) Line 607 + 0xe bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3367) Line 607 + 0xe bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3219) Line 607 + 0x26 bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3182) Line 607 + 0xe bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3145) Line 607 + 0xe bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=3108) Line 607 + 0xe bytes C++
     fs2_open_3_6_11d.exe!mc_check_sldc(int offset=0) Line 607 + 0x26 bytes C++
     fs2_open_3_6_11d.exe!mc_check_shield() Line 636 + 0x7 bytes C++
     fs2_open_3_6_11d.exe!mc_check_subobj(int mn=8) Line 705 C++
     fs2_open_3_6_11d.exe!model_collide(mc_info * mc_info=0x0012f0a8) Line 874 + 0xe bytes C++
     fs2_open_3_6_11d.exe!beam_collide_ship(obj_pair * pair=0x02f1b21c) Line 2383 + 0x1b bytes C++
     fs2_open_3_6_11d.exe!obj_check_all_collisions() Line 524 + 0xe bytes C++
     fs2_open_3_6_11d.exe!obj_move_all(float frametime=0.033996582) Line 1451 C++
     fs2_open_3_6_11d.exe!game_simulation_frame() Line 4266 + 0xf bytes C++
     fs2_open_3_6_11d.exe!game_frame(int paused=0) Line 4693 C++
     fs2_open_3_6_11d.exe!game_do_frame() Line 5121 + 0x7 bytes C++
     fs2_open_3_6_11d.exe!game_do_state(int state=2) Line 6892 C++
     fs2_open_3_6_11d.exe!gameseq_process_events() Line 405 + 0x14 bytes C++
     fs2_open_3_6_11d.exe!game_main(char * cmdline=0x00151f1b) Line 7453 + 0x5 bytes C++
     fs2_open_3_6_11d.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * hPrev=0x00000000, char * szCmdLine=0x00151f1b, int nCmdShow=1) Line 7527 + 0x9 bytes C++
     fs2_open_3_6_11d.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
     fs2_open_3_6_11d.exe!WinMainCRTStartup() Line 182 C
     kernel32.dll!7c817067()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]


        D -1.0737418e+008 float
        dist -1.0737418e+008 float
- new_point 0x0012df50 {xyz={...} a1d=0x0012df50 } vec3d *
+ xyz {x=-1.0737418e+008 y=-1.0737418e+008 z=-1.0737418e+008 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0012df50 float [3]
- plane_normal 0x02e4e4cc {xyz={...} a1d=0x02e4e4cc } vec3d *
+ xyz {x=0.84049338 y=0.21195002 z=0.22644664 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x02e4e4cc float [3]
- plane_point 0x03b8a15c {xyz={...} a1d=0x03b8a15c } vec3d *
+ xyz {x=9.9312296 y=-1.1787900 z=-2.4630499 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x03b8a15c float [3]
- point 0x0012dd78 {xyz={...} a1d=0x0012dd78 } vec3d *
+ xyz {x=16.245958 y=61.201042 z=-47.855179 } vec3d::<unnamed-tag>::<unnamed-type-xyz>
+ a1d 0x0012dd78 float [3]

Additional Information3.6.11 r5520

I will leave the debugger up for awhile so if more info is needed let me know.
TagsNo tags attached.

Activities

Wanderer

2009-08-19 17:22

developer   ~0011138

Not sure if we should call this model or code related... Presumably this is a model issue but one which the could should imo catch and fix

taylor

2009-08-19 19:50

administrator   ~0011140

The error indicates that a normal vector isn't properly normalized. This could be a model issue, where it isn't a normalized vector, or it could be just a code problem due to precision loss in reading the model data. Judging by the fact that the values for the normal you provided isn't close to unit length then I would guess that it was technically a model problem.

A code change would really be the proper way to address this however, with the normal in question being passed through vm_vec_normalize_safe() right after reading it from the model during parse.

Wanderer

2009-08-22 10:33

developer   ~0011147

I added there a bunch of vm_vec_normalize_safe functions. If there are no adverse effects this should now be fixed in trunk

Wanderer

2009-09-06 08:30

developer   ~0011172

Assumed fixed - reopen if necessary.

Issue History

Date Modified Username Field Change
2009-08-18 22:20 FUBAR-BDHR New Issue
2009-08-19 17:22 Wanderer Note Added: 0011138
2009-08-19 19:50 taylor Note Added: 0011140
2009-08-22 10:33 Wanderer Note Added: 0011147
2009-08-23 09:43 Wanderer Status new => feedback
2009-09-06 08:30 Wanderer Status feedback => resolved
2009-09-06 08:30 Wanderer Resolution open => fixed
2009-09-06 08:30 Wanderer Assigned To => Wanderer
2009-09-06 08:30 Wanderer Note Added: 0011172