One of our instructors had a similar "codingerror" when doing some quizzes. We're on Moodle 3.7.
He said he got the error after he duplicated from another quiz and hit "preview quiz." I think it was a quiz with a lot of randomized questions from lots of categories. I'm wondering if it had something to do with that?
This error showed up in different courses, but not consistently in his various quizzes. He said he deleted the quiz that gave him the error message and recreated it successfully.