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
Assertion in abilities.cpp #5643
Comments
i have this bugs but i dont know how to fix it. can you tell me how to fix that? |
Either don't use or remove the add-on causing the error, or otherwise someone will need to implement a fix in the C++ engine code. |
so there is a way to fix that by implement something? |
I'm not sure what you're asking. |
i can confirm that this crash happens even if the only addon being used is Enhanced Traits. friends of mine thinks it might just be a missing parentheses after the 'new' traits. like, the ones the mod adds in, so far i've confirmed that a unit having the Nocturnal trait causes it to crash, as well as either Wicked or Restless, possibly both. |
Method of determining what causes the crash: |
Would the solution be to just revert the non-editor-specific changes from that commit? Just from a glance it doesn't look like there's anything else really going on there. |
…troller::init Partially reverts 6a21fdc Fixes wesnoth#5643 Fixes wesnoth#7238 There's a bunch of global things that can be accessed either via global pointers in the `resource` namespace, or via `display::get_singleton()`. The singleton and these global pointers are set up in `play_controller::init`, however there's a section where things are available via the global pointers but the `display` singleton doesn't exist yet. During that time, checking whether an ability is active can crash the game. Removing the global pointers is a good goal, but detouring through a GUI class to access the data causes its own problems. The "has already been confirmed valid by both callers" comment is replaced with an assert, because there's currently at least three callers.
…troller::init Partially reverts 6a21fdc Fixes #5643 Fixes #7238 There's a bunch of global things that can be accessed either via global pointers in the `resource` namespace, or via `display::get_singleton()`. The singleton and these global pointers are set up in `play_controller::init`, however there's a section where things are available via the global pointers but the `display` singleton doesn't exist yet. During that time, checking whether an ability is active can crash the game. Removing the global pointers is a good goal, but detouring through a GUI class to access the data causes its own problems. The "has already been confirmed valid by both callers" comment is replaced with an assert, because there's currently at least three callers.
…troller::init Partially reverts 6a21fdc Fixes wesnoth#5643 Fixes wesnoth#7238 There's a bunch of global things that can be accessed either via global pointers in the `resource` namespace, or via `display::get_singleton()`. The singleton and these global pointers are set up in `play_controller::init`, however there's a section where things are available via the global pointers but the `display` singleton doesn't exist yet. During that time, checking whether an ability is active can crash the game. Removing the global pointers is a good goal, but detouring through a GUI class to access the data causes its own problems. The "has already been confirmed valid by both callers" comment is replaced with an assert, because there's currently at least three callers. (cherry picked from commit 7ddf691)
…troller::init Partially reverts 6a21fdc Fixes #5643 Fixes #7238 There's a bunch of global things that can be accessed either via global pointers in the `resource` namespace, or via `display::get_singleton()`. The singleton and these global pointers are set up in `play_controller::init`, however there's a section where things are available via the global pointers but the `display` singleton doesn't exist yet. During that time, checking whether an ability is active can crash the game. Removing the global pointers is a good goal, but detouring through a GUI class to access the data causes its own problems. The "has already been confirmed valid by both callers" comment is replaced with an assert, because there's currently at least three callers. (cherry picked from commit 7ddf691)
The details are in the thread here. The short version is that if you try to load the save file attached there (which uses Ageless Era and the Enhanced Traits mod on 1.14) you will get an assertion and Wesnoth will crash. I have not checked whether it crashes in 1.15 as well since the Enhanced Traits mod doesn't exist there so far. The backtrace from the crash is:
The text was updated successfully, but these errors were encountered: