I forgot to reply to this, but I'm still having this issue.I don't know the details of what you're doing, so it's kind of hard to say. What version of MCM and Dolphin are you using?
Try using the latest version of MCM if you're not already (3.2 at this time), and/or another version of Dolphin, like 5.0+ (or set your Dolphin's settings back to defaults in case there's some possibility of conflicting settings). I just tried that code by itself on a vanilla 1.02 disc via MCM 3.2 on Dolphin 5.0-5491 and it worked fine.
Using MCM 4.0 (Was using 3.2 when I posted my earlier message) and Dolphin 5.0. I reset Dolphin to default settings and it still occurred. Was using a Vanilla 1.02 disc with only the debug menu code enabled and still didn't work. This was the only error that popped up before Dolphin crashed:
3.9 KB Views: 159