-
Notifications
You must be signed in to change notification settings - Fork 491
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
🐛 [Bug] Swiftmend crash fix #2695
Comments
I'm not familiar with how concurrency works in this codebase. Can you elaborate on where the race condition is? Is the problem that the auras list could change and thus auras be destroyed between calling |
I haven't been able to pinpoint it precisely based on stacktrace but can confirm this fixed the rare crash occurring. It seemingly is related to rapidly tab-targeting units which are friendly/unfriendly while mashing swiftmend. Not sure how the iterator is becoming invalid before being called but it's related to the mask checks used previously. |
Could you post the rest of the code changes you made to fix it? I'm having a hard time figuring out where in the Swiftmend code this added method would be called. How would you recommend reproducing this issue? You said to switch rapidly between targeting various units while spamming it. Should the friendly units have restoration/rejuvenation on them? |
The only change made is validating the iterator: |
Okay so that would be in here? core/src/game/Spells/SpellEffects.cpp Lines 2495 to 2503 in d58f8f6
I just want to make sure I'm getting it right since I couldn't find the function |
Swiftmend uses a jank blizzlike structure and has its own special function handling it. this function can crash if you somehow hit a race condition on the dispel mask. It can be fixed by checking the iterator is valid before checking spellproto.
In Unit.cpp:
The text was updated successfully, but these errors were encountered: