This has been the NR 1 question, and so it has been answered on almost every page of the weekly release threads, since the issue first appeared.
This issue was happening with 12.18 for me.
The following update was installed after a twrp wipe & format.
Never seen the gallery crash again.