Slashdot Mirror


C# Memory Leak Torpedoed Princeton's DARPA Chances

nil0lab writes "In a case of 20/20 hindsight, Princeton DARPA Grand Challenge team member Bryan Cattle reflects on how their code failed to forget obstacles it had passed. It was written in Microsoft's C#, which isn't supposed to let you have memory leaks. 'We kept noticing that the computer would begin to bog down after extended periods of driving. This problem was pernicious because it only showed up after 40 minutes to an hour of driving around and collecting obstacles. The computer performance would just gradually slow down until the car just simply stopped responding, usually with the gas pedal down, and would just drive off into the bush until we pulled the plug. We looked through the code on paper, literally line by line, and just couldn't for the life of us imagine what the problem was.'"

15 of 560 comments (clear)

  1. I'll show you mine if you.. by king-manic · · Score: 4, Funny

    I'll show you my perpetual motion machines if you show me your perfect autonomous garbage collector. You go first.

    --
    "There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy."
    1. Re:I'll show you mine if you.. by larry+bagina · · Score: 5, Funny

      Next you'll be telling me that I'm not a nerd and this stuff doesn't matter!!!

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    2. Re:I'll show you mine if you.. by Anonymous Coward · · Score: 1, Funny

      Mine too, they changed the name of the submitter to Roland Piquepaille.

    3. Re:I'll show you mine if you.. by Harald+Paulsen · · Score: 2, Funny

      Or perhaps it is a place where nerds discuss news and stuff that matters.

      --
      Harald
  2. Well, there's your problem! by feepness · · Score: 5, Funny

    We looked through the code on paper, literally line by line, and just couldn't for the life of us imagine what the problem was. This may be the least effective method of debugging in existence.
    1. Re:Well, there's your problem! by johannesg · · Score: 4, Funny

      No no, that would be something along the lines of printing out the code and then throwing darts at the listing to figure out the incorrect line. I hear it is popular in Redmond, although they reputedly use chairs instead of darts.

    2. Re:Well, there's your problem! by maxwell+demon · · Score: 5, Funny

      No no, that would be something along the lines of printing out the code and then throwing darts at the listing to figure out the incorrect line. I hear it is popular in Redmond, although they reputedly use chairs instead of darts. That makes sense: Since chairs are larger than darts, you have a much greater chance to hit the bugs.
      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:Well, there's your problem! by Bill,+Shooter+of+Bul · · Score: 2, Funny

      I have noted that programs of non-trivial size almost always have bugs in them. The secret to writing parallel code, is to create multiple personalities, one for each thread. Then you just emulate the code in you parallel mind, and its easy to see the problem.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    4. Re:Well, there's your problem! by Marcos+Eliziario · · Score: 3, Funny

      Mod myself funny, please.

      --
      Your ad could be here!
  3. Categorization of Resource Management Issues by mr_mischief · · Score: 3, Funny

    This section totals 15 points.

    Background:

    There are more types of resource leaks than just memory leaks. A memory leak is when your program keeps hold of memory it's not using. An object leak is when your program keeps hold of objects it's not using. A file descriptor leak is when your program fails to reuse the descriptors for files it has closed and will not reopen. Many other types of leaks could be considered.

    Exercises:

      1. Determine which issue this scenario describes.
      2. Figure out which issue can be handled by automatic memory management.
      3. Discuss whether, and if so why, the answers to Exercises 1 and 2 mean there is some conceptual discord between the wording of the scenario and the use of the term "memory leak".

  4. Re:Friends do not let Friends use Windows and Driv by Bob54321 · · Score: 4, Funny

    blue screams of death
    Is that a snuff film?
    --
    :(){ :|:& };:
  5. Nothing new here move along....OH Wait? by Anonymous Coward · · Score: 2, Funny

    Just like most windows machines it bogs down and starts crashing after about 40 minutes of hard use.

  6. Re:As a C kernel programmer... by cyber-vandal · · Score: 4, Funny

    That's why there are no memory leaks in C/C++ code [/sarcasm]

  7. Perpetual motion machine vendors by Dr.+Cody · · Score: 4, Funny

    A funny thing happened with during my co-op this summer:

    I was working at a coal-fired power plant which needed a new pollution control device before 2010. There, I would dig through the literature, and try to find suitable products and operating conditions for this device. Anyway, this involved a lot of meetings, conference calls, and business lunches with the suppliers in question.

    Then there was Joe.

    Joe was our Alstom sales rep: portly, humorless, slow to speak and slower to understand. He was also a devote Utahnian.

    Well, one day, we were killing time while waiting on a conference call, my supervisor left the room, and we started talking about universities. Then he dropped the bomb:

    "In my Senior year, I worked on developing perpetual motion machines."

    My supervisor then reentered the room, and we got back to work. I felt like I'd just seen a dancing frog.

  8. Re:Not a C# fault by Anonymous Coward · · Score: 1, Funny

    But I thought C# was supposed to solve all of my memory management problems for me!