2025-07-23 10:45 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003347Spring engineGeneralpublic2012-12-05 20:52
Reporterabma 
Assigned Tocleanrock 
PrioritynormalSeveritycrashReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0003347: assertion failed in HoverAirMoveType.cpp:122
Description
spring-headless: /home/buildbot/slave/full-linux/build/rts/Sim/MoveTypes/HoverAirMoveType.cpp:122: virtual void CHoverAirMoveType::SetState(AAirMoveType::AircraftState): Assertion `aircraftState != AIRCRAFT_CRASHING || newState == AIRCRAFT_CRASHING' failed.
Steps To Reproduce#0 0x00007f0e0819d925 in raise () from /lib64/libc.so.6
The program being debugged is not being run.
#0 0x00007f0e0819d925 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007f0e0819f0d8 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00007f0e081966a2 in __assert_fail_base () from /lib64/libc.so.6
No symbol table info available.
0000003 0x00007f0e08196752 in __assert_fail () from /lib64/libc.so.6
No symbol table info available.
0000004 0x0000000000a0c3c5 in CHoverAirMoveType::SetState (this=0x10b73cb0, newState=AAirMoveType::AIRCRAFT_FLYING) at /home/buildbot/slave/full-linux/build/rts/Sim/MoveTypes/HoverAirMoveType.cpp:122
        __PRETTY_FUNCTION__ = "virtual void CHoverAirMoveType::SetState(AAirMoveType::AircraftState)"
0000005 0x0000000000a0c9b9 in CHoverAirMoveType::KeepPointingTo (this=0x10b73cb0, pos=..., distance=300, aggressive=true) at /home/buildbot/slave/full-linux/build/rts/Sim/MoveTypes/HoverAirMoveType.cpp:241
No locals.
#6 0x0000000000af0047 in CMobileCAI::ExecuteAttack (this=0x10b73fc0, c=...) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/MobileCAI.cpp:787
        canChaseTarget = true
        targetBehind = false
        tryTargetRotate = true
        tryTargetHeading = true
        edgeFactor = 0
        targetMidPosVec = {static binder = {class_ = 0x1f85f60, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3f1c0, name = 0x11e5e7b "float3", size = 12, constructor = 0xc1f27a <float3::_ConstructInstance(void*)>, destructor = 0xc1f2a6 <float3::_DestructInstance(void*)>, nextBinder = 0x1a3f160}, static memberRegistrator = 0x1a3f280, static CMP_EPS = 9.99999975e-05, static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 4095, static maxzpos = 4095, {{x = -231.52124, y = 62.0325928, z = -104.423828}, {r = -231.52124, g = 62.0325928, b = -104.423828}, {x1 = -231.52124, y1 = 62.0325928, x2 = -104.423828}, {s = -231.52124, t = 62.0325928, p = -104.423828}, {xstart = -231.52124, ystart = 62.0325928, xend = -104.423828}}}
        targetGoalDist = 407.821411
        targetPosDist = 3696.18164
        minPointingDist = 315
        targetMidPosDist2D = 253.98114
        __PRETTY_FUNCTION__ = "virtual void CMobileCAI::ExecuteAttack(Command&)"
#7 0x0000000000ade5c5 in CCommandAI::SlowUpdate (this=0x10b73fc0) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/CommandAI.cpp:1325
        c = @0x10b74328: {static binder = {class_ = 0x1f872a0, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a33040, name = 0x11bf765 "Command", size = 56, constructor = 0xad72e6 <Command::_ConstructInstance(void*)>, destructor = 0xad733e <Command::_DestructInstance(void*)>, nextBinder = 0x1a32ec0}, static memberRegistrator = 0x1a33158, aiCommandId = -1, options = 0 '\000', params = {<std::vector<float, std::allocator<float> >> = std::vector of length 1, capacity 1 = {5889}, static binder = {class_ = 0x1f86120, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3d820, name = 0x11df459 "safe_vector<float>", size = 32, constructor = 0xbf5746 <safe_vector<float>::_ConstructInstance(void*)>, destructor = 0xbf579e <safe_vector<float>::_DestructInstance(void*)>, nextBinder = 0x1a3d2a0}, static memberRegistrator = 0x0, showError = true}, tag = 23, timeOut = 2147483647, id = 20}
#8 0x0000000000aed411 in CMobileCAI::Execute (this=0x10b73fc0) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/MobileCAI.cpp:413
        c = @0x10b74328: {static binder = {class_ = 0x1f872a0, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a33040, name = 0x11bf765 "Command", size = 56, constructor = 0xad72e6 <Command::_ConstructInstance(void*)>, destructor = 0xad733e <Command::_DestructInstance(void*)>, nextBinder = 0x1a32ec0}, static memberRegistrator = 0x1a33158, aiCommandId = -1, options = 0 '\000', params = {<std::vector<float, std::allocator<float> >> = std::vector of length 1, capacity 1 = {5889}, static binder = {class_ = 0x1f86120, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3d820, name = 0x11df459 "safe_vector<float>", size = 32, constructor = 0xbf5746 <safe_vector<float>::_ConstructInstance(void*)>, destructor = 0xbf579e <safe_vector<float>::_DestructInstance(void*)>, nextBinder = 0x1a3d2a0}, static memberRegistrator = 0x0, showError = true}, tag = 23, timeOut = 2147483647, id = 20}
#9 0x0000000000aed2c2 in CMobileCAI::SlowUpdate (this=0x10b73fc0) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/MobileCAI.cpp:396
No locals.
0000010 0x0000000000adc0ee in CCommandAI::GiveAllowedCommand (this=0x10b73fc0, c=..., fromSynced=true) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/CommandAI.cpp:830
        __PRETTY_FUNCTION__ = "void CCommandAI::GiveAllowedCommand(const Command&, bool)"
        first = false
#11 0x0000000000aecbd2 in CMobileCAI::GiveCommandReal (this=0x10b73fc0, c=..., fromSynced=false) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/MobileCAI.cpp:279
No locals.
0000012 0x0000000000adb109 in CCommandAI::GiveCommand (this=0x10b73fc0, c=..., fromSynced=false) at /home/buildbot/slave/full-linux/build/rts/Sim/Units/CommandAI/CommandAI.cpp:588
No locals.
0000013 0x00000000005df3b8 in CSelectedUnits::AiOrder (this=0x19f0f20, unitid=26570, c=..., playerId=1) at /home/buildbot/slave/full-linux/build/rts/Game/SelectedUnits.cpp:627
        unit = 0x10b72960
        player = 0x21502b0
0000014 0x00000000005c96e2 in CGame::ClientReadNet (this=0x21884d0) at /home/buildbot/slave/full-linux/build/rts/Game/NetCommands.cpp:547
        pckt = {pckt = {px = 0xcc1fd00, pn = {pi_ = 0xdb91f50}}, pos = 16}
        psize = 16
        cmd_id = 20
        c = {static binder = {class_ = 0x1f872a0, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a33040, name = 0x11bf765 "Command", size = 56, constructor = 0xad72e6 <Command::_ConstructInstance(void*)>, destructor = 0xad733e <Command::_DestructInstance(void*)>, nextBinder = 0x1a32ec0}, static memberRegistrator = 0x1a33158, aiCommandId = -1, options = 0 '\000', params = {<std::vector<float, std::allocator<float> >> = std::vector of length 1, capacity 1 = {5889}, static binder = {class_ = 0x1f86120, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3d820, name = 0x11df459 "safe_vector<float>", size = 32, constructor = 0xbf5746 <safe_vector<float>::_ConstructInstance(void*)>, destructor = 0xbf579e <safe_vector<float>::_DestructInstance(void*)>, nextBinder = 0x1a3d2a0}, static memberRegistrator = 0x0, showError = true}, tag = 0, timeOut = 2147483647, id = 20}
        player = 1 '\001'
        aiID = 0 '\000'
        unitid = 26570
        cmd_opt = 0 '\000'
        msgProcTimeSpent = 7
        dataLength = 16
        allowMsgProcessing = true
        inbuf = 0xff400f0 "\016\020"
        packetCode = 14 '\016'
        packet = {px = 0xcc1fd00, pn = {pi_ = 0xdb91f50}}
        msgProcStartTime = {_vptr.spring_time = 0x11daf60, static binder = {class_ = 0x1f86200, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3d080, name = 0x11daf08 "spring_time", size = 16, constructor = 0xbdf2be <spring_time::_ConstructInstance(void*)>, destructor = 0xbdf2ea <spring_time::_DestructInstance(void*)>, nextBinder = 0x1a3c600}, static memberRegistrator = 0x1a3d100, x = 83750}
        simDrawRatio = 2.26120114
        __PRETTY_FUNCTION__ = "void CGame::ClientReadNet()"
        maxSimFPS = 191.553757
        minDrawFPS = 84.7132721
        msgProcTimeLimit = 10.0338459
#15 0x000000000054212a in CGame::Update (this=0x21884d0) at /home/buildbot/slave/full-linux/build/rts/Game/Game.cpp:900
        timeNow = {_vptr.spring_time = 0x11daf60, static binder = {class_ = 0x1f86200, base = 0x0, flags = creg::CF_None, memberRegistrator = 0x1a3d080, name = 0x11daf08 "spring_time", size = 16, constructor = 0xbdf2be <spring_time::_ConstructInstance(void*)>, destructor = 0xbdf2ea <spring_time::_DestructInstance(void*)>, nextBinder = 0x1a3c600}, static memberRegistrator = 0x1a3d100, x = 83750}
        diffsecs = 0.248999998
#16 0x0000000000bfe898 in GML::UpdateSim (ac=0x21884d0) at /home/buildbot/slave/full-linux/build/rts/lib/gml/gml_base.h:43
No locals.
#17 0x0000000000bfb8cc in SpringApp::Update (this=0x7fffc59c9ef0) at /home/buildbot/slave/full-linux/build/rts/System/SpringApp.cpp:1009
        ret = 1
#18 0x0000000000bfba88 in SpringApp::Run (this=0x7fffc59c9ef0, argc=2, argv=0x7fffc59ca0a8) at /home/buildbot/slave/full-linux/build/rts/System/SpringApp.cpp:1094
No locals.
#19 0x0000000000bd9e44 in Run (argc=2, argv=0x7fffc59ca0a8) at /home/buildbot/slave/full-linux/build/rts/System/Main.cpp:62
        app = {cmdline = 0x1f856b0, binaryName = "/tmp/spring/tests/usr/local/bin/spring-headless"}
        ret = -1
        err = 0x0
0000020 0x0000000000bda2fa in main (argc=2, argv=0x7fffc59ca0a8) at /home/buildbot/slave/full-linux/build/rts/System/Main.cpp:130
No locals.
Additional Informationhttp://buildbot.springrts.com/builders/validationtests/builds/2020/steps/validation%20test_2/logs/stdio
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
related to 0003340resolvedabma assertion failed: CHoverAirMoveType::SetState(AAirMoveType::AircraftState): Assertion `aircraftState != AIRCRAFT_CRASHING 
+Relationships

-Notes

~0009430

cleanrock (reporter)

I assume we should also return in CHoverAirMoveType::KeepPointingTo if aircraftState == AAirMoveType::AIRCRAFT_CRASHING, we dont do that now.

Also, we have code in LuaSyncedCtrl::SetUnitCrashing which is in conflict with our asserts:
if (!wantCrash && (aircraftState == AAirMoveType::AIRCRAFT_CRASHING))
    amt->SetState(AAirMoveType::AIRCRAFT_FLYING);

If this SetState is executed we will assert.

~0009442

abma (administrator)

backlink: http://springrts.com/phpbb/viewtopic.php?p=532787#p532787 (with hopefully some feedback soon)

~0009444

user744

since it seems feedback on this is wanted?
<cleanrock> question to game makers: does it raelly make sense to be able to call Spring.SetUnitCrashing(unitID, false) ...
<cleanrock> i.e. make a crashing aircraft flying again

If in doubt more things = better! :)
One use could be a weapon that temporally makes a plane lose control (start crashing) but after some time the pilot recovers and stabilizes the aircraft. (cancel crashing)
Kind of like EMP/paralyze but for aircraft. (paralyze on aircraft looks stupid since they just hang in the air)
That is an example, I have no need for it atm.

But on other hand I found engines aircraft crashing generally to be not so good (nothing to control path, unit not animated etc) so I started making a lua-crashing aircraft.

~0009468

cleanrock (reporter)

fixed in https://github.com/spring/spring/commit/ec31d1978edd0c7e089815485225dea569e06cc5

I agree that it should be possible to go from crashing to flying but it will have to happen later.
+Notes

-Issue History
Date Modified Username Field Change
2012-11-30 12:29 abma New Issue
2012-12-02 07:39 cleanrock Relationship added related to 0003340
2012-12-02 08:08 cleanrock Note Added: 0009430
2012-12-02 09:42 cleanrock Assigned To => jK
2012-12-02 09:42 cleanrock Status new => assigned
2012-12-02 15:19 jK Status assigned => resolved
2012-12-02 15:19 jK Resolution open => fixed
2012-12-02 15:40 jK Assigned To jK =>
2012-12-02 15:40 jK Status resolved => feedback
2012-12-02 15:40 jK Resolution fixed => reopened
2012-12-02 16:00 cleanrock Assigned To => cleanrock
2012-12-02 16:00 cleanrock Status feedback => assigned
2012-12-04 01:33 abma Note Added: 0009442
2012-12-04 07:54 user744 Note Added: 0009444
2012-12-05 20:52 cleanrock Note Added: 0009468
2012-12-05 20:52 cleanrock Status assigned => resolved
2012-12-05 20:52 cleanrock Resolution reopened => fixed
+Issue History