Crash on cell loading
Sisah from Discord reported an arm builds crash when going to exteriors, the crash dump from xyzz: https://gist.github.com/xyzz/43a19c407d6e2fc86543ed8b6c91ac03
xyzz explained it:
- https://github.com/OpenMW/openmw/blob/90bf42e80d0d7829397d64bd4571b161c8ed234b/components/esm/defs.hpp#L45-L48 struct Position is defined as packed
- https://github.com/OpenMW/openmw/blob/90bf42e80d0d7829397d64bd4571b161c8ed234b/components/esm/cellref.hpp#L103 Position is right after a signed char member, i.e. it will begin on an unaligned boundary (because it's packed)
- call to https://github.com/OpenMW/openmw/blob/90bf42e80d0d7829397d64bd4571b161c8ed234b/apps/openmw/mwworld/scene.cpp#L157
- call to https://github.com/OpenMW/openmw/blob/90bf42e80d0d7829397d64bd4571b161c8ed234b/components/misc/convert.hpp#L68
- gets cast to float* at some point when the packed information is lost, and dereferencing unaligned float pointer results in a crash
Edited by elsid