GNOME Bugzilla – Bug 652607
hangs when binary file is opened
Last modified: 2012-08-01 10:53:16 UTC
Gedit hangs when binary file is opened. That haven't happened older versions. I have Fedora 15 x86_64, Gedit version 3.0.2.
Actually it does not hang, it only does take very long time to detect file is binary and during that time it consumes a lot of CPU. Following debug is printed: (gedit:2044): PkGtkModule-DEBUG: InstallFontconfigResources method invoked Could you optimize that, something like it have been earlier? It is *much* too slow now.
> it only does take very long time What does that exactly mean? ("very long" is subjective) And how big is the file that you wanted to open?
yeah... the problem of this is that we don't really know when to stop, we should make some rule that if the file has too many invalid chars we should stop loading it and ask the user if he wants to really load a binary file.
Created attachment 195332 [details] example of problematic file Attaching a log file that makes gedit 2.30.4 choke. Fwiw, line 60 seems to contain a null byte.
Created attachment 203286 [details] Sample file to reproduce the bug IMHO, it's a severe bug. Even with a small file (see the attached sample of 249.8Kb), I can wait several minutes and gedit is still freezing and eating 100% CPU, so I must kill it in a terminal.
Marking as duplicate of bug 676526 which has a developer comment. *** This bug has been marked as a duplicate of bug 676526 ***