Author Topic: B2: File corrupted during multi-file diff  (Read 3107 times)

jnairb

  • Senior Community Member
  • Posts: 224
  • Hero Points: 11
B2: File corrupted during multi-file diff
« on: May 06, 2013, 04:10:49 pm »
I'm not sure what happened, but it happened twice: While doing a multi-file diff, I was examining the differences between two files and towards the end there was a large section (100+ lines) where it just showed all inserted lines + deleted lines as the difference -- the 2nd file had been corrupted so it was mostly just empty lines while the 1st file had what was expected. Both files were open in SlickEdit before doing the diff. I closed the diff, and switched to the 2nd file, and it appeared the same as it was in the diff -- mostly empty lines at the end. I closed the file and reloaded from disk and the file was OK. I repeated the multi-file diff, selected this file pair again, and again saw the same corruption. Closed the diff and reloaded the file from disk and then did a single file diff of the same pair of files. Everything looked OK with that. I proceeded to move some of the diffs from the 2nd file to the 1st file. Now, if I do the multi-file diff, the problem doesn't re-occur.

I'm running with Windows x64 beta 2 on Windows 7. File 1 (all the files in path 1) was R/W. File 2 (and all the files in path 2) were R/O on disk. All files were being accessed through a Samba network share (on AIX server).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2439
  • Hero Points: 137
Re: B2: File corrupted during multi-file diff
« Reply #1 on: May 06, 2013, 04:25:44 pm »
Regular source files?

Were the file corrupted or just the buffers in memory?

I haven't seen anything like this and there haven't been any significant changes to the diff in 18.0.  Did you see anything like this in 17.0?

jnairb

  • Senior Community Member
  • Posts: 224
  • Hero Points: 11
Re: B2: File corrupted during multi-file diff
« Reply #2 on: May 06, 2013, 04:43:05 pm »
Just the buffer was corrupted. The file on disk (in this case) was R/O so I wouldn't have been able to accidentally write the buffer out to the file. I've never seen this in 17.0.

Update: The files were regular (C++) source file.
« Last Edit: May 06, 2013, 04:46:04 pm by jnairb »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2439
  • Hero Points: 137
Re: B2: File corrupted during multi-file diff
« Reply #3 on: May 06, 2013, 04:44:07 pm »
I wonder if it could be a Samba issue.

jnairb

  • Senior Community Member
  • Posts: 224
  • Hero Points: 11
Re: B2: File corrupted during multi-file diff
« Reply #4 on: May 06, 2013, 04:56:49 pm »
When doing a single file diff, there's an option to use the file on disk rather than the buffer. When doing a multi-file diff, does it always compare the files on disk or does it use the buffer if a file is loaded in the buffer? The file was open in SlickEdit prior to starting the multi-file diff. If it uses the file on disk, would that update/replace the currently buffered file? After exiting the diff, the file (buffer) remained corrupted.

If SlickEdit wouldn't have re-read the file from disk, then it doesn't seem likely it would be a Samba issue. If it does re-read the file, then who knows? I know I can't give you much to go on here...

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2439
  • Hero Points: 137
Re: B2: File corrupted during multi-file diff
« Reply #5 on: May 06, 2013, 05:05:42 pm »
It should use the buffer.

Was it the top of the file?  Was it the first difference?

Has this happened again?

jnairb

  • Senior Community Member
  • Posts: 224
  • Hero Points: 11
Re: B2: File corrupted during multi-file diff
« Reply #6 on: May 06, 2013, 05:51:12 pm »
It was at the very end of the file. There were numerous differences before the spot where the buffer was corrupted.

I only saw it just the one time (well, twice with the same pair of files), but not since. But it was just this morning... I'll be watching to see if it happens again.