Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 40 of 40

Thread: Analyzing a Dump

  1. #31
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    Quote Originally Posted by ChrisC View Post
    The first one should be fixed in the next update. This one is odd, it's just dying somewhere in the guts of trying to look up the Think() function in your lua file.
    Do you know the name of the file/module that has the Think() in it? I am debating if one of the few "while" loops I have in my code might be causing an infinite recursion.

  2. #32
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,672
    The dump doesn't have a ton of info it, but the debugger thinks that it's calling the full-override Think on a Drow Ranger.

  3. #33
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    Quote Originally Posted by ChrisC View Post
    The dump doesn't have a ton of info it, but the debugger thinks that it's calling the full-override Think on a Drow Ranger.
    dota2_2017_0328_125425_0_crash.zip

    Another one just happened. Drow was actually dead (and rezzing) when it happened.

  4. #34
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    @ChrisC - I'm still getting occasional freezes in game after the crash-fix you committed. These don't generate a minidump but just the client freezes and then closes. I ran 8-9 games in a row until I got it to happen while having a debugger attached and then dumped the stack of all the threads associated with dota2. Pasted below the only thread that matters.

    TL;DR - last code identifies the two vscript calls that seem to call each other recursively forever....

    Hopefully it helps:

    Code:
    0:039> !uniqstack
    Processing 49 threads, please wait
    
    .  0  Id: 3d30.17f8 Suspend: 1 Teb: 00007ff6`0729e000 Unfrozen
          Start: dota2!BinaryProperties_GetValue+0x650 (00007ff6`07a61a40)
          Priority: 0  Priority class: 32  Affinity: ff
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1e710 00007ff8`abf95b3d server!InstallSchemaBindings+0x484b
    01 000000f8`5bc1e720 00007ff8`ab6d0bf9 server!InstallSchemaBindings+0x4bed
    02 000000f8`5bc1e7b0 00007ff8`ab91402c server!BinaryProperties_GetValue+0x6ebb9
    03 000000f8`5bc1eb90 00007ff8`ab15717d server!BinaryProperties_GetValue+0x2b1fec
    04 000000f8`5bc1ec20 00007ff8`ae36abf4 server+0x11717d
    05 000000f8`5bc1ec50 00007ff8`ae3627a3 vscript+0xabf4
    06 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a3
    07 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    08 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    09 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    0a 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    0b 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    0c 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    0d 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    0e 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    0f 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    10 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    11 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    12 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    13 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    14 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    15 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    16 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    17 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    18 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    19 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    1a 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    1b 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    I traced that first thread listed out of the underlying calls until it returned back to vscript.
    Code:
    00007ff8`ae36abf1 ff5730             call    qword ptr [rdi+30h]                                              <-- call outside of vscript (from vscript)
    00007ff8`ae36abf4 44387718         cmp     byte ptr [rdi+18h],r14b ds:000000f8`c6743f98=00  <-- comparing return values
    00007ff8`ae36abf8 740d                je      vscript+0xac07 (00007ff8`ae36ac07)
    00007ff8`ae36abfa 488d542440      lea     rdx,[rsp+40h]
    00007ff8`ae36abff 498bcd             mov     rcx,r13
    00007ff8`ae36ac02 e8190e0000      call    vscript+0xba20 (00007ff8`ae36ba20)
    00007ff8`ae36ac07 66837c244824   cmp     word ptr [rsp+48h],24h
    00007ff8`ae36ac0d 751f                jne     vscript+0xac2e (00007ff8`ae36ac2e)
    00007ff8`ae36ac0f 4c39742440      cmp     qword ptr [rsp+40h],r14
    00007ff8`ae36ac14 7418               je      vscript+0xac2e (00007ff8`ae36ac2e)
    Here is the return info:
    Code:
    0:000> k
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ec50 00007ff8`ae3627a3 vscript+0xabf4
    01 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a3
    02 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    03 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    04 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    05 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    06 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    07 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    08 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    09 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    0a 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0b 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0c 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0d 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0e 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0f 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    10 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    11 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    12 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    13 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    14 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    15 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    16 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    0:000> r                     <---------- DUMPING REGISTER VALUES so we can see what is being compared (r14 lowest byte is the right hand side, value 00)
    rax=0000000000000101 rbx=0000000000000004 rcx=000000006fe4178c
    rdx=0000000000000000 rsi=000000f85bc1ed30 rdi=000000f8c6743f80
    rip=00007ff8ae36abf4 rsp=000000f85bc1ec50 rbp=000000f85bc1ed50
     r8=0000000000000000  r9=000000f86e620860 r10=000000f8ea77782c
    r11=000000f85bc1ebf0 r12=0000000000000002 r13=0000000000210378
    r14=0000000000000000 r15=0000000000000002
    iopl=0         nv up ei pl nz na po nc
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    vscript+0xabf4:
    00007ff8`ae36abf4 44387718        cmp     byte ptr [rdi+18h],r14b ds:000000f8`c6743f98=00
    0:000> dd [rdi+18h]                             <--- dumping memory at [rdi+18h] (value 00 as well)
    000000f8`c6743f98  05020000 00000005 00000000 00000000
    000000f8`c6743fa8  ac46c138 00007ff8 ab1570f0 00007ff8
    000000f8`c6743fb8  ab913e90 00007ff8 00000001 00000000
    000000f8`c6743fc8  ac463820 00007ff8 ac463820 00007ff8
    000000f8`c6743fd8  ac463720 00007ff8 1f020006 00000005
    000000f8`c6743fe8  00000000 3f800000 ac46c120 00007ff8
    000000f8`c6743ff8  ab94d0f0 00007ff8 ab914750 00007ff8
    000000f8`c6744008  00000001 000000f8 ac4637e0 00007ff8
    Finally, I decided to continue tracing until I step out of as many layered function calls as I can... it seems that:
    Code:
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1e7b0 00007ff8`ab91402c server!BinaryProperties_GetValue+0x71841
    01 000000f8`5bc1eb90 00007ff8`ab15717d server!BinaryProperties_GetValue+0x2b1fec
    02 000000f8`5bc1ec20 00007ff8`ae36abf4 server+0x11717d
    03 000000f8`5bc1ec50 00007ff8`ae3627a3 vscript+0xabf4
    04 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a3                                              <-- can't step "out" of this guy... when I get to him he just go back into the above call
    05 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    06 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    07 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    Doing more investigation to see how far up I go in the call I can't get out of...

    Code:
    # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a1
    01 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    02 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    03 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    04 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    05 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    06 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    07 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    08 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    09 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0a 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0b 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0c 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0d 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0e 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    0f 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    10 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    11 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    12 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    13 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    14 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    15 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    0:000> p
    rax=0000000000000001 rbx=0000000000210f70 rcx=000000002b861f4b
    rdx=00007ff607148010 rsi=00000000002104ac rdi=00007ff8ae36a690
    rip=00007ff8ae3627a3 rsp=000000f85bc1ee50 rbp=0000000000210378
     r8=0000000000000000  r9=000000f86ecd17c0 r10=000000000000000a
    r11=000000f8ea7777e8 r12=0000000000000008 r13=0000000000000006
    r14=0000000000000000 r15=0000000000210378
    iopl=0         nv up ei pl nz na po nc
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    vscript+0x27a3:
    00007ff8`ae3627a3 c78330f5ffffffffffff mov dword ptr [rbx-0AD0h],0FFFFFFFFh ds:00000000`002104a0=fffffffe
    0:000> k
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a3
    01 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    02 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    03 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    04 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    05 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    06 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    07 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    08 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    09 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0a 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0b 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0c 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0d 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0e 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    0f 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    10 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    11 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    12 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    13 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    14 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    15 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    0:000> pc
    rax=000000f85bc1eea0 rbx=0000000000210f70 rcx=0000000000210378
    rdx=00000000004d2268 rsi=0000000000248618 rdi=0000000000248780
    rip=00007ff8ae362b9e rsp=000000f85bc1ee50 rbp=0000000000210378
     r8=000000f85bc1eea0  r9=000000f86ecd17c0 r10=000000000000000a
    r11=000000f8ea7777e8 r12=0000000000000008 r13=0000000000000006
    r14=0000000000000000 r15=0000000000210378
    iopl=0         nv up ei pl nz na po nc
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    vscript+0x2b9e:
    00007ff8`ae362b9e e8fd720300      call    vscript!GetResourceManifests+0x16190 (00007ff8`ae399ea0)
    0:000> k
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x2b9e
    01 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    02 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    03 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    04 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    05 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    06 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    07 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    08 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    09 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0a 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0b 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0c 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0d 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0e 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    0f 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    10 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    11 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    12 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    13 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    14 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    15 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    0:000> p
    rax=000000000021bee0 rbx=0000000000210f70 rcx=0000000000210378
    rdx=000000000021bee0 rsi=0000000000248618 rdi=0000000000248780
    rip=00007ff8ae362ba3 rsp=000000f85bc1ee50 rbp=0000000000210378
     r8=00000000000000a2  r9=0000000000217a68 r10=000000000021b778
    r11=000000f8ea7777e8 r12=0000000000000008 r13=0000000000000006
    r14=0000000000000000 r15=0000000000210378
    iopl=0         nv up ei pl nz na po nc
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    vscript+0x2ba3:
    00007ff8`ae362ba3 8b5510          mov     edx,dword ptr [rbp+10h] ss:00000000`00210388=004d2268
    0:000> k
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x2ba3
    01 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    02 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    03 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    04 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    05 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    06 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    07 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    08 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    09 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0a 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0b 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0c 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0d 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0e 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    0f 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    10 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    11 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    12 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    13 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    14 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    15 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    0:000> pc
    rax=00000000004d2298 rbx=0000000000210f70 rcx=0000000000210378
    rdx=00000000004d2288 rsi=00000000002104ac rdi=00007ff8ae36a690
    rip=00007ff8ae3627a1 rsp=000000f85bc1ee50 rbp=0000000000210378
     r8=00000000000000a2  r9=0000000000217a68 r10=000000000021b778
    r11=000000f8ea7777e8 r12=0000000000000008 r13=0000000000000006
    r14=0000000000000000 r15=0000000000210378
    iopl=0         nv up ei ng nz na po cy
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000287
    vscript+0x27a1:
    00007ff8`ae3627a1 ffd7            call    rdi {vscript+0xa690 (00007ff8`ae36a690)}
    0:000> k
     # Child-SP          RetAddr           Call Site
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a1
    01 000000f8`5bc1eea0 00007ff8`ae3693d8 vscript!GetResourceManifests+0x117d
    02 000000f8`5bc1eed0 00007ff8`ab91069e vscript+0x93d8
    03 000000f8`5bc1ef20 00007ff8`ab9107d4 server!BinaryProperties_GetValue+0x2ae65e
    04 000000f8`5bc1ef90 00007ff8`ab8d10f3 server!BinaryProperties_GetValue+0x2ae794
    05 000000f8`5bc1efd0 00007ff8`ab932861 server!BinaryProperties_GetValue+0x26f0b3
    06 000000f8`5bc1f090 00007ff8`ab8e4281 server!BinaryProperties_GetValue+0x2d0821
    07 000000f8`5bc1f0f0 00007ff8`ab0e101e server!BinaryProperties_GetValue+0x282241
    08 000000f8`5bc1f130 00007ff8`ab525aa6 server+0xa101e
    09 000000f8`5bc1f160 00007ff8`b0a4f605 server+0x4e5aa6
    0a 000000f8`5bc1f1f0 00007ff8`b0a09535 engine2+0x6f605
    0b 000000f8`5bc1f230 00007ff8`b0b366eb engine2+0x29535
    0c 000000f8`5bc1f2c0 00007ff8`b0b3477d engine2!Source2Main+0xde7b
    0d 000000f8`5bc1f300 00007ff8`b0b2c571 engine2!Source2Main+0xbf0d
    0e 000000f8`5bc1f520 00007ff8`b0b244da engine2!Source2Main+0x3d01
    0f 000000f8`5bc1f5d0 00007ff8`b0b24d51 engine2+0x1444da
    10 000000f8`5bc1f690 00007ff8`b0b289b2 engine2+0x144d51
    11 000000f8`5bc1f6f0 00007ff6`07a61365 engine2!Source2Main+0x142
    12 000000f8`5bc1f730 00007ff6`07a619eb dota2+0x1365
    13 000000f8`5bc1f880 00007ff8`e1442d92 dota2!BinaryProperties_GetValue+0x5fb
    14 000000f8`5bc1f8c0 00007ff8`e14e9f64 KERNEL32!BaseThreadInitThunk+0x22
    15 000000f8`5bc1f8f0 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    I eventually reach a point where we just loop between these two calls indefinitely
    Code:
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x2b9e
    
    
    00 000000f8`5bc1ee50 00007ff8`ae384e8d vscript+0x27a1
    Last edited by nostrademous; 03-31-2017 at 11:47 AM.

  5. #35
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    Above "recursion" instance made me think if I had one in my code, and I did. Now I can't for the life of me think why it would be unsafe, but perhaps...

    Code:
    function U.HaveItem(bot, item_name)
        local slot = bot:FindItemSlot(item_name)
        if slot ~= ITEM_SLOT_TYPE_INVALID then
            local slot_type = bot:GetItemSlotType(slot)
            if slot_type == ITEM_SLOT_TYPE_MAIN then
                return bot:GetItemInSlot(slot), true
            elseif slot_type == ITEM_SLOT_TYPE_BACKPACK then
                return U.MoveItemsFromBackpackToInventory(bot, slot)
            elseif slot_type == ITEM_SLOT_TYPE_STASH then
                if bot:DistanceFromFountain() < 500 then
                    if U.NumberOfItems(bot) < 6 then
                        U.MoveItemsFromStashToInventory(bot)
                        return nil, false                                        <-- THIS IS NEW CODE
                        --return U.HaveItem(bot, item_name)          <-- THIS WAS THE RECURSION THAT I NOW COMMENTED OUT
                    else
                        U.myPrint("FIXME: Implement swapping STASH to MAIN INVENTORY of item: ", item_name)
                        return bot:GetItemInSlot(slot), false
                    end
                end
                return nil, false
            else
                U.pause("ERROR: condition should not be hit: ", item_name)
                return nil, false
            end
        end
    
        return nil, false
    end
    
    function U.MoveItemsFromStashToInventory(bot)
        if U.NumberOfItems(bot) == 6 and U.NumberOfItemsInBackpack(bot) == 3 then return end
        if U.NumberOfItemsInStash(bot) == 0 then return end
    
        for i = 0, 5, 1 do
            if bot:GetItemInSlot(i) == nil then
                for j = 9, 14, 1 do
                    local item = bot:GetItemInSlot(j)
                    if item ~= nil then
                        bot:ActionImmediate_SwapItems(i, j)
                        return
                    end
                end
            end
        end
    
        for i = 6, 8, 1 do
            if bot:GetItemInSlot(i) == nil then
                for j = 9, 14, 1 do
                    local item = bot:GetItemInSlot(j)
                    if item ~= nil then
                        bot:ActionImmediate_SwapItems(i, j)
                        return
                    end
                end
            end
        end
    end
    
    function U.NumberOfItems(bot)
        local n = 0
    
        for i = 0, 5, 1 do
            local item = bot:GetItemInSlot(i)
            if item ~= nil then
                n = n+1
            end
        end
    
        return n
    end
    I honestly doubt it's any of the above though... the debugging seems to indicate more of a cyclic dependency issue, like: Function A calls Function B, and Function B calls Function A. And based on the repeating function addresses, the functions are not too far from each other.
    Last edited by nostrademous; 03-31-2017 at 02:07 PM.

  6. #36
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    dota2_2017_0331_161804_0_crash.zip

    Managed to get a dump on this one.

  7. #37
    Quote Originally Posted by nostrademous View Post
    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.

    Attachment 47947
    http://loopvideos.com/XSNHzuMus5Y?from=250&to=258

  8. #38
    Basic Member
    Join Date
    Dec 2016
    Posts
    618
    @ChrisC - welcome back

    It might be a good idea to add a "timeout" to bot call per frame with a traceback if exceeded. Make it setable by a global var, if possible, with a default value (say 5 seconds). If the traceback dumps the LUA call stack it would be amazing to help us profile and debug corner cases in our code.

  9. #39
    Basic Member
    Join Date
    Dec 2016
    Posts
    137
    there are some ways to do this like host_timescale or frame rate.
    but if timeout become available, debugging some minor issues would help developers to focus on major problems rather than just lua syntax and nil values.

  10. #40
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,616
    Quote Originally Posted by SIKIM View Post
    there are some ways to do this like host_timescale or frame rate.
    but if timeout become available, debugging some minor issues would help developers to focus on major problems rather than just lua syntax and nil values.
    Sorry, but that's a stupid statement. ̶D̶e̶v̶e̶l̶o̶p̶e̶r̶s̶ scripters should first learn "lua syntax and nil values", and only after start.. ̶d̶e̶v̶e̶l̶o̶p̶i̶n̶g̶ scripting.
    Debugging starts with your script, not with the crash dumps output. You have plenty of ways to tag, feedback, pause and restart every line of the script.
    Sure there are still built-in engine issues, but many of those would not happen if people will just learn the basics of the language.
    Now devs have to idiot-proof every function, so it's understandable that it takes time..

Posting Permissions

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