Results 1 to 2 of 2

Thread: Debugging Problems

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Debugging Problems

    I have two debugging issues and I'm not sure what I did to make them occur:

    1) I get an "Unable to set the next statement to this location" error when I try to set a new line.

    2) Some of my objects don't return their member variable values. I get a "Cannot evaluate expression because we are stopped in a place where garbage collection is impossible, possibly because the code of the current method may be optimized" error when I hover over them or try to expand the object into tree mode.

    These two problems must be related. I did a lot of searching about managed code and just-in time debugging but nothing I tried did the trick (even unmanaged code had these errors).

    What the heck did I screw up to make this happen?

    Thanx!

    edit: After some more research it seems that #1 only occurs in one specific function (naturally, a very important and large one). This function is located in a module. Problem #2 occurs in all areas of my project.
    Last edited by neef; Dec 28th, 2011 at 05:01 PM.
    Intermediate Level Programmer Extraordinaire

  2. #2

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Re: Debugging Problems

    I figured this problem out on my own, mostly out of sheer desperation.

    In the function where the issues were occurring I erased every line of code except two. When I reached the the code through the debugger I could switch lines no problem. At that point I started erasing different chunks of code trying to find out what was causing the problem. Eventually I narrowed it down to one line.

    Code:
            Dim StoredPlay = New CLStoredPlay(OffTeam.TeamIndex, DefTeam.TeamIndex, BallHandlerList, YardsGained, PlayerRatings, x_Yard, y_Yard, BallLocationListX, BallLocationListY, RushAttempt, RushingYards, RushingFirstDown, TD, PassingAttempt, PassingYards,
                PassingINT, Completion, PassCatch, ReceivingYards, ReceivingFirstDown, Drop, PancakeBlocks, QBSaves, ManHandled, QBMauled, CutBlocks, Tackler, Assister, Sacker, HalfSacker, PassDefenser, QBPressure, QBHit, INT, Safety, ForcedFumbles,
                FumblesRecovered, Fumblers, FumblesLost, Penalty, PenaltyType, PenaltyYards, KickReturner, KickReturnYards, PuntReturner, PuntReturnYards, FieldGoalAttempt, FieldGoal, FieldGoalYards, PATAttempt, PAT, Punter, PuntYards,
                Touchback, BlockedFG, BlockedPunt, FairCatch, Tipped, TurnO, ClockOnTimeIndex, ClockOffTimeIndex, PreSnapDelay, ClockOn, InsideTwenty, OffPlayCategory, Plays(DefPlayIndex).PlayCategory)
    This line stores all the events of the football play that had just been created. I did some research and found an article that explained that if you pass along too much information in one function the debugger might get overloaded. When I erased this line both debug issues cleared up right on the spot!

    Now I need to chunk this info better and create my StoredPlay object more efficiently. I'll leave that for tomorrow.

    Scary sh&t when everything breaks down and you don't understand why.

    If any of the pros here wants to elaborate what I experienced it might help others in the future.
    Intermediate Level Programmer Extraordinaire

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width