View Issue Details

IDProjectCategoryView StatusLast Update
0003890Spring engineUnit Scriptingpublic2013-08-01 03:31
ReporterFLOZi Assigned Toabma  
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Target Version95.0 
Summary0003890: Unloaded units fly across the map (S44)
DescriptionInfantry units fly across the map when unloaded from trucks. Happens in 94 but not 93.

May take a few attempts to reproduce.
Steps To ReproduceRun S44 through Spring.exe on Moro River map (also other maps)

/cheat /give geropelblitz

Load infantry squad into the truck.

Unload either single click or area

Watch poor dudes fly.
Additional InformationDemo is from 94.0 with S44 SVN rev 3829

http://sourceforge.net/p/spring1944/code/3829/

That revision did seem to reduce incidence but not remove.
TagsNo tags attached.
Attached Files
20130720_124503_1944_Moro_River_V1_94.sdf (Attachment missing)
20130723_142441_1944_Moro_River_V1_94.sdf (Attachment missing)
20130723_160455_1944_Moro_River_V1_94.1.1-693-g5717870 develop.sdf (Attachment missing)
20130723_203426_Greener_Fields no wind_94.1.1-730-g1852c22 develop.sdf (Attachment missing)
sliding_box_and_angry_transport.gif (Attachment missing)
mantis3890.diff (Attachment missing)
Checked infolog.txt for Errors

Activities

PepeAmpere

2013-07-20 20:37

reporter   ~0011035

true, oh i thought its reported here long ago :) otherwise i would do it, too. thx flozi

user744

2013-07-20 21:36

  ~0011036

copied from http://springrts.com/phpbb/viewtopic.php?f=75&t=30007&p=544588#p544588

xta has similiar problem, when unloading com from sea transport it can bounce around the map. should be http://replays.springrts.com/replay/e2a ... 82fa89bc1/
watch my commander:
4min right side of map
7:25 again
12:10 again
(several times inbetween, other players coms too. Seems to happen if you load from sloped terrain into water?)

But some transport bugs were fixed , so wanted to try again in testversion. Or try to use MoveCtrl hold unit in place/set speed to zero if want to fix modside.
--
That coms can only be (un)loaded in water is bug itself in 94.1, maybe fixed together with
http://springrts.com/mantis/view.php?id=3617 ?

yuritch

2013-07-21 17:47

reporter   ~0011041

wrt test version: bug still happens with 94.1.1-693-g5717870 and same S44 svn revision.

cleanrock

2013-07-23 13:49

reporter   ~0011050

I tried to reproduce this in both XTA and 1944 but i only seen it maybe once or twice in 1944 (i tried many times).
Please come up with a solid way to reproduce this in last released XTA and 1944 in spring develop or 94.1.
I dont think this need to be on 95 roadmap since its so seldom it happen (at least for me).

btw, both the mentioned demos above dont run in 94.1.

FLOZi

2013-07-23 15:28

reporter   ~0011051

Last edited: 2013-07-23 15:28

Uploaded a new replay;

Engine: 94.1
Map: 1944 Moro River v1 ( http://springfiles.com/spring/spring-maps/1944mororiverv1 )
Game: S44 Operation Most III ( http://spring1944.net/files/Build/S44v162_MostIII.sdz )

Replay shows both single click and area unload.

Happens 9/10 times for me on Moro River.

cleanrock

2013-07-23 15:29

reporter   ~0011052

flozi,
Error: Spring: Fatal Error (general) Demofile corrupt or created by a different version of Spring: /home/johanr/tmp/20130723_142441_1944_Moro_River_V1_94.sdf

FLOZi

2013-07-23 16:01

reporter   ~0011055

[14:59:23] <BrainDamage@IRC> 94 / 94.1 have replays incompatible between win & linux due to pointer size bug

:(

FLOZi

2013-07-23 17:07

reporter   ~0011058

Last edited: 2013-07-23 17:44

If at first you don't succeed;

Engine: http://springrts.com/dl/buildbot/default/develop/94.1.1-693-g5717870/win32/

Map & Game as before.

edit: Also I was incorrect earlier; bug is present in 93.0 also

edit2: Infact it is present in http://springrts.com/dl/buildbot/default/develop/91.0.1-757-gd8ba840/win32/ which is the earliest working build still in that dir, 91.0 does *not* exhibit the bug

abma

2013-07-23 20:43

administrator   ~0011062

happens in BA too: just build an transport load unit, unload unit, then maybe 10% of units fly away. so to reproduce: build 100 units to load, enough transports (hover or air doesn't matter) and unload them.

sometimes a transport loaded with a unit "drifts" away, too.

abma

2013-07-23 20:47

administrator   ~0011063

my guess what the cause is:

it looks like units are unloaded from the trans slightly above or below the ground, and then they get some impulse and fly away because nothing seems to slow them down.

add some air drag constant to all units? (and get a nice physic simulation?)
also units seems to be immune to gravitiy / ground rubbing.

abma

2013-07-23 20:48

administrator   ~0011064

maybe is the height where the unloaded unit is created inaccurate?

abma

2013-07-23 21:17

administrator   ~0011065

save way to reproduce in ba:

/give 20 armthovr
/give 100 armpw

load...unload... flyyyyyy awaaay :)

azaremoth

2013-07-23 23:09

reporter   ~0011066

I have seen this bug also for the cursed, when units were released from bunkers. After releasing units from a transport points slightly above the ground and doubling unit masses, the bug disappeared/appeared very seldom.

FLOZi

2013-07-24 13:58

reporter   ~0011067

My concern is that it wasn't present *at all* in 91.0. I don't want to mess around with unit masses as they are set up with a purpose in mind already.

I've tried moving the transport point in the model and yuritch tried setting it in the script and neither seemed to have much impact.

user744

2013-07-24 19:00

  ~0011068

Last edited: 2013-07-24 19:00

It does not always happen, but here is how to easier reproduce it:
1 pause game
2 set transport to "repeat:on"
3 give area load order
4 shift-que area unload order, to same area as load
5 unpause, watch transport pick up&put down until the passenger eventually flies away
Will attach a replay when I get home.

cleanrock

2013-07-24 19:22

reporter   ~0011069

Last edited: 2013-07-24 19:28

I was first unable to reproduce this with abmas recipe but I found a very solid way to reproduce it:
Put units to be picked up on patrol around transports.
Load em while they run around transports, unload em and you will see most will fly away, works in both BA and 1944.

Looks like some unit states are not cleared when they are picked up.

This code is rather unknown to me, best would be if kloot or jk takes a look at this. I will probably continue to look at it just to understand the code though.

abma

2013-07-24 19:45

administrator   ~0011070

indeed, picking up already moving units seems to trigger the bug much more often. also it seems the speed the unit has at the pickup time influences the speed it has after unloading...

abma

2013-07-25 03:15

administrator   ~0011071

this fixed it for me:

https://gist.github.com/abma/6076088

but i have no clue if i did it the right way :-|

abma

2013-07-25 03:20

administrator   ~0011072

awww, edit: no, doesn't fully work. unit now just fully stops before it is loaded, but maybe moves at unload again. i had a different fix before where

unit->speed = ZeroVector;

was set on unload, but this looks unclean to me. i'm a spring-sim-noob :-|

Google_Frog

2013-07-28 06:33

reporter   ~0011099

"add some air drag constant to all units? (and get a nice physic simulation?)"

Please not this. We do not need any more hardcoded special behaviour which is impossible to workaround. Especially if it is just to workaround some newly introduced bug. Games which want airdrag can add it easily and games which don't want airdrag don't want the overhead.

FLOZi

2013-07-31 20:22

reporter   ~0011121

Tried adding this in UnitUnloaded:

DelayCall(Spring.SetUnitVelocity, {unitID, 0, 0, 0}, 16)

They do pause after half a second but then continue to fly away, so it looks like more than just velocity is at fault?

abma

2013-07-31 22:40

administrator   ~0011122

Last edited: 2013-07-31 22:40

created a widget to test further:

https://gist.github.com/abma/6125933

-> load a moving peewee (velocity is ~ 2.7) into a trans,
-> velocity is still ~ 2.7 but the trans is not moving!

Kloot

2013-08-01 03:19

developer   ~0011124

patched (22+ posts on a simple issue like this...)

Issue History

Date Modified Username Field Change
2013-07-20 14:11 FLOZi New Issue
2013-07-20 14:11 FLOZi File Added: 20130720_124503_1944_Moro_River_V1_94.sdf
2013-07-20 20:37 PepeAmpere Note Added: 0011035
2013-07-20 21:36 user744 Note Added: 0011036
2013-07-21 17:47 yuritch Note Added: 0011041
2013-07-23 02:11 abma Product Version 94.1 => 94.1.1+git
2013-07-23 02:11 abma Target Version => 95.0
2013-07-23 13:49 cleanrock Note Added: 0011050
2013-07-23 15:26 FLOZi File Added: 20130723_142441_1944_Moro_River_V1_94.sdf
2013-07-23 15:28 FLOZi Note Added: 0011051
2013-07-23 15:28 FLOZi Note Edited: 0011051
2013-07-23 15:29 cleanrock Note Added: 0011052
2013-07-23 16:01 FLOZi Note Added: 0011055
2013-07-23 17:07 FLOZi Note Added: 0011058
2013-07-23 17:08 FLOZi File Added: 20130723_160455_1944_Moro_River_V1_94.1.1-693-g5717870 develop.sdf
2013-07-23 17:29 FLOZi Note Edited: 0011058
2013-07-23 17:36 FLOZi Note Edited: 0011058
2013-07-23 17:44 FLOZi Note Edited: 0011058
2013-07-23 20:43 abma Note Added: 0011062
2013-07-23 20:44 abma File Added: 20130723_203426_Greener_Fields no wind_94.1.1-730-g1852c22 develop.sdf
2013-07-23 20:47 abma Note Added: 0011063
2013-07-23 20:48 abma Note Added: 0011064
2013-07-23 21:17 abma Note Added: 0011065
2013-07-23 23:09 azaremoth Note Added: 0011066
2013-07-24 13:58 FLOZi Note Added: 0011067
2013-07-24 19:00 user744 Note Added: 0011068
2013-07-24 19:00 user744 Note Edited: 0011068
2013-07-24 19:22 cleanrock Note Added: 0011069
2013-07-24 19:28 cleanrock Note Edited: 0011069
2013-07-24 19:45 abma Note Added: 0011070
2013-07-25 03:15 abma Note Added: 0011071
2013-07-25 03:20 abma Note Added: 0011072
2013-07-28 06:08 PepeAmpere File Added: sliding_box_and_angry_transport.gif
2013-07-28 06:33 Google_Frog Note Added: 0011099
2013-07-31 20:22 FLOZi Note Added: 0011121
2013-07-31 22:40 abma Note Added: 0011122
2013-07-31 22:40 abma Note Edited: 0011122
2013-08-01 02:59 Kloot File Added: mantis3890.diff
2013-08-01 03:19 Kloot Note Added: 0011124
2013-08-01 03:31 abma Changeset attached => spring develop 29ba410a
2013-08-01 03:31 abma Assigned To => abma
2013-08-01 03:31 abma Status new => resolved
2013-08-01 03:31 abma Resolution open => fixed