GNOME Bugzilla – Bug 645038
comparing a file that is missing a final newline causes hang
Last modified: 2011-03-17 23:11:14 UTC
Created attachment 183641 [details] This file is missing a final NL Comparing two files, one or more of which is missing a final newline, causes meld to hand. Here is the traceback: Traceback (most recent call last):
+ Trace 226354
ret = self.scheduler.iteration()
ret = task()
r = self.iteration()
for i in self._diff_files(files):
while step.next() is None:
while work.next() is None:
a, b = self.preprocess()
for newline in b:
if not line_end.ends_line(): KeyboardInterrupt
Platform is Windows XP. Cygwin is installed. Meld 1.5.0 was installed using instructions here: http://live.gnome.org/Meld/Windows Meld: 1.5.0 Python 2.6.6 pygtk-all-in-one-2.22.6.win32-py2.6 I'll try to attach two files that demonstrate the problem
Created attachment 183642 [details] This file has a final newline
I only got the traceback after I hit ^C.
I did make one change to the meld 1.5.0 that I am using: --- C:\meld\meld-1.5.0-dist\meld\meldapp.py +++ C:\meld\meld-1.5.0\meld\meldapp.py @@ -214,6 +214,7 @@ self.widget.set_default_size(self.prefs.window_size_x, self.prefs.window_size_y) self.ui.ensure_update() self.widget.show() + self.widget.maximize(); self.diff_handler = None self.widget.connect('focus_in_event', self.on_focus_change) self.widget.connect('focus_out_event', self.on_focus_change) This causes meld to open its window maximized. Under Windows, by default the window opens partly off the screen. I will file a separate bug report for this. (I do not know Python or GTK -- this was just a shot in the dark, but it seemed to work).
Thanks for taking the time to report this bug. This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. *** This bug has been marked as a duplicate of bug 638314 ***