Closed etam closed 5 years ago
Thanks for opening this one, @etam. I've (mostly) tracked it down to Pi.cpp; the game's shutdown process interrupts the middle of a frame and starts deleting things (including PiGui / IMGUI) before the frame is finished, generating this error.
Resolving this is a semi-major architectural change, so it's slated for the next time I try moving stuff out of the Pi
monolith. However, anyone reading this is more than free to fix it themselves whenever they want; just remember to send in the PR, please :wink:.
We shouldn't really be doing processing in methods on UI callbacks but it's such a convenient way of working that we always do it. I've added the start of a simple request queue so that UI responses can just queue up something instead.
This is then processed in the main loop. Much safer way of dealing with things.
Sounds good. We'll probably be using entt for the ECS (and potentially to phase out sigc++, for less dependency issues); there might be something for event queues in the bag-o-tricks that library is.
I tested changes in #4503 on FreeBSD (10.4 amd64; LLVM/Clang v6.0.1 from devel/llvm60 port) and they work, i.e. the application didn't output mentioned assertion message in console after quit and didn't crash.
Observed behaviour
Game crashes when closing, with message:
This was already reported at #4309 (it was suggested that it should be tracked in a separate issue, so I'm making this one)
Expected behaviour
Guess :)
Steps to reproduce
My pioneer version (and OS):
20181223 (openSUSE Tumbleweed, snapshot 20181218)