Kate truncates files loaded from samba share

Bug #1222915 reported by Kevin Rogers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kate (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is a rather weird problem and I'm not 100% certain if it's a Kate, Kwrite or Samba problem.

When loading some CSV files from a Samba share, the file appears truncated. Loading the file with LibreOffice Calc, Calligra Calc, Okteta or less shows the entire file contents. The issue is repeatable, in that reloading the same file results in a file that is truncated in Kate or Kwrite at the same point. Kate or Kwrite exhibit the same behaviour, truncating the same files at the same point - neither shows any errors.

The only thing I've managed to identify is that the truncation seems to happen at some multiple of 16-bytes - this is based on viewing the files in Okteta, with 16 bytes per line. One file was truncated at 256kB and the other at 1MB.

Copying the file from the Samba share to a local hard drive using Dolphin, then opening worked just fine.

I'm running Ubuntu 13.04, Kwrite 4.10.5, Kate 3.10.5, KDE 4.10.5, Kate Part 3.7. The Samba server is Ubuntu 12.04 LTS.

The same truncation issue appears on two other Ubuntu 13.04 boxes.

One of the files we're having trouble with was a 1234794 byte CSV file. So, as a test, I created a 1234794 byte file on our Samba server using the following:

tr -dc "A-Za-z0-9\n" < /dev/urandom | head -c 1234795 > random.txt

When opening this file in Kwrite, the file only contains 1048576 bytes (i.e. 1MB).

If I create a file twice the size, i.e. 2469588 bytes, the file opens perfectly.

I've done some mind-numbing repetition to identify that:

* A file of 1179589 - 1179620 bytes will not open at all. Kwrite appears to hang.
* A file of 1179588 bytes or less seems to open fine.
* A file of 1179621 bytes or more seems to be truncated.

It seems that there is something magical about that 31 byte range that causes problems with editors based on Kate Part if files of that size are located on a Samba share.

Right now, I'm not sure if I can do much more to identify the problem - let me know if I can.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.