Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 40

Thread: Analyzing a Dump

  1. #1
    Basic Member
    Join Date
    Dec 2016
    Posts
    598

    Analyzing a Dump

    Is there a way for us to do this without bothering @ChrisC?

    I don't want to bother the devs if it is my own fault and not a game issue, but I do not know how to tell as I am not sure if the crash that happens to me sometimes is a result of my bad code in my bots (most likely) or something in the game. I have no traceback errors printed, and the game just dies. In this case I believe it has something to do with Spirit Breaker's charge and the disappearance of my charge target and no other available candidates (just guessing though).

    Crash attached.

    crash_dota2.exe_20170320115547_1.zip

  2. #2
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,652
    Not without PDBs.

    P.S. you had an access violation btw
    Last edited by The Nomad; 03-20-2017 at 09:46 AM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    598
    Quote Originally Posted by The Nomad View Post
    Not without PDBs.

    P.S. you had an access violation btw
    I think those are the only ones that I have seen ever that cause these types of crashes. Questions is was it my fault or not...

  4. #4
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,652
    Possibly. It might have caused an overflow in the LUA VM due to an invalid call that invalidated the stack. Accessing that address from the actual engine code might have caused an access violation.
    But it could have, just as well, be caused by some random mishap. Depends on how often you get them. If they started after a recent SVN update or you changed something in the code, chances are there is an issue somewhere.

    This is just speculation/an educated guess, I haven't seen the code that you are using now and I don't have PDBs or the D2 source code so...
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #5
    Basic Member
    Join Date
    Dec 2016
    Posts
    598
    Quote Originally Posted by The Nomad View Post
    Possibly. It might have caused an overflow in the LUA VM due to an invalid call that invalidated the stack. Accessing that address from the actual engine code might have caused an access violation.
    But it could have, just as well, be caused by some random mishap. Depends on how often you get them. If they started after a recent SVN update or you changed something in the code, chances are there is an issue somewhere.

    This is just speculation/an educated guess, I haven't seen the code that you are using now and I don't have PDBs or the D2 source code so...
    I know and I appreciate your help. It started happening when I added Spirit Breaker to my hero pool, so I know that hero is causing it, just not exactly sure why.

    I did just find a mistake in my code that could have been causing it (but it was happening at random points in the game, so not easily reproducible).

    @ChrisC - I was doing potentially a GetUnitToLocationDistance( hTarget, vLoc ) with a potentially a "bad" hTarget. Can you tell me if a crash is possible (or check for yourself since game never should crash) what happens if the hTarget is either "nil" or "handle has been deleted and IsNull()"?

  6. #6
    Basic Member
    Join Date
    Nov 2015
    Posts
    107
    Quote Originally Posted by nostrademous View Post
    Can you tell me if a crash is possible (or check for yourself since game never should crash) what happens if the hTarget is either "nil" or "handle has been deleted and IsNull()"?
    This shouldn't cause a crash anymore, it should throw an error to the effect of handle is invalid/deleted and to use IsNull() checks. However I have been getting a number of different crashes using TeamThink() in team_desires.lua, it appears that some commands haven't been ironed out yet to run on the team VM only a hero VM (just my guess). Just an FYI, not sure if you're using TeamThink()

  7. #7
    Basic Member
    Join Date
    Dec 2016
    Posts
    598
    Quote Originally Posted by ironmano View Post
    This shouldn't cause a crash anymore, it should throw an error to the effect of handle is invalid/deleted and to use IsNull() checks. However I have been getting a number of different crashes using TeamThink() in team_desires.lua, it appears that some commands haven't been ironed out yet to run on the team VM only a hero VM (just my guess). Just an FYI, not sure if you're using TeamThink()
    No, I do use TeamThink() but my own rolled version, not Valve's. I did just find a culprit that could have been causing it. There was one conditional which wasn't explicitly returning "nil" that the caller was checking that could I believe lead to undefined behavior.

    It was something akin to the code below. As you see "blah()" doesn't always return a "sane" value, there was no "return nil" for the default case. I am not sure what Lua does in that situation b/c it does compile and such, but I believe the return of blah() can under that situation be anything. And if the "wrong" anything happens then my use of the return can cause a crash.
    Code:
    function blah()
        if global_func_whatever() == something then
            return nil
        end
    end
    
    function test()
        local val = blah()
        if val ~= nil then
            -- DO STUFF
        end
    end

  8. #8
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,441
    Definitely your code.

    Dump:
    STACK_FRAME:server!BinaryProperties_GetValue+0x2b8 30c
    STACK_FRAME:server+0x116857
    STACK_FRAME:vscript+0xabf4
    STACK_FRAME:vscript+0x27a3
    STACK_FRAME:vscript!GetResourceManifests+0x117d
    STACK_FRAME:vscript+0x93d8
    STACK_FRAME:server!BinaryProperties_GetValue+0x2ad f7e
    STACK_FRAME:server!BinaryProperties_GetValue+0x2ae 0b4
    STACK_FRAME:server!BinaryProperties_GetValue+0x26e a03
    STACK_FRAME:server!BinaryProperties_GetValue+0x2cf 941

    Log:
    22488(3859.191201): 799.393 [spirit_breaker]: Mode Transition: PUSHLANE --> LANING
    22487(3857.897032): 796.794 [spirit_breaker]: Mode Transition: LANING --> PUSHLANE
    22486(3855.746125): 792.495 [spirit_breaker]: Mode Transition: RUNE --> LANING
    ...
    22421(3852.057190): Bad key for entity "npc_dota_creep_neutral": Out of range parsed value for field "teamnumber" (-1)!
    22420(3852.056569): Bad key for entity "npc_dota_creep_neutral": Out of range parsed value for field "teamnumber" (-1)!
    22419(3852.030397): 785.063 [drow_ranger]: Mode Transition: NONE --> LANING
    22418(3852.009591): 785.03 [drow_ranger]: Mode Transition: PUSHLANE --> NONE
    22417(3852.009517): 785.03 [drow_ranger]: Mode Transition: NONE --> PUSHLANE

    Don't think it's the last accessed part (spirit_breaker) but further behind (since the game won't crash instantly).

    Other than that (and unrelated), disable Windows Game DVR, pleb (console: dota_disable_dvr).
    And a big warning that you have Application/Driver Verifier enabled (and it hooks DOTA). Part of Visual Studio / Windows SDK / Debugging Tools
    That thing should only ever be active for executable code that you've compiled yourself.

    Also, don't be a dumbass and post actual production code.
    I find it funny how people that took 90% of their code from others are the most worried that someone would steal "their code".

  9. #9
    Basic Member
    Join Date
    Dec 2016
    Posts
    598
    Thanks for your help everyone. I believe the issue I fixed with a non-returned value was it; hadn't had a crash since.

  10. #10
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,652
    Quote Originally Posted by aveyo View Post
    Definitely your code.

    Dump:
    STACK_FRAME:server!BinaryProperties_GetValue+0x2b8 30c
    STACK_FRAME:server+0x116857
    STACK_FRAME:vscript+0xabf4
    STACK_FRAME:vscript+0x27a3
    STACK_FRAME:vscript!GetResourceManifests+0x117d
    STACK_FRAME:vscript+0x93d8
    STACK_FRAME:server!BinaryProperties_GetValue+0x2ad f7e
    STACK_FRAME:server!BinaryProperties_GetValue+0x2ae 0b4
    STACK_FRAME:server!BinaryProperties_GetValue+0x26e a03
    STACK_FRAME:server!BinaryProperties_GetValue+0x2cf 941

    Log:
    22488(3859.191201): 799.393 [spirit_breaker]: Mode Transition: PUSHLANE --> LANING
    22487(3857.897032): 796.794 [spirit_breaker]: Mode Transition: LANING --> PUSHLANE
    22486(3855.746125): 792.495 [spirit_breaker]: Mode Transition: RUNE --> LANING
    ...
    22421(3852.057190): Bad key for entity "npc_dota_creep_neutral": Out of range parsed value for field "teamnumber" (-1)!
    22420(3852.056569): Bad key for entity "npc_dota_creep_neutral": Out of range parsed value for field "teamnumber" (-1)!
    22419(3852.030397): 785.063 [drow_ranger]: Mode Transition: NONE --> LANING
    22418(3852.009591): 785.03 [drow_ranger]: Mode Transition: PUSHLANE --> NONE
    22417(3852.009517): 785.03 [drow_ranger]: Mode Transition: NONE --> PUSHLANE
    How did you get this output?
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

Posting Permissions

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