Menu

#182 Crash on Windows when trying to open binary files

medit
open
nobody
None
5
2014-09-12
2014-09-10
plusminus
No

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.

1 Attachments

Discussion

  • Yevgen Muntyan

    Yevgen Muntyan - 2014-09-10

    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?

     
  • plusminus

    plusminus - 2014-09-10

    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.

     
  • Yevgen Muntyan

    Yevgen Muntyan - 2014-09-12

    Thank you, I'll investigate. I guess it goes into an infinite loop because of a zero byte.

     

Log in to post a comment.

MongoDB Logo MongoDB