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

Crash when searching a keyword in Pedia during a game #3152

Closed
Oberlus opened this issue Aug 25, 2020 · 11 comments
Closed

Crash when searching a keyword in Pedia during a game #3152

Oberlus opened this issue Aug 25, 2020 · 11 comments
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:UI The Issue/PR deals with the game user interface, graphical or other. status:resolved The Issue was resolved, either by answering properly or fixing the underlying bug.
Milestone

Comments

@Oberlus
Copy link
Contributor

Oberlus commented Aug 25, 2020

Bug Report

Environment

  • FreeOrion Version: v0.4.10+ 8119c36
  • Operating System: Ubuntu 18.04
    • Compiled from source

Steps to reproduce

  • Quickstart a game
  • Open Pedia windows and search for a keyword.
  • Crash to desktop happens.

It does not happen when searching the Pedia while not playing a game.

freeoriond.log
freeorion.log

@Oberlus Oberlus added the category:bug The Issue/PR describes or solves a perceived malfunction within the game. label Aug 25, 2020
@geoffthemedio
Copy link
Member

affects v0.4.10?

@geoffthemedio geoffthemedio added the component:UI The Issue/PR deals with the game user interface, graphical or other. label Aug 25, 2020
@geoffthemedio geoffthemedio added this to the v0.5 milestone Aug 25, 2020
@geoffthemedio geoffthemedio added the priority:high The Issue/PR is very urgent or important and should be addressed/finished as soon as possible. label Aug 25, 2020
@Oberlus
Copy link
Contributor Author

Oberlus commented Aug 25, 2020

affects v0.4.10?

No, tested. Only recent master version (didn't check when this began to happen, I don't use Pedia usually).

@geoffthemedio
Copy link
Member

can't reproduce on windows... a stack trace would be helpful.

@Oberlus
Copy link
Contributor Author

Oberlus commented Aug 27, 2020

can't reproduce on windows... a stack trace would be helpful.

Steps:

  • Quickstart a game.
  • Open Pedia window.
  • Write "influence" in search box and hit enter.
Thread 1 "freeorion" received signal SIGSEGV, Segmentation fault.
0x00007ffff742da12 in Condition::StarType::Eval(ScriptingContext const&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > >&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > >&, Condition::SearchDomain) const ()
   from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
(gdb) bt
#0  0x00007ffff742da12 in Condition::StarType::Eval(ScriptingContext const&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > >&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > >&, Condition::SearchDomain) const ()
   from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
#1  0x00007ffff7535b5a in (anonymous namespace)::DispatchEffectsGroupScopeEvaluations(EffectsCauseType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > > const&, std::vector<std::shared_ptr<Effect::EffectsGroup>, std::allocator<std::shared_ptr<Effect::EffectsGroup> > > const&, bool, ObjectMap const&, std::vector<std::shared_ptr<UniverseObject const>, std::allocator<std::shared_ptr<UniverseObject const> > > const&, std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int> > const&, std::__cxx11::list<std::pair<std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > >, std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > >*>, std::allocator<std::pair<std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > >, std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > >*> > >&, boost::asio::thread_pool&, int&) [clone .constprop.2390] ()
   from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
#2  0x00007ffff7539368 in Universe::GetEffectsAndTargets(std::map<int, std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > >, std::less<int>, std::allocator<std::pair<int const, std::vector<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause>, std::allocator<std::pair<Effect::SourcedEffectsGroup, Effect::TargetsAndCause> > > > > >&, std::vector<int, std::allocator<int> > const&, bool) const () from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
#3  0x00007ffff7542f14 in Universe::UpdateMeterEstimatesImpl(std::vector<int, std::allocator<int> > const&, bool) () from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
#4  0x00007ffff7546139 in Universe::UpdateMeterEstimates(int, bool) () from /home/lucas/Projects/FreeOrion/master-testing-build/libfreeorioncommon.so
#5  0x000055555565aa44 in (anonymous namespace)::RefreshDetailPanelShipDesignTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::shared_ptr<GG::Texture>&, std::shared_ptr<GG::Texture>&, int&, float&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, GG::Clr&) [clone .isra.1943] ()
#6  0x000055555586531a in EncyclopediaDetailPanel::HandleSearchTextEntered() ()
#7  0x0000555555677572 in boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() ()
#8  0x000055555585b728 in (anonymous namespace)::SearchEdit::KeyPress(GG::Key, unsigned int, GG::Flags<GG::ModKey>) ()
#9  0x00007ffff67b5b46 in GG::Wnd::HandleEvent(GG::WndEvent const&) () from /home/lucas/Projects/FreeOrion/master-testing-build/libGiGi.so
#10 0x00007ffff671d667 in GG::GUIImpl::HandleKeyPress(GG::Key, unsigned int, GG::Flags<GG::ModKey>, int) () from /home/lucas/Projects/FreeOrion/master-testing-build/libGiGi.so
#11 0x0000555555ab89b4 in SDLGUI::HandleSystemEvents() ()
#12 0x000055555568fe10 in HumanClientApp::HandleSystemEvents() ()
#13 0x00007ffff671da09 in GG::GUI::RunModal(std::shared_ptr<GG::Wnd>, bool&) () from /home/lucas/Projects/FreeOrion/master-testing-build/libGiGi.so
#14 0x0000555555ab8065 in SDLGUI::Run() ()
#15 0x000055555566b197 in mainSetupAndRun() ()
#16 0x0000555555660b3a in main ()

Let me know if I should do something else to help.

@geoffthemedio
Copy link
Member

geoffthemedio commented Aug 28, 2020

I can't reproduce the issue and I don't see anything that would cause it. If you can identify a commit that has the issue, when the previous commit doesn't, that would help. Or stepping through execution to narrow down the location or cause...

@Oberlus
Copy link
Contributor Author

Oberlus commented Aug 28, 2020

I did a git bisect. The offending commit is [2272735] cast raw pointers instead of shared_ptr

@geoffthemedio
Copy link
Member

Don't see what the issue was, but I tried rewriting it. Try latest master?

If that doesn't work, I can revert further...

@Oberlus
Copy link
Contributor Author

Oberlus commented Aug 29, 2020

Can't compile d0ae3f8

/freeorion/universe/ObjectMap.cpp:52:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<Ship>& map,
     ^~~~~~
/freeorion/universe/ObjectMap.cpp:60:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<Fleet>& map,
     ^~~~~~
/freeorion/universe/ObjectMap.cpp:68:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<Building>& map,
     ^~~~~~
/freeorion/universe/ObjectMap.cpp:76:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<Planet>& map,
     ^~~~~~
/freeorion/universe/ObjectMap.cpp:84:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<System>& map,
     ^~~~~~
/freeorion/universe/ObjectMap.cpp:92:5: error: explicit template specialization cannot have a storage class
     static void TryInsertIntoMap(ObjectMap::container_type<Field>& map,
     ^~~~~~
CMakeFiles/freeorioncommon.dir/build.make:782: recipe for target 'CMakeFiles/freeorioncommon.dir/universe/ObjectMap.cpp.o' failed
make[2]: *** [CMakeFiles/freeorioncommon.dir/universe/ObjectMap.cpp.o] Error 1
CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/freeorioncommon.dir/all' failed
make[1]: *** [CMakeFiles/freeorioncommon.dir/all] Error 2

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

cmake version 3.10.2

libboost 1.65.1

@geoffthemedio
Copy link
Member

geoffthemedio commented Aug 29, 2020

If TravisCI was working, I'd probably have known that...

try now with 038e1c1 ?

@Oberlus
Copy link
Contributor Author

Oberlus commented Aug 29, 2020

try now with 038e1c1 ?

It works now, I can search the Pedia.
I guess this can be closed.

@geoffthemedio
Copy link
Member

no idea why... but OK

@geoffthemedio geoffthemedio added the status:resolved The Issue was resolved, either by answering properly or fixing the underlying bug. label Aug 29, 2020
@Vezzra Vezzra removed the priority:high The Issue/PR is very urgent or important and should be addressed/finished as soon as possible. label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:UI The Issue/PR deals with the game user interface, graphical or other. status:resolved The Issue was resolved, either by answering properly or fixing the underlying bug.
Projects
None yet
Development

No branches or pull requests

3 participants