Search Unity

Acess Violation. 64 bit to 32 bit register. Searching the guilty

Discussion in 'Editor & General Support' started by mespino, Feb 2, 2017.

  1. mespino

    mespino

    Joined:
    Nov 26, 2015
    Posts:
    15
    Hello, We have an Access violation crash.We think is something in 64 bits trying to write in a 32 bit register

    How do we know?We have this output:

    Code (CSharp):
    1. ....exe caused an Access Violation (0xc0000005)
    2.   in module ....exe at 3cc458cc .
    3.  
    4. ...
    5. Read from location 3cc458cc caused an access violation.
    6.  
    7. Context:
    8. RDI:  0x0000005b  RSI: 0x3cc50c80  RAX:  0x3fffffff
    9. RBX:  0x3cc50c80  RCX: 0x3fffffff  RDX:  0x03f8f470
    10. RIP:  0x40c146d2  RBP: 0x0017ed90  SegCs: 0x00000033
    11. EFlags: 0x00010206  RSP: 0x0017ed20  SegSs: 0x0000002b
    12. R8:  0x00000000  R9: 0x0000001e  R10:  0x00000000
    13. R11:  0x3cc458d0  R12: 0x00001211  R13:  0x3fce0000
    14. R14:  0x32d1a0e0  R15: 0x4ceecbf0
    Opening the dmp, we have been able to find the assembly instruction that causes the problem is:move eax, dword ptr[r11+rax*4]
    Doing the operation myself, I have
    r11=0x3cc458d0 rax=0x3fffffff
    r11+rax*4 = 1 3CC458CC. (not the same that Unity says, that is 3cc458cc)
    So:
    • 1 3CC458CC is 33 bits number, so it does not fit in 32 bit register (eax)
    • The direction address that Unity gives as an error is almost the same, but it truncates the first digit. Unity says that read from location 3cc458cc causes an access violation, but the operation results 1 3CC458CC.
    • So my guess is that the mov operation truncates the address because it doesn't fit in the 32 bits eax register, so Unity is trying to access to an invalid address, because the right address has been truncated


    Having said that, I would like to ask:
    • Do you think am I right? Do you think this analysis is correct?
    • So if I am right, how could I find the guilty dll or class or whatever that is using the 32 register?

    I have tried to use the pdb and dmp to find the call, but I did not manage to do so.

    Please find the files attached.

    Regards
     

    Attached Files: