What’s the exact error message? (there should be some numbers there)

Does it happen every time when you close it?