SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: seuser4909 on April 09, 2009, 03:31:41 PM

Title: "Expand tabs to spaces" butchering file
Post by: seuser4909 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.



Title: Re: "Expand tabs to spaces" butchering file
Post by: Dan on April 09, 2009, 04:04:08 PM
Please check PMs for an email address.
Title: Re: "Expand tabs to spaces" butchering file
Post by: seuser4909 on April 09, 2009, 04:34:48 PM
Sent.  Thanks.
Title: Re: "Expand tabs to spaces" butchering file
Post by: Dan on April 09, 2009, 08:22:58 PM
I couldn't reproduce it with the file you sent.

Title: Re: "Expand tabs to spaces" butchering file
Post by: seuser4909 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.
Title: Re: "Expand tabs to spaces" butchering file
Post by: Dan on April 13, 2009, 11:53:19 AM
Were these files obfuscated before or after the save?
Title: Re: "Expand tabs to spaces" butchering file
Post by: seuser4909 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.
Title: Re: "Expand tabs to spaces" butchering file
Post by: Clark 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.
Title: Re: "Expand tabs to spaces" butchering file
Post by: seuser4909 on April 13, 2009, 05:06:57 PM
Great news!  Thanks, guys.
Title: Re: "Expand tabs to spaces" butchering file
Post by: Clark 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.
Title: Re: "Expand tabs to spaces" butchering file
Post by: buggyfunbunny 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?
Title: Re: "Expand tabs to spaces" butchering file
Post by: Clark 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.
Title: Re: "Expand tabs to spaces" butchering file
Post by: Phil Barila 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?
Title: Re: "Expand tabs to spaces" butchering file
Post by: Clark 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).
Title: Re: "Expand tabs to spaces" butchering file
Post by: seuser4909 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.