2025-07-18 23:10 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002932Spring engineGeneralpublic2012-01-29 02:27
Reporterabma 
Assigned TojK 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002932: SIGSEV in float3.h:346
Descriptioncaused by /give all /give all 1

[f=0000192] Error: Segmentation fault (SIGSEGV) in spring 85.0.1-95-g526ee69 develop
[f=0000192] Error: Stacktrace:
[f=0000192] Error: <0> /lib/x86_64-linux-gnu/libpthread.so.0(+0x10060) [0x7f05db31f060]
[f=0000192] Error: <1> /home/abma/dev/spring/develop/rts/System/float3.h:346
[f=0000192] Error: <2> /home/abma/dev/spring/develop/rts/Game/TraceRay.cpp:209
[f=0000192] Error: <3> /home/abma/dev/spring/develop/rts/Sim/Weapons/Weapon.cpp:849
[f=0000192] Error: <4> /home/abma/dev/spring/develop/rts/Sim/Weapons/MissileLauncher.cpp:134
[f=0000192] Error: <5> /home/abma/dev/spring/develop/rts/Sim/Weapons/Weapon.cpp:765
[f=0000192] Error: <6> /home/abma/dev/spring/develop/rts/Sim/Units/Unit.cpp:1016
[f=0000192] Error: <7> /home/abma/dev/spring/develop/rts/Sim/Units/Unit.cpp:982
[f=0000192] Error: <8> /usr/include/c++/4.6/bits/stl_list.h:154
[f=0000192] Error: <9> /home/abma/dev/spring/develop/rts/Game/Game.cpp:1473
Additional Information(gdb) bt full
#0 0x00007f05db31ec3d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#1 0x00000000009fc0c6 in X_MessageBox (
    msg=0x7f05a2e60cc8 "Spring has crashed:\nSegmentation fault (SIGSEGV).\n\nA stacktrace has been written to:\n /var/tmp/home/.spring/infolog.txt", caption=<optimized out>, flags=8)
    at /home/abma/dev/spring/develop/rts/System/Platform/Linux/X_MessageBox.cpp:101
        caption2 = "Spring crashed\n", '\000' <repeats 84 times>
        pid = <optimized out>
        status = <optimized out>
        len = <optimized out>
        msg2 = "Spring has crashed:\nSegmentation fault (SIGSEGV).\n\nA stacktrace has been written to:\n /var/tmp/home/.spring/infolog.txt\n", '\000' <repeats 878 times>
#2 0x000000000098f4c3 in ExitMessage (msg=..., caption=..., flags=8, forced=false)
    at /home/abma/dev/spring/develop/rts/System/Platform/errorhandler.cpp:62
No locals.
0000003 0x000000000098fbec in ErrorMessageBox (msg=..., caption=..., flags=8)
    at /home/abma/dev/spring/develop/rts/System/Platform/errorhandler.cpp:122
        forcedExitThread = 0x7f05ad2a1b60
0000004 0x00000000009f9e95 in CrashHandler::HandleSignal (signal=<optimized out>)
    at /home/abma/dev/spring/develop/rts/System/Platform/Linux/CrashHandler.cpp:530
        buf = <incomplete type>
        error = {static npos = <optimized out>,
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f05a39b7878 "Segmentation fault (SIGSEGV)"}}
---Type <return> to continue, or q <return> to quit---
        keepRunning = false
0000005 <signal handler called>
No symbol table info available.
#6 dot (f=<optimized out>, this=<optimized out>)
    at /home/abma/dev/spring/develop/rts/System/float3.h:346
No locals.
#7 LineGroundSquareCol (ys=<synthetic pointer>, to=..., from=..., normalmap=<synthetic pointer>,
    heightmap=<synthetic pointer>, xs=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Map/Ground.cpp:98
        faceNormalTL = @0x7f05c2ffe9d8
        faceNormalBR = @0x7f05c2ffe9e4
        fromFacePlaneDist = <optimized out>
#8 LineGroundSquareCol (ys=<synthetic pointer>, to=..., from=..., normalmap=<synthetic pointer>,
    heightmap=<synthetic pointer>, xs=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Map/Ground.cpp:213
No locals.
#9 CGround::LineGroundCol (this=<optimized out>, from=..., to=..., synced=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Map/Ground.cpp:325
        nextx = <optimized out>
        nextz = <optimized out>
        xn = <optimized out>
        zn = <optimized out>
        endReached = <optimized out>
        beyondEnd = <optimized out>
---Type <return> to continue, or q <return> to quit---
        testposx = 1
        testposz = 1
        curx = 275
        curz = 1024
        rdsx = -0.0136047984
        rdsz = -0.00759001309
        dx = <optimized out>
        fsz = <optimized out>
        keepgoing = <optimized out>
        hm = 0x4d6bde0
        pfrom = {static binder = {class_ = 0x231a5b0, base = 0x0, flags = creg::CF_None,
            memberRegistrator = 0x12812a8, name = 0xd727ca "float3", size = 12,
            constructor = 0x9a6210 <float3::_ConstructInstance(void*)>,
            destructor = 0x9a6230 <float3::_DestructInstance(void*)>, nextBinder = 0x12811a0},
          static memberRegistrator = 0x12812e0, static CMP_EPS = 9.99999975e-05,
          static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 6143, static maxzpos = 8191,
          x = 1465.08972, y = <optimized out>, z = 275.878479}
        skippedDist = 1465.08972
        dirz = -1
        ffsx = 275.878479
        dz = <optimized out>
        fsx = <optimized out>
        nm = 0x7f05c1dfd010
        dirx = -1
---Type <return> to continue, or q <return> to quit---
        ffsz = 3
0000010 0x0000000000552709 in TraceRay::TraceRay (start=..., dir=..., length=<optimized out>,
    collisionFlags=-17, owner=<optimized out>, hitUnit=@0x7fff76a1ebe0, hitFeature=@0x7fff76a1ebe8)
    at /home/abma/dev/spring/develop/rts/Game/TraceRay.cpp:208
        groundLength = 0
        ignoreAllies = true
        ignoreNeutrals = true
        ignoreUnits = true
        ignoreEnemies = true
        ignoreFeatures = true
        ignoreGround = false
#11 0x000000000093b8f0 in CWeapon::HaveFreeLineOfFire (this=<optimized out>, pos=<optimized out>,
    dir=<optimized out>, length=<optimized out>, target=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Sim/Weapons/Weapon.cpp:846
        unit = 0x0
        feature = 0x0
        g = 0

0000012 0x0000000000935f89 in TryTarget (unit=0x150c26a0, pos=..., this=0x7f05a38fe030,
    userTarget=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Sim/Weapons/MissileLauncher.cpp:134
        length = <optimized out>
        dir = {static binder = {class_ = 0x231a5b0, base = 0x0, flags = creg::CF_None,
            memberRegistrator = 0x12812a8, name = 0xd727ca "float3", size = 12,
            constructor = 0x9a6210 <float3::_ConstructInstance(void*)>,
---Type <return> to continue, or q <return> to quit---
            destructor = 0x9a6230 <float3::_DestructInstance(void*)>, nextBinder = 0x12811a0},
          static memberRegistrator = 0x12812e0, static CMP_EPS = 9.99999975e-05,
          static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 6143, static maxzpos = 8191,
          x = 0.486816317, y = -0.039765764, z = 0.872598708}
0000013 CMissileLauncher::TryTarget (this=0x7f05a38fe030, pos=..., userTarget=<optimized out>,
    unit=0x150c26a0) at /home/abma/dev/spring/develop/rts/Sim/Weapons/MissileLauncher.cpp:83
No locals.
0000014 0x000000000093f4ad in CWeapon::SlowUpdate (this=0x7f05a38fe030,
    noAutoTargetOverride=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Sim/Weapons/Weapon.cpp:765
        nextTargetUnit = 0x150c26a0
        weaponLead = <optimized out>
        weaponError = <optimized out>
        nextTargetPos = {static binder = {class_ = 0x231a5b0, base = 0x0, flags = creg::CF_None,
            memberRegistrator = 0x12812a8, name = 0xd727ca "float3", size = 12,
            constructor = 0x9a6210 <float3::_ConstructInstance(void*)>,
            destructor = 0x9a6230 <float3::_DestructInstance(void*)>, nextBinder = 0x12811a0},
          static memberRegistrator = 0x12812e0, static CMP_EPS = 9.99999975e-05,
          static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 6143, static maxzpos = 8191,
          x = 1619, y = 344.727814, z = 7137.9834}
        appHeight = <optimized out>
        targets = {_M_t = {
            _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<float const, CUnit*> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<float const, CUnit*> > >> = {<No data fields>}, ---Type <return> to continue, or q <return> to quit---
<No data fields>},
              _M_key_compare = {<std::binary_function<float, float, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x7f05a3ca1fa0,
                _M_left = 0x7f05a3ca1ee0, _M_right = 0x7f05a20f9910}, _M_node_count = 14}}}
        nextTargetIt = {_M_node = 0x7f05a3ca1ee0}
        lastTargetIt = {_M_node = 0x7f05a20f9910}
        weaponPiece = <optimized out>
        weaponAimed = <optimized out>
#15 0x00000000008fc029 in SlowUpdateWeapons (this=<optimized out>)
    at /home/abma/dev/spring/develop/rts/Sim/Units/Unit.cpp:1014
        w = 0x7f05a38fe030
        wi = <optimized out>
#16 CUnit::SlowUpdateWeapons (this=0x7f05a38e2d50)
    at /home/abma/dev/spring/develop/rts/Sim/Units/Unit.cpp:992
No locals.
#17 0x00000000009021d1 in CUnit::SlowUpdate (this=0x7f05a38e2d50)
    at /home/abma/dev/spring/develop/rts/Sim/Units/Unit.cpp:980
No locals.
#18 0x000000000091dd2f in CUnitHandler::Update (this=0x88d92e0)
    at /home/abma/dev/spring/develop/rts/Sim/Units/UnitHandler.cpp:316
        unit = <optimized out>
        myScopedTimerFromMakro = {<BasicTimer> = {<boost::noncopyable_::noncopyable> = {<No data fields>}, name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data ---Type <return> to continue, or q <return> to quit---
fields>}, <No data fields>}, _M_p = 0x7f05a97cc398 "Unit::SlowUpdate"}}, starttime = 63673},
          autoShowGraph = false}
        n = <optimized out>
#19 0x00000000004d772d in CGame::SimFrame (this=0x322eb60)
    at /home/abma/dev/spring/develop/rts/Game/Game.cpp:1472
        cputimer = {<BasicTimer> = {<boost::noncopyable_::noncopyable> = {<No data fields>},
            name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f05aab3eaf8 "Game::SimFrame"}}, starttime = 63616},
          autoShowGraph = true}
        forced = {<BasicTimer> = {<boost::noncopyable_::noncopyable> = {<No data fields>}, name = {
              static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f059861ece8 "Game::SimFrame (Update)"}},
            starttime = 63624}, autoShowGraph = false}
0000020 0x0000000000528a3a in CGame::ClientReadNet (this=0x322eb60)
    at /home/abma/dev/spring/develop/rts/Game/NetCommands.cpp:370
        inbuf = <optimized out>
        dataLength = 5
        packetCode = 1 '\001'
        packet = {px = 0x7f05b030f720, pn = {pi_ = 0x7f05b06a0d80}}
#21 0x00000000004da3d8 in CGame::Update (this=0x322eb60)
    at /home/abma/dev/spring/develop/rts/Game/Game.cpp:882
        diffsecs = <optimized out>
---Type <return> to continue, or q <return> to quit---
#22 0x0000000000996025 in UpdateSim (ac=<optimized out>)
    at /home/abma/dev/spring/develop/rts/lib/gml/gml_base.h:37
No locals.
#23 SpringApp::Update (this=<optimized out>)
    at /home/abma/dev/spring/develop/rts/System/SpringApp.cpp:927
        ret = 1
0000024 0x00000000009999a5 in SpringApp::Run (this=0x7fff76a1fa30, argc=1, argv=<optimized out>)
    at /home/abma/dev/spring/develop/rts/System/SpringApp.cpp:1008
No locals.
#25 0x0000000000979357 in MainFunc (argc=1, argv=0x7fff76a1fda8, ret=0x7fff76a1fca8)
    at /home/abma/dev/spring/develop/rts/System/Main.cpp:51
        app = {cmdline = 0x2319d00, binaryName = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x231a268 "/home/abma/local/spring/develop/bin/spring"}}}
0000026 0x0000000000979937 in Run (argc=1, argv=0x7fff76a1fda8)
    at /home/abma/dev/spring/develop/rts/System/Main.cpp:62
        ret = -1
        err = <optimized out>
0000027 0x00007f05d819030d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#28 0x00000000004aff09 in _start ()
No symbol table info available.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0008227

zerver (reporter)

Caused by
https://github.com/spring/spring/commit/57e959b3a237212c81f9f5d01f88a2f8e022caaf

This change looks suspect:
- if ((xs < 0) || (ys < 0) || (xs >= gs->mapxm1) || (ys >= gs->mapym1))
+ const bool inMap = (xs >= 0) && (ys >= 0) && (xs <= gs->mapx) && (ys <= gs->mapy);
+Notes

-Issue History
Date Modified Username Field Change
2012-01-27 01:21 abma New Issue
2012-01-28 02:30 zerver Note Added: 0008227
2012-01-28 02:30 zerver Status new => assigned
2012-01-28 02:30 zerver Assigned To => jK
2012-01-29 02:27 jK Status assigned => resolved
2012-01-29 02:27 jK Resolution open => fixed
+Issue History