Yesterday, 11:37 AM
You sprinkle the code with identifiable calls to (print ...) (if running from the script-fu console) or (gimp-message ...) (if running from the menus) and you can quickly determine between which print/gimp-message calls the error occurs, which should lead you to the culprit...