Unable to pinpoint crash source

You might be better off writing an editor plugin. I recommend opening a new question with your desired design / functionality. Maybe someone has a better idea.