That is a bit of a tricky error since it gives no indication at all to what is going wrong. Nor where it goes wrong. That makes giving help difficult.
What you might be able to try is to put on the debugger and let it stop on errors. Perhaps that gives a better indication of where the problem occurs.
I understand that you don't want to share your model. Would it be an option to send it over a private message so I can have a look at it?