8

Below is what I get shortly before VS Debugger crashes. When i don't have the debugger view it, it throws a segfault in the set function. The debugger has been working all day, on this same stuff too. Any ideas?

Visual Studio Debug Session

Object i am viewing:

[DataContract]
public class SvnUrl
{

    public string _type;
    public string _acronym;
    public string _location;
    public string _url;
    public int _foundstatus;

    [DataMember]
    public string type
    {
        get { return _type; }
        set { _type = value; }
    }
    [DataMember]
    public string acronym
    {
        get { return _acronym; }
        set { _acronym = value; }
    }
    [DataMember]
    public string location
    {
        get { return _location; }
        set { _location = value; }
    }
    [DataMember]
    public string url
    {
        get { return _url; }
        set { _url = value; }
    }
    [DataMember]
    public int foundstatus
    {
        get { return _foundstatus; }
        set { _foundstatus = value; }
    }
}
Chris
  • 4,425
  • 5
  • 34
  • 49
  • 2
    After a really long night of coding i had a similar problem with visual studio. Of course when i figured out what it was, it was my fault. I had a property which calls the property again, while implementing CollectionBase, which causes an infinite loop. So i would say, double check all your properties and all side effects. – dowhilefor Nov 10 '11 at 01:21
  • 2
    try restarting vs? also, as an aside, is there any reason you aren't using auto properties? – saus Nov 10 '11 at 02:55
  • Can you please show the `setFunction` method? The code you have show doesn't make much sense. –  Nov 10 '11 at 01:15
  • Try ordering your `[DataMember]`'s maybe? I had a similar issue that I seem to recall was fixed by using the `Order` property – Alastair Pitts Nov 10 '11 at 04:14
  • @user1026857, this is essentially the entire function, aside from the class declaration and includes. – Chris Nov 10 '11 at 14:23
  • @saus, No clue what auto properties are, i'm just kind of maintaining some c# code. Ill look them up. – Chris Nov 10 '11 at 14:24

1 Answers1

3

Are you sure you typed the example identical to your code and you don't really have get { return location; } in that location property (note the missing _ thus recursing infinitely)?

Hans Kesting
  • 38,117
  • 9
  • 79
  • 111
  • i did at one point, but after it was fixed and vs was restarted, it didn't fix anything. Im going to try again this morning. – Chris Nov 10 '11 at 14:21
  • Alright, i think you nailed it. My environment must not have been building the new code. Ive been having a problem with that. The fix was to fix the infinite recursion, check into my scm, delete all my local files, re checkout. – Chris Nov 11 '11 at 16:36