Repeated error message "Parameter not valid"

Hello, this is my first question to the community and I hope you guys can help :)

I recently started getting an error message saying "Parameter is not valid" whenever I get towards the end of a file (i.e. the bottom of the Editor window).

I keep getting the same error message regardless of the file format, the TM or the options I use. The whole editor freezes and I am unable to type anything in any of the segments, so I have to save, close and re-open the document to finish it. The message itself does not give me any other info, perhaps you know what it means or have experienced something similar?