MFME does this occasionally as internally it's mainly written in the old school C way (unmanaged aka unsafe code). Unless you are super careful when programming in this way, it's really easy to do stuff like 'trash memory' or 'corrupt pointers' etc, which results in these types of errors.
There's nothing that can be done to fix this I'm afraid.
In normal use, ie. when simply playing layouts, it happens very rarely (less allocs, more battle-tested code) - compared to editing layouts (which involves more allocating/deallocating memory/pointers etc), so it's not much of an issue for end users playing layouts