You specify Mendix 7.23.5 in your question. Are you sure it's not 7.23.6? I know that there is a bug in the drawing code of that version. It occurs when you have an association of length zero. This can only happen if you have two entities right next to each other (with no pixels in between) and there is an association between those entities that, for example, starts in the upper-right corner of the left entity and ends in the upper-left corner of the right entity. This would also mean that the association is practically invisible.
If it is indeed 7.23.6, can you go back to 7.23.5 and inspect your domain model for this situation? It might also happen if you have a cross-module association and the entity is completely at the left border of the domain model.
If this is not the problem, then I would like to see the entire stacktrace because the top is most interesting part for us.
Update: I already fixed the problem and the fix will be in 7.23.7. If you can’t wait and feel a little adventurous, you can replace one file inside C:\Program Files\Mendix\126.96.36.199654\modeler with this one: https://www.dropbox.com/s/ksbetemypavqd91/Mendix.Modeler.Core.View.dll?dl=0
Domain model in Email Template also get the same problem, version 7.23.6
You should open a support ticket on this topic. This seems like a software issue with Studio Pro, not your domain model.