The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Visual Studio Contradiction

Last post 07-26-2010 7:39 PM by Jaime. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 07-26-2010 12:52 AM

    Visual Studio Contradiction

     

    Occurs randomly, usually fixed by turning it off and on again - I guess I'm old fashioned in thinking that compiling code should be a deterministic process.

  • 07-26-2010 3:07 AM In reply to

    Re: Visual Studio Contradiction

    It sounds like a method is trying to implement an interface method, but has the wrong signature. Something like:

    Interface IWhatever
    Sub Frob(foo as integer)
    End Interface

    Class TheClass
    Implements IWhatever

    Sub MyFrob() Implements IWhatever.Frob
    ' ...
    End Sub
    End Class

    Edit: ... Yup, those those are the exact error messages when you compile the above snippet.

    It's worth noting that this error cannot occurr in C#, since it determines interface implemenations based on the name, not on an additional decoration. If you screw up the signature, it'll assume it's a totally separate method.

  • 07-26-2010 6:36 AM In reply to

    Re: Visual Studio Contradiction

    pkmnfrk:
    It sounds like a method is trying to implement an interface method, but has the wrong signature.

    Except the signature is fine, and it compiles (and runs) most of the time. Just not on Mondays when there's a full moon.


  • 07-26-2010 7:31 AM In reply to

    Re: Visual Studio Contradiction

    shiftyphil:
    Except the signature is fine, and it compiles (and runs) most of the time. Just not on Mondays when there's a full moon.
    I have seen an issue like this before when we had moved from one set of libraries to another. In the change, one of the interfaces changed the signature of one method, so if you compiled with the new libraries you everything was fine but you'd see the errors you're seeing if you compiled with the old libraries.

    Library references are kept in a per-project basis, not a per-solution basis, so what happened to us was that someone had properly configured one project but not the other. So when you compiled the good one you got no error messages, and when you compiled the other one you got these messages, even though the code is exactly the same.
  • 07-26-2010 2:34 PM In reply to

    Re: Visual Studio Contradiction

    shiftyphil:

     

    Occurs randomly, usually fixed by turning it off and on again - I guess I'm old fashioned in thinking that compiling code should be a deterministic process.

    Since the image isn't loading, could someone maybe type the error? Thanks.

    If VS is parallelizing compilation, the error could (potentially) depend in somewhat non-deterministic factors. Maybe? I dunno, just guessing.

      <-  I couldn't make my shit work, so here's a Godzilla head.
  • 07-26-2010 4:31 PM In reply to

    • Shondoit
    • Not Ranked
    • Joined on 11-10-2009
    • Netherlands
    • Posts 32

    Re: Visual Studio Contradiction

    blakeyrat:
    Since the image isn't loading, could someone maybe type the error? Thanks.
    Error, Line 221: Class 'MyTask' must implement 'Event PropertyChanged(sender As Object, e as PropertyChangedEventArgs)'
    for interface 'System.ComponentModel.INotifyPropertyChanged'.

    Error, Line 223: 'PropertyChanged' cannot implement 'PropertyChanged' because there is no matching event on interface
    'System.ComponentModel.INotifyPropertyChanged'.
  • 07-26-2010 6:44 PM In reply to

    Re: Visual Studio Contradiction

    blakeyrat:
    If VS is parallelizing compilation, the error could (potentially) depend in somewhat non-deterministic factors. Maybe? I dunno, just guessing.

    Most likely it's just running out of memory (or more correctly, address space). Quitting and reoping it works, but Clean All/Rebuild All doesn't.

    Usually manifests itself as a "Not enough storage is available to complete this operation," but sometimes it just goes for random.

     (Code is a 3 form access database frontend that has grown to 200 forms, 400 tables etc).

  • 07-26-2010 7:39 PM In reply to

    Re: Visual Studio Contradiction

    I've seen things like this happen when a debugging session leaves a file locked.  It seems some file access errors fail silently and you end up with a mixture of old and new binaries.

Page 1 of 1 (8 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems