-
Notifications
You must be signed in to change notification settings - Fork 829
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
Segfault when eqipping a specific item combination #7767
Comments
No crash on Linux. I also don't see any ASAN errors. Maybe it's a macOS-only bug? FYI, we're not really allocating any additional memory when equipping your items so it's unlikely to be an OOM bug. I've reverted the title of the issue. |
No crash on macOS Monterey 12.6. |
One thing I do know is that the game must display the sprite animations for Warrior with heavy armor, sword, and shield using the configuration of equipment you described. You should probably check the MD5 of your copy of If your MD5 matches one of these, then it should be valid. |
Did you try to test it with other heros then the barbarian?
They where also in memory before you equipped them so I don't see how you can draw that conclusion. Please create a new warrior and equip a heavy armor, doing so will require the same graphics but with only one variability staying the same so would narrow things down. You could also try only equipping the items when in the dungeon since the graphics in town are different then the ones in the dungeon.
I don't think anything changed regarding memory allocation. Improper memory allocation is just one of several way to end up with accessing invalid memory, which is just one of a few ways to end up with a segfault. I think it's more likely that the render has become more sensitive to data corruption. But that could be as subtle a change as using a different version of Clang to compile the two releases. Ideally if you can build a Debug version (I see you have experience with CMake apps) then you can see exactly where the error occurs (run it from a terminal to get error output), even better if you can can run it with a debugger attached. |
Interesting, running |
If you downloaded the MPQ from Battle.net or GOG then download it again or verify the game data. It's seen before where Battle.net downloaded a corrupt copy multiple times before finally getting it right. If it's from a CD then clean your CD and try and copy the file again, hopefully the disk is not damaged. |
That worked, thank you everyone ! |
You would have to bisect and build roughly 10 versions of the game to figure out exactly what change caused it to change ... if it's not simply a compiler difference. |
Operating System
Mac
DevilutionX version
1.5.0
Describe
I have a specific combination of items which wearing will cause a segfault.
If you create a barbarian character in multiplayer (offline or TCP), and have him carry those 3 items, the game crashes : segmentation fault.
These items come from a barbarian character from 1.4.1 which would systematically crash when loading in 1.5.0, 1.5.3 and 1.5.4. I now know this is why.
These items cause no such issue in 1.4.1.
This tells me there was some update to how memory is handled and the game simply doesn't allocate enough memory to handle all 3 items being worn at once.
I suspect this has to do with the sword being two-handed and barbarians being able to wield it with one hand.
However, if you create a new barbarian, have it wear say, a cloak, let it keep its buckler and give it my two-handed sword, the game does not crash. I assume because the buckler and cloak take up less space in memory than my items.
I will put in "To Reproduce" my character file (with the items on) and my stash file, where the three troublesome items as well as rings to boost new characters are located on page 4. They are the "master's great sword", the "awesome full plate mail" and the "saintly shield of the tiger". Two rings of titans as well as an amulet of the zodiac can be found above the sword.
You get the same bug if you replace the armor with the bovine plate in page 3 of the stash, but not with the "leather of aut" below it.
Whatever happened to memory allocation, please revert to how you did it previously, it's a really good item combination, and i'd hate to not update to 1.5.4 soon. Thank you for reading and hopefully solving !
To Reproduce
Expected Behavior
I expected the game to not crash and the items to simply equip like they would in 1.4.1
Additional context
No response
The text was updated successfully, but these errors were encountered: