Crash on Windows when trying to open binary files
Brought to you by:
emuntyan
If I try to open a binary file in medit on Linux, it works fine. Non-printable characters are displayed as unicode control characters, and normal characters display properly.
If I try to open the same file in medit on Windows, I get what looks like a dialog box popping up, but not responding. The main window also doesn't respond. Clicking close on the dialog box closes medit entirely. A single 0x00 character in a document is enough to cause this.
Using medit 1.2.0 on Windows XP-SP3.
100M file freezes medit for half a minute here, and then it shows the dialog saying it couldn't figure out the character encoding. Small files are fast. Is it what you see, i.e. does the file size matter?
Nope, a 6-byte file did not open after 1 hour.
Further tests suggest that only files with a 0x00 character cause the lock-up. Opening a binary file in a hex editor and replacing all 0x00 with another character, then saving and opening it in medit seems to work fine for me.
Using a rather old computer (Athlon XP 2400, no SSE2 support) in case that matters.
Thank you, I'll investigate. I guess it goes into an infinite loop because of a zero byte.