Author Topic: "Expand tabs to spaces" butchering file  (Read 10858 times)

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
"Expand tabs to spaces" butchering file
« on: April 09, 2009, 03:31:41 pm »
SlickEdit Version 14.0.0.7

With Options->Save->Expand tabs to spaces set to true, I have a large file that random characters get changed to spaces.

All I have to do is load this one file into slickedit and click save with that option on and when I diff the original (pre save) to the new file (post save) you'll see random characters changed to spaces.

I have an example file for you but it's too big to attach here.  Is there an email address I can send to?

Needless to say I'm hesitant to use this option until this is fixed.




Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1959
  • Hero Points: 81
Re: "Expand tabs to spaces" butchering file
« Reply #1 on: April 09, 2009, 04:04:08 pm »
Please check PMs for an email address.

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: "Expand tabs to spaces" butchering file
« Reply #2 on: April 09, 2009, 04:34:48 pm »
Sent.  Thanks.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1959
  • Hero Points: 81
Re: "Expand tabs to spaces" butchering file
« Reply #3 on: April 09, 2009, 08:22:58 pm »
I couldn't reproduce it with the file you sent.

  • Can you reproduce it?
  • Does it affect the file the same way consistently?
  • Can you send me the affected file?
  • What other options do you have set?
  • Can you reproduce it with a clean configuration?  From the slickedit directory run "win\vs +new -sc <newPath>".  Then only change the one option.

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: "Expand tabs to spaces" butchering file
« Reply #4 on: April 09, 2009, 08:48:45 pm »
I replied to your email.  I tried that trick with the clean settings and still got it to repoduce.  When the startup wizard came up I just clicked finish.  Then I went to the options File Options->Save and enabled expand tabs to spaces.  Loaded up a copy of the original file I sent, clicked save, diff'd them and saw 9 unintended differences.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1959
  • Hero Points: 81
Re: "Expand tabs to spaces" butchering file
« Reply #5 on: April 13, 2009, 11:53:19 am »
Were these files obfuscated before or after the save?

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: "Expand tabs to spaces" butchering file
« Reply #6 on: April 13, 2009, 01:11:40 pm »
Before.  I took the file that was causing me problems and obfuscated it.  I get the same results with the obfuscated file.
« Last Edit: April 13, 2009, 01:13:25 pm by seuser4909 »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4035
  • Hero Points: 269
Re: "Expand tabs to spaces" butchering file
« Reply #7 on: April 13, 2009, 04:02:09 pm »
I have reproduced the problem.  I suspect this has something to do with your file being larger than the cache size.  I'll get this fixed ASAP.

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: "Expand tabs to spaces" butchering file
« Reply #8 on: April 13, 2009, 05:06:57 pm »
Great news!  Thanks, guys.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4035
  • Hero Points: 269
Re: "Expand tabs to spaces" butchering file
« Reply #9 on: April 13, 2009, 05:17:40 pm »
This problem had nothing to do with caching.  It was a p>pend which needed to be p>=pend.  To reproduce the problem you need a file with the right block caching condition so that we think we found a tab when we read past the end of the block data! Oops  ;D  Contact support and we'll get you a new binary for this.  In the meantime I recommend not expanding tabs when saving a file.

buggyfunbunny

  • Senior Community Member
  • Posts: 234
  • Hero Points: 4
Re: "Expand tabs to spaces" butchering file
« Reply #10 on: April 13, 2009, 05:52:49 pm »
  In the meantime I recommend not expanding tabs when saving a file.

Is this an artefact of his particular file?  Or should this recommendation be made to all users?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4035
  • Hero Points: 269
Re: "Expand tabs to spaces" butchering file
« Reply #11 on: April 13, 2009, 06:07:03 pm »
I still recommend turning it off or getting a new binary.  This maybe a very old grey haired bug but it could happen on somewhat small files too if a lot of other buffers are loaded. It's much more likely to happen with a large file.

Phil Barila

  • Senior Community Member
  • Posts: 746
  • Hero Points: 61
Re: "Expand tabs to spaces" butchering file
« Reply #12 on: April 13, 2009, 07:57:05 pm »
I've never noticed an issue with "Expand Tabs to spaces" on Load, instead of on Save.  Is this just a bug in the Save path?  Or is it lurking in the Load path, too?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4035
  • Hero Points: 269
Re: "Expand tabs to spaces" butchering file
« Reply #13 on: April 14, 2009, 01:46:19 pm »
The load code is totally different.  One work around for the expand tabs save bug is to make your buffer cache size large enough that swapping does not occur during a save. To achieve this the SlickEdit buffer cache ends up needed to be A LOT larger than the physical size of all buffers.  The acid test is to make sure a spill file is never created.  To check if a spill file is being created go to Help>About and make sure no Spill File is listed near the bottom of the Program Information.  For this test case which resulted in a ~8 meg file, I needed a cache size of ~24 meg (although I didn't try hard to see exactly what cache size I needed).

seuser4909

  • Community Member
  • Posts: 7
  • Hero Points: 0
Re: "Expand tabs to spaces" butchering file
« Reply #14 on: May 21, 2009, 01:51:35 pm »
Just want to chime in and say that this is fixed in 14.0.1

Thank you.