i had the same problem with projectM for a long time! There must be an internal bug in the LibreELEC Original-toolchain!
I build my own toolchain under ubuntu 18.04.to build LibreELEC 9.2.2 by myself, but the problem continues. Then I tried to build the last projectM 18.104.22.168 by myself, changed to the new presets-folder structure, and it works, no freezing. all works fine.
I hope you can do it the same way!