View Issue Details

IDProjectCategoryView StatusLast Update
0000088FSSCPgameplaypublic2006-02-24 06:42
Reporterbottomfan Assigned Totaylor  
PrioritynormalSeveritycrashReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0000088: Assert: fl_abs(theta_goal.xyz.z) < 0.001f
DescriptionIn the mission where the colossus goes on the offensive against Koth. I got this, running:
01_20_2004_fs2_open_d.exe -htl -pcx32 -fps -noglow
Additional InformationAssert: fl_abs(theta_goal.xyz.z) < 0.001f
File: E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Math\VecMat.cpp
Line: 2539

Call stack:
------------------------------------------------------------------
    ai_turn_towards_vector() ai_path() ai_bay_emerge() ai_execute_behavior() ai_frame() ai_process() ship_process_post() obj_move_all_post() obj_move_all() game_simulation_frame() game_frame() game_do_frame() game_do_state() gameseq_process_events() WinMainSub()------------------------------------------------------------------
TagsNo tags attached.

Activities

2004-01-28 15:56

 

DBUG-Nils Larsson-D(01-28-04) T(16-10-45).txt (1,459 bytes)   
DBUGFILE Active: Nils Larsson 01/28/04 16:10:45
OS: Windows 2000 Debug, E:\FreeSpace 2\01_20_2004_fs2_open_d.exe
[movie.cpp,  36] About to play: E:\freespace 2\intro.avi
[movie.cpp,  40] MOVIE ERROR: Cant open movie file E:\freespace 2\intro.avi
[movie.cpp,  36] About to play: E:\freespace 2\intro.mve
[movie.cpp,  40] MOVIE ERROR: Cant open movie file E:\freespace 2\intro.mve
[2d.cpp,1069] About to init 102
[grd3dsetup.cpp,1028] Default:
[grd3dsetup.cpp,1029] nv4_disp.dll NVIDIA GeForce3 Ti 200
[grd3dsetup.cpp,1032] Chosen:
[grd3dsetup.cpp,1033] nv4_disp.dll NVIDIA GeForce3 Ti 200
[grd3dsetup.cpp, 979] Success aa 0
[grd3dsetup.cpp,1212] Depth buffer format 0, aaresult 0
[grd3dbmpman.cpp,  39] Setting max bitmap size 4096
[grd3dtexture.cpp,1252] Using large textures
[grd3dtexture.cpp,1256] Max textures: 4096 4096
[grd3dbmpman.cpp, 377] bm_pcx: Cant load cruisertile1-shine.pcx
[grd3dbmpman.cpp, 377] bm_pcx: Cant load TSoupLightTileB-shine.pcx
[grd3dbmpman.cpp, 377] bm_pcx: Cant load TSoupLightTileB-shine.pcx
[movie.cpp,  36] About to play: E:\freespace 2\colossus.avi
[movie.cpp,  40] MOVIE ERROR: Cant open movie file E:\freespace 2\colossus.avi
[grd3dbmpman.cpp, 377] bm_pcx: Cant load TSoupLightTileB-shine.pcx
[movie.cpp,  36] About to play: E:\freespace 2\colossus.avi
[movie.cpp,  40] MOVIE ERROR: Cant open movie file E:\freespace 2\colossus.avi
[grd3dbmpman.cpp, 377] bm_pcx: Cant load TSoupLightTileB-shine.pcx

RandomTiger

2004-02-26 00:14

developer   ~0000248

This happens a lot if you play through the missions on debug.
Not sure what causes it but someone should take a look.
If happens so much that rather than having an assert the game should handle it gracefully or possibly just ignore it.

This will get in the way of soak testing if we ever get that going.

Bobboau

2004-03-05 05:42

developer   ~0000295

maybe it should be replaced with a one time warning.

I get this thing constantly, or I did at one point, if we can't find why thihs is a problem maybe we should remove it, I think it was put in to make sure someone's code was produceing reliable results (ie, wasn't constantly pointing in a right angle)

RandomTiger

2004-03-05 20:54

developer   ~0000324

OK, I've compiled a debug exe of the original code.
It would be great if you could try to recreate this problem with this.
You will have to setup the game using the retail launcher.
Contact me if you have any problems.

http://www.randomtiger.pwp.blueyonder.co.uk/freespace/FS2orig.rar

kasperl

2004-03-05 20:56

developer   ~0000325

i am experiencing this too, and i will try and test that exe tommorow.

http://mgo.maxgaming.net/mantis/bug_view_page.php?bug_id=0000127

RandomTiger

2004-03-11 21:00

developer   ~0000415

Has anyone managed to try this in retail FS2 yet?

Goober5000

2004-03-12 02:44

administrator   ~0000421

Why is it all of a sudden showing up, though? Perhaps something we did recently triggered it?

RandomTiger

2004-03-12 09:02

developer   ~0000424

People are testing in debug more.
Its been around for a long while.
Thats why I want to know if it happens in a debug compile of the code before we started playing with it.

RandomTiger

2004-03-15 17:16

developer   ~0000460

Kasperl's report of it happening in "Slaying Ravana" seems fairly consistantly in fs2_open. Have not managed to replicate it in retail.

I will probably change this to a mprintf so it doesnt disrupt debug testing but the bug should stay open because something we have done has caused a change in the logic of the physics which could be hurting compatibility.

Anyone have any idea what this could relate to?

RandomTiger

2004-03-21 22:31

developer   ~0000526

Cannot replicate this in retail (debug compile of code as released by Daveb).
Changing to mprintf to make it silent.
Will investigate it further.

taylor

2004-09-26 19:49

administrator   ~0001265

Any progress on this? I had a similar theta_goal issue this weekend and changed the fl_* stuff to acutally use the float versions rather than double versions of the functions. Same with acos()->acosf() and the isnan((double)*theta) change in vm_matrix_to_rot_axis_and_angle(). Hasn't hit an assert yet but it could be conincidence. theta_goal.xyz.z tended to be "nan" whenever it caused problems.

Goober5000

2004-09-26 22:48

administrator   ~0001271

Last edited: 2004-09-26 22:48

Maybe you could try changing it back to Assert (or Error) and releasing a test build?

edited on: 09-26-04 18:48

taylor

2004-09-26 23:15

administrator   ~0001272

Those changes will be in a build I release next week (this week) but I don't know when exactly yet, Jeanne issues. Deffinitely not going to have time to do anything for most of the week and I'm trying to get as much FRED2 debugging done today as I can.

taylor

2004-10-12 04:31

administrator   ~0001298

This did end up happening agian to me after the changes. For those interested the problem seems to be in vm_matrix_to_rot_axis_and_angle() where *theta = PI in every case I've tested so far. "rot_axis" will, in most cases, be normalized twice but I don't know if that's a problem as this code is the same as the original source release. When it fails later on it's rot_axis.xyz.x which is NaN and that messes up theta_goal. The problem starts here in other words.

Goober5000

2004-10-12 04:59

administrator   ~0001299

Ugh.

Does this have anything to do with the following comment, at line 0000162:0001800 in aicode.cpp?

Dave Andsager: The non-indented lines here are debug code to help you track down the problem in the physics that is causing ships to inexplicably rotate very far. If you hit the Int3(), set the next statement to be the one marked "HERE". (Do this clicking the cursor there, then right clicking. Choose the right option.) This will allow you to rerun vm_forward_interpolate() with the values that caused the error. Note, you'll need to enable the Int3() about ten lines below.

taylor

2004-10-12 07:24

administrator   ~0001300

I was a bit vague, sorry. I was referring to the other and nearly identical theta_goal error in vm_matrix_interpolate() which will still hit an Assert(). The two appear to originate from the same base problem.

I haven't debugged it any further than this yet but that comment does seem to indicate the problem. I've started looking just at vm_forward_interpolate() since it happens more often and from both ships and (swarm) weapons. I've got a bad feeling that this thing is going to take a while to track down.

taylor

2004-10-14 09:09

administrator   ~0001302

Last edited: 2004-10-14 16:20

Think I've found the vm_matrix_to_rot_axis_and_angle() problem at least. I'd just been looking at it too long not to notice. Depending on case 0, 1 or 2 to setup x, y and z respectively it had this for case 1:

 iy = 1.0f / rot_axis->xyz.y;

 rot_axis->xyz.y = fl_sqrt(m->a2d[1][1] + 1.0f);
 rot_axis->xyz.x = m->a2d[1][0] * iy;
 rot_axis->xyz.z = m->a2d[1][2] * iy;

"iy" is calculated before rot_axis->xyz.y is ever defined so rot_axis->xyz.x will end up something like this: -8055736388938664867363032596551303168.000000.

This function is also used by OpenGL and may be why models will sometimes spontaneously flip around in the view for a single frame. Haven't tested this enough to figure out if this really fixes anything yet. This should prevent the NaN problem at least but I don't know if that was just hiding something else or not.

Hasn't helped vm_forward_interpolate() any though. Whenever that does happen in vm_forward_interpolate(), "desired_fvec" is within about 1/100,000th of being the complete reverse of "curr_orient.fvec".

EDIT: reverse being a negative/positive thing, ie:
     desired_fvec = { -0.397712, 0.508339, -0.763817 }
 curr_orient.fvec = { 0.397714, -0.508340, 0.763815 }

edited on: 10-14-04 12:20

administrator

2005-03-14 13:42

administrator   ~0001889

reassigning to taylor as it seems he's working on it.

taylor

2005-09-30 04:32

administrator   ~0003486

I still haven't made any progress on this but I did want to mention that I do see this in retail (the icculus.org version anyway, it's still close to retail) as well. It's deffinitely not a problem strictly with FS2_Open so I guess I'll have to come at this a different way since I thought it was related in part to SCP changes. There could be added frequency with regards to the missile code since that's where I see it 99.9% of the time in FSO so that's where I'm going to concentrate on fixing it.

taylor

2006-02-21 00:05

administrator   ~0004858

I'm not sure if I've actually managed to fix this or not, but I haven't been able to reproduce it in a while. If no one else can reproduce it in a current CVS either then I'll consider this resolved until it shows up again.

taylor

2006-02-24 06:42

administrator   ~0004921

Considering this fixed unless it can be replicated again.

Fixered.

Issue History

Date Modified Username Field Change
2004-01-28 15:56 bottomfan New Issue
2004-01-28 15:56 bottomfan File Added: DBUG-Nils Larsson-D(01-28-04) T(16-10-45).txt
2004-01-29 01:19 Sticks Category DirectX => gameplay
2004-02-26 00:14 RandomTiger Note Added: 0000248
2004-03-04 20:43 RandomTiger Status new => acknowledged
2004-03-05 05:42 Bobboau Note Added: 0000295
2004-03-05 20:54 RandomTiger Note Added: 0000324
2004-03-05 20:56 kasperl Note Added: 0000325
2004-03-09 14:55 RandomTiger Summary Assertion Failed! => Assert: fl_abs(theta_goal.xyz.z) < 0.001f
2004-03-11 21:00 RandomTiger Note Added: 0000415
2004-03-12 02:44 Goober5000 Note Added: 0000421
2004-03-12 09:02 RandomTiger Note Added: 0000424
2004-03-15 17:16 RandomTiger Note Added: 0000460
2004-03-21 22:31 RandomTiger Note Added: 0000526
2004-03-22 22:39 RandomTiger Status acknowledged => assigned
2004-03-22 22:39 RandomTiger Assigned To => RandomTiger
2004-09-26 19:49 taylor Note Added: 0001265
2004-09-26 22:48 Goober5000 Note Added: 0001271
2004-09-26 22:48 Goober5000 Note Edited: 0001271
2004-09-26 23:15 taylor Note Added: 0001272
2004-10-12 04:31 taylor Note Added: 0001298
2004-10-12 04:59 Goober5000 Note Added: 0001299
2004-10-12 07:24 taylor Note Added: 0001300
2004-10-14 09:09 taylor Note Added: 0001302
2004-10-14 16:20 taylor Note Edited: 0001302
2005-03-14 13:42 administrator Note Added: 0001889
2005-03-14 13:42 administrator Assigned To RandomTiger => taylor
2005-09-30 04:32 taylor Note Added: 0003486
2006-02-21 00:05 taylor Note Added: 0004858
2006-02-24 06:42 taylor Status assigned => resolved
2006-02-24 06:42 taylor Resolution open => fixed
2006-02-24 06:42 taylor Note Added: 0004921