I just found and fixed probably that exact error just an hour ago; if you run "erase" on a non-edit cell, magic would segfault.
To catch segfault errors, find the PID of the magic process, then use "gdb program <pid>". Another way to do it is to run gdb on the "magicexec" or "magicdnull" processes, which are executables ("magic" itself is just a script that launches one of the two executables).