After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645038 - comparing a file that is missing a final newline causes hang
comparing a file that is missing a final newline causes hang
Status: RESOLVED DUPLICATE of bug 638314
Product: meld
Classification: Other
Component: filediff
1.5.x
Other Windows
: Normal major
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-17 15:38 UTC by Jonathan Engdahl
Modified: 2011-03-17 23:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This file is missing a final NL (257 bytes, text/plain)
2011-03-17 15:38 UTC, Jonathan Engdahl
Details
This file has a final newline (231 bytes, text/plain)
2011-03-17 15:40 UTC, Jonathan Engdahl
Details

Description Jonathan Engdahl 2011-03-17 15:38:50 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):
  • File "c:\meld\meld-1.5.0\meld\meldapp.py", line 267 in on_idle
    ret = self.scheduler.iteration()
  • File "c:\meld\meld-1.5.0\meld\task.py", line 130 in iteration
    ret = task()
  • File "c:\meld\meld-1.5.0\meld\task.py", line 103 in __call__
    r = self.iteration()
  • File "c:\meld\meld-1.5.0\meld\task.py", line 130 in iteration
    ret = task()
  • File "c:\meld\meld-1.5.0\meld\filediff.py", line 937 in _set_files_internal
    for i in self._diff_files(files):
  • File "c:\meld\meld-1.5.0\meld\filediff.py", line 916 in _diff_files
    while step.next() is None:
  • File "c:\meld\meld-1.5.0\meld\diffutil.py", line 441 in set_sequences_iter
    while work.next() is None:
  • File "c:\meld\meld-1.5.0\meld\matchers.py", line 190 in initialise
    a, b = self.preprocess()
  • File "c:\meld\meld-1.5.0\meld\matchers.py", line 110 in preprocess
    for newline in b:
  • File "c:\meld\meld-1.5.0\meld\filediff.py", line 120 in __getitem__
    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
Comment 1 Jonathan Engdahl 2011-03-17 15:40:05 UTC
Created attachment 183642 [details]
This file has a final newline
Comment 2 Jonathan Engdahl 2011-03-17 15:46:49 UTC
I only got the traceback after I hit ^C.
Comment 3 Jonathan Engdahl 2011-03-17 15:57:11 UTC
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).
Comment 4 Kai Willadsen 2011-03-17 23:11:14 UTC
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 ***