Author Topic: Slickedit not resizing files correctly over gvfs smb mount  (Read 8555 times)

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Slickedit not resizing files correctly over gvfs smb mount
« on: September 07, 2010, 02:33:09 PM »
Sometimes, when I save a source (.c) files, using slickedit over a gvfs-smb, the file is not truncated on the server correctly.  That is if I delete 30 characters from the file, save it, I get a compiler error on a line that doesn't exist.  If I edit, with vi, the file on directly on the server, then I see the garbage data at the end of the file.  I remove the data, save it, and reload the file into slickedit; Compile then goes through.

I have my slickedit files on the local machine.

I tried using gedit to reproduce the problem, but I was unsuccessful.

Example of the end of file after a deleted 3 characters:
#endif
dif

As you can, it left behind the "dif" from #endif.

System information:
Linux  2.6.34.6-47.fc13.i686.PAE #1 SMP Fri Aug 27 09:29:49 UTC 2010 i686 i686 i386 GNU/Linux
[root@ mnt]# yum info gvfs
Loaded plugins: refresh-packagekit
Installed Packages
Name        : gvfs
Arch        : i686
Version     : 1.6.2
Release     : 1.fc13
Size        : 4.9 M
Repo        : installed
From repo   : updates
Summary     : Backends for the gio framework in GLib
URL         : http://www.gtk.org
License     : LGPLv2+
Description : The gvfs package provides backend implementations for the gio
            : framework in GLib. It includes ftp, sftp, cifs.

[root@ mnt]# yum info gvfs-smb
Loaded plugins: refresh-packagekit
Installed Packages
Name        : gvfs-smb
Arch        : i686
Version     : 1.6.2
Release     : 1.fc13
Size        : 308 k
Repo        : installed
From repo   : updates
Summary     : Windows fileshare support for gvfs
URL         : http://www.gtk.org
License     : LGPLv2+
Description : This package provides support for reading and writing files on windows
            : shares (SMB) to applications using gvfs.


gvfs-info:
edit name: /
name: /
type: directory
size:  0
attributes:
  standard::type: 2
  standard::name: /
  standard::display-name: xxxxx on yyyyy
  standard::edit-name: /
  standard::icon: folder-remote
  standard::content-type: inode/directory
  standard::size: 0
  etag::value: 1283868862
  id::filesystem: smb-share:server=yyyyy,share=xxxxx,user=xxxxx
  time::modified: 1283868862
  time::modified-usec: 0
  time::access: 1283821529
  time::access-usec: 0
  time::changed: 1283868862
  time::changed-usec: 0
  unix::device: 26586
  unix::inode: 263698
  metadata::annotation:
  metadata::nautilus-icon-view-auto-layout: true
  metadata::nautilus-icon-view-tighter-layout: false
  metadata::nautilus-window-geometry: 648x439+608+518
  metadata::nautilus-window-scroll-position: smb://xxxxx@yyyyy/xxxxx/Desktop


Slickedit About:
SlickEdit Version 15.0.1.3

Serial number: VLX927288
Licensed number of users: Single user
License file: /opt/slickedit/bin/slickedit.lic

Build Date: August 04, 2010
Emulation: Visual Studio

OS: Linux
OS Version: Fedora release 13 (Goddard)
Kernel Level: 2.6.34.6-47.fc13.i686.PAE
Build Version: #1 SMP Fri Aug 27 09:29:49 UTC 2010
Processor Architecture: i686

X Server Vendor: Fedora Project
Memory: 82% Load, 1233MB/1499MB Virtual
Shell Info: /opt/slickedit/bin/secsh -i
Screen Size: 3600 x 1080

Project Type: Gnuc
Language: .c (C/C++)

Installation Directory: /opt/slickedit/


PS: I used to use the mount cifs which never showed this problem in se15, but se15 stopped showing me the mount point in the file browser window one day last week.  I tried restarting the client and sever.  No go.  But this is a different issue.  And all this, after I was forced to recently upgrade because se14 was broken on fedora 13.
 
What a pain!

Thanks.
« Last Edit: September 07, 2010, 02:46:15 PM by millerkp »

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #1 on: September 07, 2010, 03:44:57 PM »
I take back the "sometime".  This happens always when the file shrinks.  Maybe an EOF problem?  gedit over the gvfs works fine.  Does slickedit have some strange way of opening/saving files?

filesizetest.txt:
1
2
3
4
5
6
7
7
8
9
0

After deleting the first three lines, filesizetest.txt:
4
5
6
7
7
8
9
0
8
9
0

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #2 on: September 08, 2010, 03:44:25 PM »
Thank you for reporting this.  Unfortunately, I was unable to reproduce this problem.  I tried connecting to both a Windows share on a Win7 machine and a Samba export on a Linux box.  I connected through Nautilus.  How did you establish your connections?  Granted, I did not use Fedora 13 as you are, and my Ubuntu box has version 1.6.1, not 1.6.2.

Before I go any further, please let me know if there is something specific to your setup that would help me recreate this problem.  Are the clocks out of sync etc?

Thank you,

-David-

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #3 on: September 08, 2010, 04:20:32 PM »
NTP is running on both the server and the client,  they are within a few milliseconds of each other.
 
Samba server:
Linux 2.6.32.21-166.fc12.i686.PAE #1 SMP Fri Aug 27 06:33:34 UTC 2010 i686 i686 i386 GNU/Linux

Installed Packages
Name        : samba
Arch        : i686
Version     : 3.4.8
Release     : 59.fc12
Size        : 14 M
Repo        : installed
From repo   : updates
Summary     : Server and Client software to interoperate with Windows machines
URL         : http://www.samba.org/
License     : GPLv3+ and LGPLv3+
Description :
            : Samba is the suite of programs by which a lot of PC-related machines
            : share files, printers, and other information (such as lists of
            : available files and printers). The Windows NT, OS/2, and Linux
            : operating systems support this natively, and add-on packages can
            : enable the same thing for DOS, Windows, VMS, UNIX of all kinds, MVS,
            : and more. This package provides an SMB/CIFS server that can be used to
            : provide network services to SMB/CIFS clients.
            : Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT
            : need the NetBEUI (Microsoft Raw NetBIOS frame) protocol.



I have another server running FC9 that shows the same problem.

Linux  2.6.27.25-78.2.56.fc9.i686.PAE #1 SMP Thu Jun 18 12:36:07 EDT 2009 i686 i686 i386 GNU/Linux

Installed Packages
Name       : samba
Arch       : i386
Version    : 3.2.11
Release    : 0.28.fc9
Size       : 11 M
Repo       : installed
Summary    : The Samba Suite of programs
URL        : http://www.samba.org/
License    : GPLv3+ and LGPLv3+
Description:
           : Samba is the suite of programs by which a lot of PC-related machines
           : share files, printers, and other information (such as lists of
           : available files and printers). The Windows NT, OS/2, and Linux
           : operating systems support this natively, and add-on packages can
           : enable the same thing for DOS, Windows, VMS, UNIX of all kinds, MVS,
           : and more. This package provides an SMB/CIFS server that can be used to
           : provide network services to SMB/CIFS clients.
           : Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT
           : need the NetBEUI (Microsoft Raw NetBIOS frame) protocol.

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #4 on: September 08, 2010, 05:46:23 PM »
I have attached a wireshark of the problem.  The first one is the write of the short file from slickedit.  The last is the write of the short file in gedit.  The ones in between are reads from gedit.  It seems that slickedit is having trouble deleting the file for some reason.  I will have to look at it some more when I have time.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #5 on: September 10, 2010, 03:00:27 PM »
Some NFS servers don’t support the Win32 SetEndOfFile() function. SlickEdit tries to check if the destination is NFS but it sounds like this check failed. I think the –s3 invocation option might fix this problem. Try "vs -se" and see if it works.

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #6 on: September 10, 2010, 05:22:22 PM »
Neiter "vs -se" or "vs -s3" seems to change the nature of the problem.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #7 on: September 10, 2010, 07:21:54 PM »
Hmm...we'll have to look into this some more. We'll check into this further and get back to you.

millerkp

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #8 on: September 11, 2010, 05:10:44 AM »
Just for the fun of it.  I installed 15.0.1.3 on another fedora 13 system.  Same problem.

Here is where it get's a little more interesting...  I installed slickedit on a fedora 12 system, no more problem...  Sigh...  Unfortunately, I can't do any development on the fedora 12 based system.

Fedora 12 System:
Linux 2.6.32.21-166.fc12.i686.PAE #1 SMP Fri Aug 27 06:33:34 UTC 2010 i686 i686 i386 GNU/Linux

Loaded plugins: refresh-packagekit
Installed Packages
Name        : gvfs-smb
Arch        : i686
Version     : 1.4.3
Release     : 7.fc12
Size        : 307 k
Repo        : installed
From repo   : anaconda-InstallationRepo-200911081854.i386
Summary     : Windows fileshare support for gvfs
URL         : http://www.gtk.org
License     : LGPLv2+
Description : This package provides support for reading and writing files on windows
            : shares (SMB) to applications using gvfs.

Name        : gvfs
Arch        : i686
Version     : 1.4.3
Release     : 7.fc12
Size        : 4.7 M
Repo        : installed
From repo   : anaconda-InstallationRepo-200911081854.i386
Summary     : Backends for the gio framework in GLib
URL         : http://www.gtk.org
License     : LGPLv2+
Description : The gvfs package provides backend implementations for the gio
            : framework in GLib. It includes ftp, sftp, cifs.


I wonder what changed between in gvfs-smb 1.4.3 and 1.6.2.

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #9 on: October 11, 2010, 01:27:17 PM »
This seems to be a Fedora 13 problem.  I was able to recreate your problem only on Fedora 13.  It doesn't happen on the latest Ubuntu.  Try compiling this test program.
Code: [Select]
#include <fcntl.h>

int main (int argc, char *argv[])
{
    open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 420);
    return(0);
}

Run it with the name of a file.  It should open it with truncation, close it, and leave just a zero byte file.

This works correctly on both Ubuntu and Fedora 13 with a file on a local file system or on an NFS drive.  However, when giving it the name of a file on a gvfs mount, it does not truncate on Fedora 13.  The file is unaltered.  It does work on Ubuntu.

If this problem persists in Fedora, we may look into trying to work around it.  Fedora 14, which is scheduled for early Nov. release, should ship with gvfs 1.6.3.  We'll see if the truncate problem persists there before deciding what to do.

Thank you for bringing this to our attention.

« Last Edit: October 11, 2010, 05:28:34 PM by David_O »

David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: Slickedit not resizing files correctly over gvfs smb mount
« Reply #10 on: October 11, 2010, 07:45:17 PM »
I have an update to the last post.  It looks like working around this bug in Fedora 13 is not too difficult.  We're testing a solution now and it should be included as part of the next release.

Thank you