Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit_updater.cpp::updateUnitCommand Line: 439] Error [ut == NULL Stack Trace #150

Closed
andy5995 opened this issue Feb 12, 2017 · 7 comments
Closed

Comments

@andy5995
Copy link
Contributor

@andy5995 andy5995 commented Feb 12, 2017

There are 2 forum posts related to this:

  1. 3.9.1: unit_updater.cpp::updateRepair Line: 2170] Error [ut == NULL
    https://forum.megaglest.org/index.php?topic=9490.0

  2. error NULL crash

Today it happened while playing with shared units. So far that may be the only clue as to reproducing it.

Also, it happened immediately after I selected to build a library, (but I hadn't placed it yet). And looking at the screenshot, I see there wasn't enough wood.

See this forum post for more details about today's game.

The game crashes for all players at the same time.

Run from the headless dev server.

screen15.jpg

*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
]
softcoder added a commit that referenced this issue Feb 13, 2017
@softcoder
Copy link
Member

@softcoder softcoder commented Feb 13, 2017

Please try the latest git and see if this can be reproduced. I tried a fix for this use case.

@andy5995
Copy link
Contributor Author

@andy5995 andy5995 commented Feb 13, 2017

This has only happened 2x in the last six months, but I'll definitely report if it happens again.

Can you say if it's possible that having "shared resources" on may have something to do with it? If so, we can play more games with shared resources on to test for it.

@softcoder
Copy link
Member

@softcoder softcoder commented Feb 13, 2017

Its hard to say exactly what triggers this, but it does 'look' like it may be related to shared teams. Essentially a peer units command has no unit type when we expect it to have one (during a repair). Now in such a case I wont try to continue in this case so the null error should no longer be triggered.

@andy5995
Copy link
Contributor Author

@andy5995 andy5995 commented Feb 13, 2017

ok. And to be clear, during today's game, "shared teams" was off, "shared resources" was on.

@softcoder
Copy link
Member

@softcoder softcoder commented Mar 6, 2017

Can we close this?

@andy5995
Copy link
Contributor Author

@andy5995 andy5995 commented Mar 6, 2017

I'd say more testing is needed because of how rarely it happened; or close for now and reopen if it's reported again.

@titiger
Copy link
Member

@titiger titiger commented Mar 6, 2017

I say we keep it open to track it if it happens again.

@softcoder softcoder closed this Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants