2019-12-07 08:39 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0004942Spring engineGeneralpublic2015-09-06 21:18
Reporterabma 
Assigned Toabma 
PrioritynormalSeveritycrashReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version100.0+git 
Target Version101.0Fixed in Version 
Summary0004942: failed assert triggered by Spring.SetUnitDirection(unitId, 1, 0, 0)
DescriptionSpring.SetUnitDirection(unitId, 0, 0, 0) triggers this assert:

spring: rts/Sim/Objects/SolidObject.cpp:414: virtual void CSolidObject::ForcedSpin(const float3&): Assertion `math::fabsf(newDir.SqLength() - 1.0f) <= float3::NORMALIZE_EPS' failed.
[f=0000000] [CrashHandler] Error: Aborted (SIGABRT) in spring 100.0.1-123-g911c81b develop (Debug)
[f=0000000] [CrashHandler] Error: Halted Stacktrace for Spring 100.0.1-123-g911c81b develop (Debug) using libunwind:
[f=0000000] [CrashHandler] Error: [00] /home/abma/dev/spring/develop/rts/System/Platform/Linux/CrashHandler.cpp:815 CrashHandler::HaltedStacktrace(std::string const&, siginfo_t*, ucontext*)
[f=0000000] [CrashHandler] Error: [01] /home/abma/dev/spring/develop/rts/System/Platform/Linux/CrashHandler.cpp:921 CrashHandler::HandleSignal(int, siginfo_t*, void*)
[f=0000000] [CrashHandler] Error: [02] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7fe9b2e00d10] __restore_rt
[f=0000000] [CrashHandler] Error: [03] /build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55 __GI_raise
[f=0000000] [CrashHandler] Error: [04] /build/buildd/glibc-2.21/stdlib/abort.c:91 __GI_abort
[f=0000000] [CrashHandler] Error: [05] /build/buildd/glibc-2.21/assert/assert.c:92 __assert_fail_base
[f=0000000] [CrashHandler] Error: [06] /lib/x86_64-linux-gnu/libc.so.6(+0x2e0f2) [0x7fe9af2260f2] __assert_fail
[f=0000000] [CrashHandler] Error: [07] /home/abma/dev/spring/develop/rts/Sim/Objects/SolidObject.cpp:418 CSolidObject::ForcedSpin(float3 const&)
[f=0000000] [CrashHandler] Error: [08] /home/abma/dev/spring/develop/rts/Lua/LuaSyncedCtrl.cpp:522 SetSolidObjectDirection(lua_State*, CSolidObject*)
[f=0000000] [CrashHandler] Error: [09] /home/abma/dev/spring/develop/rts/Lua/LuaSyncedCtrl.cpp:2305 LuaSyncedCtrl::SetUnitDirection(lua_State*)
[f=0000000] [CrashHandler] Error: [10] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:320 luaD_precall(lua_State*, lua_TValue*, int)
[f=0000000] [CrashHandler] Error: [11] /home/abma/dev/spring/develop/rts/lib/lua/src/lvm.cpp:613 luaV_execute(lua_State*, int)
[f=0000000] [CrashHandler] Error: [12] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:379 luaD_call(lua_State*, lua_TValue*, int)
[f=0000000] [CrashHandler] Error: [13] /home/abma/dev/spring/develop/rts/lib/lua/src/lapi.cpp:813 f_call(lua_State*, void*)
[f=0000000] [CrashHandler] Error: [14] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:119 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*)
[f=0000000] [CrashHandler] Error: [15] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:464 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long)
[f=0000000] [CrashHandler] Error: [16] /home/abma/dev/spring/develop/rts/lib/lua/src/lapi.cpp:833 lua_pcall(lua_State*, int, int, int)
[f=0000000] [CrashHandler] Error: [17] /home/abma/dev/spring/develop/rts/Lua/LuaVFS.cpp:186 (discriminator 1) LuaVFS::Include(lua_State*, bool)
[f=0000000] [CrashHandler] Error: [18] /home/abma/dev/spring/develop/rts/Lua/LuaVFS.cpp:205 LuaVFS::SyncInclude(lua_State*)
[f=0000000] [CrashHandler] Error: [19] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:320 luaD_precall(lua_State*, lua_TValue*, int)
[f=0000000] [CrashHandler] Error: [20] /home/abma/dev/spring/develop/rts/lib/lua/src/lvm.cpp:613 luaV_execute(lua_State*, int)
[f=0000000] [CrashHandler] Error: [21] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:379 luaD_call(lua_State*, lua_TValue*, int)
[f=0000000] [CrashHandler] Error: [22] /home/abma/dev/spring/develop/rts/lib/lua/src/lapi.cpp:813 f_call(lua_State*, void*)
[f=0000000] [CrashHandler] Error: [23] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:119 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*)
[f=0000000] [CrashHandler] Error: [24] /home/abma/dev/spring/develop/rts/lib/lua/src/ldo.cpp:464 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long)
[f=0000000] [CrashHandler] Error: [25] /home/abma/dev/spring/develop/rts/lib/lua/src/lapi.cpp:833 lua_pcall(lua_State*, int, int, int)
[f=0000000] [CrashHandler] Error: [26] /home/abma/dev/spring/develop/rts/Lua/LuaHandle.cpp:296 CLuaHandle::RunCallInTraceback(lua_State*, LuaHashString const*, int, int, int, std::string&, [...]
[f=0000000] [CrashHandler] Error: [27] /home/abma/dev/spring/develop/rts/Lua/LuaHandle.cpp:367 CLuaHandle::RunCallInTraceback(lua_State*, LuaHashString const*, int, int, int, std::string&, bool)
[f=0000000] [CrashHandler] Error: [28] /home/abma/dev/spring/develop/rts/Lua/LuaHandle.cpp:377 CLuaHandle::RunCallInTraceback(lua_State*, LuaHashString const&, int, int, int, bool)
[f=0000000] [CrashHandler] Error: [29] /home/abma/dev/spring/develop/rts/Lua/LuaHandle.cpp:413 CLuaHandle::LoadCode(lua_State*, std::string const&, std::string const&)
[f=0000000] [CrashHandler] Error: [30] /home/abma/dev/spring/develop/rts/Lua/LuaHandleSynced.cpp:421 CSyncedLuaHandle::Init(std::string const&, std::string const&)
[f=0000000] [CrashHandler] Error: [31] /home/abma/dev/spring/develop/rts/Lua/LuaHandleSynced.cpp:1376 CLuaHandleSynced::Init(std::string const&, std::string const&, std::string const&)
[f=0000000] [CrashHandler] Error: [32] /home/abma/dev/spring/develop/rts/Lua/LuaRules.cpp:57 (discriminator 8) CLuaRules::CLuaRules()
[f=0000000] [CrashHandler] Error: [33] /home/abma/dev/spring/develop/rts/Lua/LuaRules.cpp:35 (discriminator 2) CLuaRules::LoadHandler()
[f=0000000] [CrashHandler] Error: [34] /home/abma/dev/spring/develop/rts/Game/Game.cpp:688 (discriminator 4) CGame::LoadLua()
[f=0000000] [CrashHandler] Error: [35] /home/abma/dev/spring/develop/rts/Game/Game.cpp:410 CGame::LoadGame(std::string const&, bool)
[f=0000000] [CrashHandler] Error: [36] /home/abma/dev/spring/develop/rts/Game/LoadScreen.cpp:131 CLoadScreen::Init()
[f=0000000] [CrashHandler] Error: [37] /home/abma/dev/spring/develop/rts/Game/LoadScreen.cpp:196 (discriminator 2) CLoadScreen::CreateInstance(std::string const&, std::string const&, ILoadSaveHandler*)
[f=0000000] [CrashHandler] Error: [38] /home/abma/dev/spring/develop/rts/Game/PreGame.cpp:340 (discriminator 3) CPreGame::UpdateClientNet()
[f=0000000] [CrashHandler] Error: [39] /home/abma/dev/spring/develop/rts/Game/PreGame.cpp:173 CPreGame::Update()
[f=0000000] [CrashHandler] Error: [40] /home/abma/dev/spring/develop/rts/System/SpringApp.cpp:942 SpringApp::Update()
[f=0000000] [CrashHandler] Error: [41] /home/abma/dev/spring/develop/rts/System/SpringApp.cpp:978 SpringApp::Run()
[f=0000000] [CrashHandler] Error: [42] /home/abma/dev/spring/develop/rts/System/Main.cpp:48 Run(int, char**)
[f=0000000] [CrashHandler] Error: [43] /home/abma/dev/spring/develop/rts/System/Main.cpp:108 main
[f=0000000] [CrashHandler] Error: [44] /build/buildd/glibc-2.21/csu/libc-start.c:323 __libc_start_main
[f=0000000] [CrashHandler] Error: [45] ./spring(_start+0x29) [0x5a5499] ??
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0015106

abma (administrator)

Last edited: 2015-09-01 00:44

View 2 revisions

Spring.SetUnitDirection(unitID, 0, 0, 0) very likely is invalid but some error message should be shown (somehow) imo

or at least show some error message in debug builds.

https://github.com/SpringCabal/Area-17/issues/40

~0015107

abma (administrator)

assert seems to fail on

Spring.SetUnitDirection(unitID, 1, 0, 0), too

~0015108

abma (administrator)

to reproduce:
clone + use this: https://github.com/spring/devgame.sdd

~0015109

abma (administrator)

https://github.com/spring/devgame.sdd/blob/master/luarules/gadgets/test.lua#L24

~0015116

cleanrock (developer)

Our normalizing is not that precise, i suggest we relax the assert by using CMP_EPS instead (i tested it).

~0015123

abma (administrator)

Fix d6f6cd4b750f895a7c1ff5d92644a3d3433d2fb2 committed to pr-downloader branch: fix 0004942 (thanks cleanrock!), repo: spring changeset id: 5573
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2015-09-01 00:37 abma New Issue
2015-09-01 00:39 abma Note Added: 0015106
2015-09-01 00:44 abma Note Edited: 0015106 View Revisions
2015-09-01 00:57 abma Note Added: 0015107
2015-09-01 01:38 abma Summary failed assert triggered by Spring.SetUnitDirection(unitId, 0, 0, 0) => failed assert triggered by Spring.SetUnitDirection(unitId, 1, 0, 0)
2015-09-01 01:38 abma Note Added: 0015108
2015-09-01 01:50 abma Note Added: 0015109
2015-09-05 07:56 cleanrock Note Added: 0015116
2015-09-06 21:18 abma Changeset attached => spring pr-downloader d6f6cd4b
2015-09-06 21:18 abma Note Added: 0015123
2015-09-06 21:18 abma Assigned To => abma
2015-09-06 21:18 abma Status new => resolved
2015-09-06 21:18 abma Resolution open => fixed
+Issue History