Tech Off Thread

12 posts

VS loses parts of my code

Back to Forum: Tech Off
  • qwert231

    Lately, I've been getting issues where a .vb file that isn't even open, loses chunks of itself.

     

    For instance, just now, the bottom 5 lines of code were replaced with square boxes, the kind you would see in place of line feeds when you open a text document in the wrong viewer.

     

    Sometimes it's more than 5 lines... I've had the whole half of a form get wiped out. Thankfully, I use Source Safe and it didn't have any changes lost, but I'd hate to lose something I was working on.

  • vesuvius

    Something must have changed on your machine. Software either works badly from the start or it works well, and something [or things] alter the behavior. The can also be proven by work colleagues using the same build of Visual Studio without issue.

     

    What OS and Visual Studio version are you using?

  • qwert231

    vesuvius said:

    Something must have changed on your machine. Software either works badly from the start or it works well, and something [or things] alter the behavior. The can also be proven by work colleagues using the same build of Visual Studio without issue.

     

    What OS and Visual Studio version are you using?

    Win XP Pro, VS 2008. The project is .Net 2.0.

     

    No other Devs here doing what I do, or using VS 2008. I'm a lone wolf!

  • turrican

    Maybe a virus? but that one sounds unlikely.

     

    You might be looking at a faulty drive here if your files get corrupted when you don't even open them? Sounds strange for sure. I would do a full CHKDSK on the disk or something. I don't like the sound of your situation at all, scary stuff to lose code.

  • W3bbo

    When you reported those boxes (used as a placeholder for unrenderable characters) I wondered if it might be bad file encoding (consistent line endings?) but now I can't shake off the feeling you've got a dying HDD on your hands.

  • hyveedoughb​oy

    qwert231 said:
    vesuvius said:
    *snip*

    Win XP Pro, VS 2008. The project is .Net 2.0.

     

    No other Devs here doing what I do, or using VS 2008. I'm a lone wolf!

    You're not alone. I see this occasionally on my machine as well.   When I was using VS 2003, I would see this probably once every week.  When I moved up to VS 2005, I didn't see the garbage-character issue anymore, however, I still occasionally see issues where my code blocks "disappear".

     

    One workaround (for both issues) I've found is to turn out "Outlining" in the code.  Whenever the problem occurs, the "+\-" box for the outlining still shows up correctly, and I could always collapse and then expand the code, and it would fix itself.

     

    It seems that the data behind the text was always still there, however, the display of the text was just somehow corrupted.

     

    I never could figure out any pattern to causing the problem...

  • itsnotabug

    here's a stretch... do you have any desktop publishing apps installed on that machine? i've seen strange font conflicts happen, but never in the ide... only in the layout app after adobe or corel decided to install their own version of fonts. the fonts don't even have to be the same name. i think if, by chance, they share an id number you get garbage renders or courier (default). it's a big problem in the publishing industry because there are a ton of foundries releasing their own versions of fonts.

  • qwert231

    W3bbo said:

    When you reported those boxes (used as a placeholder for unrenderable characters) I wondered if it might be bad file encoding (consistent line endings?) but now I can't shake off the feeling you've got a dying HDD on your hands.

    I have gotten file encoding issues. At times, I'll try to us VSS to compare my checked out code to the previous version, on a .vb or .cs file, and get 'Binary Files Differ'. !!! Not sure why it happens some times and not others.

  • Ion Todirel

    qwert231 said:
    vesuvius said:
    *snip*

    Win XP Pro, VS 2008. The project is .Net 2.0.

     

    No other Devs here doing what I do, or using VS 2008. I'm a lone wolf!

    nevermind

  • qwert231

    Still happening.

    Screen shot

     

    http://picasaweb.google.com/lh/photo/1XVPTWNkWl7mRveVP4ac5Q?feat=directlink

    This happens in VB files, C# files, RDLC files... These are source-safed files. The might be checked in... marked as checked in... and still this happens to them. When you do a compare, you get the message 'Binary Files Differ'. If you view the most recent copy in Source Safe, you see a full file, but the copy that hasn't been changed since it was checked in has these characters.

     

    WHAT GIVES?!?!?!?!?!

    If it happens to .VB or .CS files, it gets caught during compile, but not the report files. THose could go out to a customer messed up and you don't know until you hit that report. (Or go out to QA.)

  • spivonious

    I have not seen this issue, but we're using a different source control (MKS Integrity). Do the files open fine in other programs? Does it only happen on your machine?

  • blowdart

    SourceSafe? Really? It's kinda, well, it has a habit of corruption. You may want to look at switching to something, anything else. I'm not even suggesting TFS here. There's a best practice document on how to reduce corruption.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.