I checked the dump file and this is a known issue. It is failing inside the Microsoft framework where it gets the DC of the window, which normally does not fail, so the error is not handled properly and raises an exception.
I have considered the possibility of taking action before, but unfortunately I am unable to do anything about it inside the Microsoft framework.