Why does Dolphin Emulator randomly freeze

dolphin-emulatoremulationsuper-mario-galaxy-2

for some reason, when I was playing Dolphin 5.0, my game (Super Mario Galaxy 2 but this happens with all games) randomly freezes. I don't know what happened and there were no answers for how to fix this on the web (and yes I know I should upgrade to the dev versions but they are super buggy and unstable so yeah). Can someone help me please :-)?

Best Answer

The freezes could be caused by Shader Compilation.

The slowdown when loading new areas, effects, models, and more is commonly referred to as "Shader Compilation Stuttering," by users and developers alike... Typically a stutter only lasts a couple of frames, but on really demanding scenes with multiple compiling shaders, stutters of over a second are possible. - Ubershaders: A Ridiculous Solution to an Impossible Problem

You can eliminate the shuttering by using the Ubershaders option introduced in Dolphin 5.0-4869 and later.

Graphics options, selected 'Asynchronous (Ubershaders)'

(For more info, refer to the Dolphin Blog)