View Issue Details

IDProjectCategoryView StatusLast Update
0000480FSSCPgameplaypublic2005-07-27 17:01
ReporterGoober5000 Assigned ToGoober5000  
PriorityhighSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Summary0000480: Various docking/support ship bugs
DescriptionI'm listing them all here so I don't forget about them. :)

1) Crash on warpout while support ship is docking
2) Support ship doesn't undock properly if it receives a new rearm goal while docked
3) A ship assigned to undock with another ship (e.g. a transport from a cruiser) won't undock if the other ship is moving
TagsNo tags attached.

Activities

Goober5000

2005-07-23 10:48

administrator   ~0002868

K, 1) is fixed and in CVS. This was actually down to something Volition forgot (aborting a dock when the docking goal is removed) that seldom became a problem until my docking code made it more apparent.

Goober5000

2005-07-23 15:18

administrator   ~0002869

I think I fixed 2) as well. This was caused by the support ship getting so many rearm requests that the active goal was overwritten.

Goober5000

2005-07-24 19:40

administrator   ~0002870

...And 3) is also fixed. The hardest one to track down. ;)

taylor

2005-07-26 07:34

administrator   ~0002878

Haven't had a chance to see how often this happens or exactly what the cause is but I got this when playing TBP after updating to the new dock/undock code. From ai_dock() it was a AIS_UNDOCK_3 mode and dockee (goal_objp) is invalid for some reason. Without testing too much it looks like (in ai_dock()) aip->active_goal is -1. I'm guessing that the first ai_cleanup_dock_mode_subjective() should have a return after it so that it won't continue through the function, but that's for you to figure out. :)


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496301376 (LWP 26258)]
0x000000000042ea42 in dock_orient_and_approach (docker_objp=0x25af0e0, docker_index=0, dockee_objp=0x253a500, dockee_index=0,
    dock_mode=5, docker_point_param=0x0, dockee_point_param=0x0, rotating_submodel_tangential_velocity=0x0) at ai/aicode.cpp:9585
9585 pm1 = model_get( sip1->modelnum );
(gdb) bt
#0 0x000000000042ea42 in dock_orient_and_approach (docker_objp=0x25af0e0, docker_index=0, dockee_objp=0x253a500, dockee_index=0,
    dock_mode=5, docker_point_param=0x0, dockee_point_param=0x0, rotating_submodel_tangential_velocity=0x0) at ai/aicode.cpp:9585
0000001 0x000000000043d0f1 in ai_dock () at ai/aicode.cpp:11375
0000002 0x000000000043d3d6 in ai_execute_behavior (aip=0x949bf0) at ai/aicode.cpp:13355
0000003 0x000000000043fe76 in ai_frame (objnum=878) at ai/aicode.cpp:14500
0000004 0x0000000000440055 in ai_process (obj=0x25af0e0, ai_index=11, frametime=0.00833129883) at ai/aicode.cpp:14579
0000005 0x0000000000680383 in ship_process_post (obj=0x25af0e0, frametime=0.00833129883) at ship/ship.cpp:6696
0000006 0x0000000000627e16 in obj_move_all_post (objp=0x25af0e0, frametime=0.00833129883) at object/object.cpp:1814
0000007 0x000000000062956f in obj_move_all (frametime=0.00833129883) at object/object.cpp:2026
0000008 0x000000000040fa07 in game_simulation_frame () at freespace2/freespace.cpp:5342
0000009 0x000000000041327e in game_frame (paused=0) at freespace2/freespace.cpp:5744
0000010 0x0000000000413856 in game_do_frame () at freespace2/freespace.cpp:6183
#11 0x0000000000414c57 in game_do_state (state=2) at freespace2/freespace.cpp:8019
0000012 0x000000000048b4e1 in gameseq_process_events () at gamesequence/gamesequence.cpp:657
0000013 0x0000000000416fe1 in WinMainSub (argc=5, argv=0x7fffffb12d88) at freespace2/freespace.cpp:8654
0000014 0x0000000000417031 in main (argc=5, argv=0x7fffffb12d88) at freespace2/freespace.cpp:8716

Goober5000

2005-07-27 13:33

administrator   ~0002880

That trace doesn't look like you updated to my new code. It has an old function header that I changed.

taylor

2005-07-27 14:04

administrator   ~0002882

It was at the 1.20 revision. ai_dock() wasn't changed in your updates since that rev. I think it's the 1.19 revision which has the problem (the missing "return;", if it is actually missing).

I updated to 1.22 so I'll try again to get the problem, added the "return;" though and haven't had it happen since.

Goober5000

2005-07-27 14:29

administrator   ~0002883

I'm not entirely sure that the "return" is needed, though. Maybe it is and I'm not just thinking straight.

Can you remove the "return" and play with it awhile? If the problem shows up again, I'll change it. :)

taylor

2005-07-27 14:53

administrator   ~0002884

Last edited: 2005-07-27 15:04

Trying it now without the return...

EDIT: Or maybe later today, got a call. :) And I do want to mention that after the ai_cleanup_dock_mode_subjective() call both aip->active_goal and aip->goal_objnum were still -1. If it's not supposed to return then there needs to be an additional check for that since it can't reliably contiune in the function of aip->gola_objnum is -1. (How about not having an ifelse but two if statements instead?)

And what is up with this:
int force_recreate = 0;(dockee_rotating_submodel >= 0) && ((dock_mode == DOA_APPROACH) || (dock_mode == DOA_UNDOCK_1));
around line 9665 (from the 1.21 update)? Is it actually supposed to be set to 0 or is that a mistake?

edited on: 07-27-05 11:04

Goober5000

2005-07-27 17:01

administrator   ~0002885

Okay, I changed some stuff around. Hopefully that'll fix it. ;)

Issue History

Date Modified Username Field Change
2005-07-22 02:17 Goober5000 New Issue
2005-07-23 10:48 Goober5000 Note Added: 0002868
2005-07-23 15:18 Goober5000 Note Added: 0002869
2005-07-24 19:40 Goober5000 Status assigned => resolved
2005-07-24 19:40 Goober5000 Resolution open => fixed
2005-07-24 19:40 Goober5000 Note Added: 0002870
2005-07-26 07:34 taylor Status resolved => feedback
2005-07-26 07:34 taylor Resolution fixed => reopened
2005-07-26 07:34 taylor Note Added: 0002878
2005-07-27 13:33 Goober5000 Note Added: 0002880
2005-07-27 14:04 taylor Note Added: 0002882
2005-07-27 14:29 Goober5000 Note Added: 0002883
2005-07-27 14:53 taylor Note Added: 0002884
2005-07-27 15:04 taylor Note Edited: 0002884
2005-07-27 17:01 Goober5000 Status feedback => resolved
2005-07-27 17:01 Goober5000 Resolution reopened => fixed
2005-07-27 17:01 Goober5000 Note Added: 0002885