MegaGlest Forum
MegaGlest => Bug reports => Topic started by: tomreyn on 28 August 2013, 23:13:47
-
I was hosting on 3.8.0 beta1 on atibox today, with several clients connected (both Linux and Windows). Sometime during the last quarter of the game the following happened on the host (I do not know what actually caused/triggered it):
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
Error saved to logfile [/home/user1/.megaglest/error.log]
[2013-08-28 21:04:39] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 643] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
] gameInitialized = 1, program = 0x1bd9440
[2013-08-28 21:04:42] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 662] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x766f97] line: 653
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x76765f] line: 5533
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f2dfc1d40b0] line: 0
./megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0xacd7a6] line: 1197
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0xaabe16] line: 1759
./megaglest() [0xaa2f84]address [0xaa2f84]
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0xaaf0bf] line: 161
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0xa9413f] line: 707
./megaglest:Glest::Game::World::update()address [0xa95afc] line: 865
./megaglest:Glest::Game::Game::update()address [0x673006] line: 2095
./megaglest:Glest::Game::Program::loopWorker()address [0x79b4fb] line: 459
./megaglest:Glest::Game::glestMain(int, char**)address [0x78e746] line: 5379
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x792411] line: 5626
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x7925f8] line: 5698
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f2dfc1beea5] line: 0
./megaglest() [0x5ea339]address [0x5ea339]
]
Segmentation fault (core dumped)
Sadly the last line is misleading since I had an old core file there and a new one was not created. Nor was a DMP file.
-
Very good find! I need to sleep now, but from a quick look this is a bug and maybe one of this kind which causes OOS too .
-
I just ran into this again, with Typedef. We're both on Linux x86_64 and I was hosting a game of Prax with translated techtrees.
My server ran into a segfault in the middle of the game:
megaglest v3.8.0-beta1
Compiled using: GNUC: 40403 [64bit] on: Jun 25 2013 22:02:29 platform: Linux-X64 endianness: little
SVN: [Rev: 4514] - using STREFLOP [SSE] - [no-denormals]
[..]
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
[2013-09-16 00:01:56] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 643] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
] gameInitialized = 1, program = 0x1ab0520
[2013-09-16 00:01:58] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 662] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x766f97] line: 653
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x76765f] line: 5533
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f6d767590b0] line: 0
./megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0xacd7a6] line: 1197
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0xaabe16] line: 1759
./megaglest() [0xaa2f84]address [0xaa2f84]
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0xaaf0bf] line: 161
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0xa9413f] line: 707
./megaglest:Glest::Game::World::update()address [0xa95afc] line: 865
./megaglest:Glest::Game::Game::update()address [0x673006] line: 2095
./megaglest:Glest::Game::Program::loopWorker()address [0x79b4fb] line: 459
./megaglest:Glest::Game::glestMain(int, char**)address [0x78e746] line: 5379
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x792411] line: 5626
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x7925f8] line: 5698
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f6d76743ea5] line: 0
./megaglest() [0x5ea339]address [0x5ea339]
]
And the same from my core file:
Core was generated by `./megaglest --starthost'.
Program terminated with signal 11, Segmentation fault.
#0 getSize (this=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/types/unit_type.h:197
197 /home/softcoder/Code/megaglest/trunk/source/glest_game/types/unit_type.h: Datei oder Verzeichnis nicht gefunden.
#0 getSize (this=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/types/unit_type.h:197
#1 Glest::Game::Map::findBestBuildApproach (this=0x2e3a8f8, unit=<optimized out>, originalBuildPos=..., ut=0x0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/map.cpp:1197
#2 0x0000000000aabe16 in Glest::Game::UnitUpdater::updateRepair (this=0x2e3b080, unit=0x9ecc1c0, frameIndex=-1) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:1756
#3 0x0000000000aa2f84 in Glest::Game::UnitUpdater::updateUnitCommand (this=0x2e3b080, unit=0x9ecc1c0, frameIndex=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:324
#4 0x0000000000aaf0bf in Glest::Game::UnitUpdater::updateUnit (this=0x2e3b080, unit=0x9ecc1c0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:159
#5 0x0000000000a9413f in Glest::Game::World::updateAllFactionUnits (this=0x2e3a890) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:707
#6 0x0000000000a95afc in Glest::Game::World::update (this=0x2e3a890) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:863
#7 0x0000000000673006 in Glest::Game::Game::update (this=0x2e3a850) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:2094
#8 0x000000000079b4fb in Glest::Game::Program::loopWorker (this=0x1ab0520) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:458
#9 0x000000000076729d in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>, getStackTraceString=true) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:684
#10 0x000000000076765f in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5532
#11 <signal handler called>
#12 getSize (this=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/types/unit_type.h:197
#13 Glest::Game::Map::findBestBuildApproach (this=0x2e3a8f8, unit=<optimized out>, originalBuildPos=..., ut=0x0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/map.cpp:1197
#14 0x0000000000aabe16 in Glest::Game::UnitUpdater::updateRepair (this=0x2e3b080, unit=0x9ecc1c0, frameIndex=-1) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:1756
#15 0x0000000000aa2f84 in Glest::Game::UnitUpdater::updateUnitCommand (this=0x2e3b080, unit=0x9ecc1c0, frameIndex=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:324
#16 0x0000000000aaf0bf in Glest::Game::UnitUpdater::updateUnit (this=0x2e3b080, unit=0x9ecc1c0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/unit_updater.cpp:159
#17 0x0000000000a9413f in Glest::Game::World::updateAllFactionUnits (this=0x2e3a890) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:707
#18 0x0000000000a95afc in Glest::Game::World::update (this=0x2e3a890) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:863
#19 0x0000000000673006 in Glest::Game::Game::update (this=0x2e3a850) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:2094
#20 0x000000000079b4fb in Glest::Game::Program::loopWorker (this=0x1ab0520) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:458
#21 0x000000000078e746 in Glest::Game::glestMain (argc=<optimized out>, argv=0x7fff59656968) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5379
#22 0x0000000000792411 in Glest::Game::glestMainSEHWrapper (argc=2, argv=0x7fff59656968) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5624
#23 0x00000000007925f8 in Glest::Game::glestMainWrapper (argc=2, argv=0x7fff59656968) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5697
#24 0x00007f6d76743ea5 in __libc_start_main (main=0x7926b0 <main(int, char**)>, argc=2, ubp_av=0x7fff59656968, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff59656958) at libc-start.c:260
#25 0x00000000005ea339 in _start ()
Typedef's client also crashed, printing this to error.log:
[2013-09-16 00:01:58] Runtime Error information:
======================================================
In [/home/andy/bin/megaglest/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5528] Error detected: signal 11:
Stack Trace:
megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x673a27] line: 653
megaglest() [0x673c9f]address [0x673c9f]
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f091601f0b0] line: 0
megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0x93ad5d] line: 1196
megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x928cc4] line: 1759
megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x9256e9] line: 324
megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x925be3] line: 161
megaglest:Glest::Game::World::updateAllFactionUnits()address [0x907236] line: 707
megaglest:Glest::Game::World::update()address [0x908c20] line: 865
megaglest:Glest::Game::Game::update()address [0x572d34] line: 2095
megaglest:Glest::Game::Program::loopWorker()address [0x6a4590] line: 459
megaglest:Glest::Game::glestMain(int, char**)address [0x680a07] line: 5379
megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x685036] line: 5626
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f0916009ea5] line: 0
megaglest() [0x4fe7c9]address [0x4fe7c9]
-
I looked at this for several hours now , but I have no idea whats wrong :-/ .
How can it happen that a unit has no more unit type ? Or more exact why does accessing the unittype results in a memory access violation?
-
Please try rev #: 4552 to see if this was related to a null pointer.
-
Today - We were playing with shared resources, otherwise, nothing unusual about the game. The map was rangor, a 4 human v 4 AI game on the headless dev server.
(https://s21.postimg.org/6d903l9pf/screen15.jpg) (https://postimg.org/image/6d903l9pf/)
*ERROR* [2017-02-12 15:49:41] In [/home/andy/src/megaglest-source/source/glest_game/world/unit_updater.cpp::updateRepair Line: 2307] Error [ut == NULL
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0x563ef3aa00f4] line: 0
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x563ef3ad4558] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac670e] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
]
*ERROR* [2017-02-12 15:49:41] In [/home/andy/src/megaglest-source/source/glest_game/world/unit_updater.cpp::updateUnitCommand Line: 503] Error [ut == NULL
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0x563ef3aa00f4] line: 0
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x563ef3ad4558] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac670e] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x563ef3ad4a32] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac670e] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
]
*ERROR* [2017-02-12 15:49:41] In [game.cpp::update Line: 2779] Error [ut == NULL
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::Map::findBestBuildApproach(Glest::Game::Unit const*, Shared::Graphics::Vec2<int>, Glest::Game::UnitType const*) constaddress [0x563ef3aa00f4] line: 0
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x563ef3ad4558] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac670e] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::UnitUpdater::updateRepair(Glest::Game::Unit*, int)address [0x563ef3ad4a32] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac670e] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x563ef3bd6c4c] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnitCommand(Glest::Game::Unit*, int)address [0x563ef3ac699c] line: 0
./megaglest:Glest::Game::UnitUpdater::updateUnit(Glest::Game::Unit*)address [0x563ef3acc81d] line: 0
./megaglest:Glest::Game::World::updateAllFactionUnits()address [0x563ef3aed0e9] line: 0
./megaglest:Glest::Game::World::update()address [0x563ef3af8a47] line: 0
./megaglest:Glest::Game::Game::update()address [0x563ef3685212] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0x563ef37d8492] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0x563ef37c2565] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x563ef37c9b34] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f91b20402b1] line: 0
./megaglest:_start()address [0x563ef35edb0a] line: 0
]
-
oops, I meant to post the above onto this thread, but titi suggests they are related:
https://forum.megaglest.org/index.php?topic=9823.0