pboy0922 / x360ce

Automatically exported from code.google.com/p/x360ce
1 stars 0 forks source link

Unhandled exception in Xinput1_3.dll on game exit #418

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps will reproduce the problem?
1. copy x360ce's dll's into the game folder
2. start the game
3. exit the game

What is the expected output? What do you see instead?
a clean exit - instead, the application crashes in xinput*_*.dll

What versions of x360ce and Windows are you using?
self compiled r507 - 514

What gamepad do you use? On what drivers version?
MLG Xbox 360 pad with XBCD 0.2.8wip

Please attach a log file created with Log=1 setting in x360ce.ini file.

Debugging indicates

>>>>>>> xinput1_3.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void 
* lpreserved)  Line 415 C (I of course, have tried with both runtime library 
types)

Original issue reported on code.google.com by danialho...@gmail.com on 23 Jan 2013 at 1:53

GoogleCodeExporter commented 9 years ago
Game title ?

Original comment by tapcio on 23 Jan 2013 at 1:56

GoogleCodeExporter commented 9 years ago
in SSF4AE it reports the crash occuring in ntdll, but the older versions work 
fine so im taking that as typical windows crash discrepancy.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 2:04

GoogleCodeExporter commented 9 years ago
no specific title, i can reproduce it under any xinput game that i have.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 2:04

GoogleCodeExporter commented 9 years ago
except for XBLA ports, these seem to exit fine

Original comment by danialho...@gmail.com on 23 Jan 2013 at 2:06

GoogleCodeExporter commented 9 years ago
Test with Insanely Twisted Shadow Planet - not reproduced.
Test with Assassin's Creed Brotherhood - not reproduced.

Original comment by tapcio on 23 Jan 2013 at 2:20

GoogleCodeExporter commented 9 years ago
well, all my games was exagerating a bit. GTA4 exits clean, Vessel exits clean, 
Limbo, exits clean, same with mark of the ninja.

Blade kitten crashes at start in xinput1_3.dll

>   xinput1_3.dll!detour_skip_jmp()  Line 135 + 0x3 bytes   C++
    xinput1_3.dll!DetourCodeFromPointer()  Line 965 + 0xd bytes C++
    xinput1_3.dll!DetourDetach()  Line 1805 + 0xd bytes C++
    xinput1_3.dll!HookCoUninitializeW()  + 0x6a bytes   C++
    Bladekitten.exe!007196a0()  
    [Frames below may be incorrect and/or missing, no symbols loaded for Bladekitten.exe]   
    Bladekitten.exe!006de546()  
    Bladekitten.exe!006de67a()  
    Bladekitten.exe!006971e5()  
    Bladekitten.exe!0056f300()  
    Bladekitten.exe!00454f61()  
    Bladekitten.exe!0042cafd()  
    Bladekitten.exe!0051cde3()  
    Bladekitten.exe!00429dc6()  
    Bladekitten.exe!00429a45()  
    Bladekitten.exe!00429522()  
    Bladekitten.exe!004376e2()  
    ntdll.dll!7788f955()    
    KernelBase.dll!76e40ee2()   
    Bladekitten.exe!0051cde3()  
    Bladekitten.exe!0043616b()  
    Bladekitten.exe!00956b58()  

Batman Arkham Asylum reports an unhandled exception on exit in xinput1_3.dll

    xinput1_3.dll!detour_skip_jmp()  Line 135 + 0x3 bytes   C++
    xinput1_3.dll!DetourCodeFromPointer()  Line 965 + 0xd bytes C++
    xinput1_3.dll!DetourDetach()  Line 1805 + 0xd bytes C++
    xinput1_3.dll!iHook::HookWMI_UNI_Clean()  + 0x43 bytes  C++
    xinput1_3.dll!iHook::~iHook()  + 0xf bytes  C++
>   xinput1_3.dll!doexit(int code, int quick, int retcaller)  Line 567  C
    xinput1_3.dll!_cexit()  Line 408 + 0xb bytes    C
    xinput1_3.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 174 C
    xinput1_3.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 352 + 0x8 bytes   C
    xinput1_3.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 293 + 0xe bytes    C
    ntdll.dll!778a9950()    
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
    ntdll.dll!778bd6b2()    
    ntdll.dll!778bd554()    
    kernel32.dll!755d7a0d()     
    msvcr80.dll!6c481720()  
    msvcr80.dll!6c481a04()  
    msvcr80.dll!6c481a4b()  
    ShippingPC-BmGame.exe!01aa51a5()    
    kernel32.dll!755d33aa()     
    ntdll.dll!778a9ef2()    
    ntdll.dll!778a9ec5()    
    ncrypt.dll!70207369()   

SSF4AE seems to have been a anomaly, i can't reproduce the error i saw anymore 
so it seems entirely unrelated to this issue.

In both the affected games, it seems returning to before you implemented MS 
Detours that everything seems to work fine.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 2:30

GoogleCodeExporter commented 9 years ago
r502 certainly introduced the crash at start for Blade Kitten and the Crash on 
exit for Batman:AA.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 2:44

GoogleCodeExporter commented 9 years ago
Test with Batman Arkham Asylum GOTY (non-Steam) - not reproduced.

Original comment by tapcio on 23 Jan 2013 at 3:15

GoogleCodeExporter commented 9 years ago
Can you reproduce this also with compiled binary from downloads ? And please 
write your system version.

Original comment by tapcio on 23 Jan 2013 at 3:17

GoogleCodeExporter commented 9 years ago
GOTY (1.0) is not the same as the the retail edition with the 1.1 patch.

And yes, i can.

I just don't get the stack information since msvc won't read the symbols 
correctly for some reason.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 3:33

GoogleCodeExporter commented 9 years ago
and without the detours pdb files, it makes debugging this tricky.

from the debug binary

Blade Kitten

    xinput1_3.dll!detour_skip_jmp()  Line 135 + 0x3 bytes   C++
    xinput1_3.dll!DetourCodeFromPointer()  Line 965 + 0xd bytes C++
    xinput1_3.dll!DetourDetach()  Line 1805 + 0xd bytes C++
>   xinput1_3.dll!HookCoUninitializeW()  Line 382   C++
    Bladekitten.exe!007196a0()  

Arkham Asylum

    xinput1_3.dll!detour_skip_jmp()  Line 135 + 0x3 bytes   C++
    xinput1_3.dll!DetourCodeFromPointer()  Line 965 + 0xd bytes C++
    xinput1_3.dll!DetourDetach()  Line 1805 + 0xd bytes C++
>   xinput1_3.dll!HookWMI_UNI_Clean()  Line 441 C++
    xinput1_3.dll!iHook::~iHook()  Line 106 C++
    xinput1_3.dll!`dynamic atexit destructor for 'g_iHook''()  + 0x28 bytes C++
    xinput1_3.dll!doexit(int code, int quick, int retcaller)  Line 567  C
    xinput1_3.dll!_cexit()  Line 408 + 0xb bytes    C
    xinput1_3.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 181 C
    xinput1_3.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 352 + 0x11 bytes  C
    xinput1_3.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Line 293 + 0x11 bytes   C
    ntdll.dll!778a9950()    
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
    ntdll.dll!778bd6b2()    
    ntdll.dll!778bd554()    
    kernel32.dll!755d7a0d()     
    msvcr80.dll!6c481720()  
    msvcr80.dll!6c481a04()  
    msvcr80.dll!6c481a4b()  
    ShippingPC-BmGame.exe!01aa51a5()    

Original comment by danialho...@gmail.com on 23 Jan 2013 at 3:44

GoogleCodeExporter commented 9 years ago
Windows 7 x64 SP1
MSVS 2010sp1

Original comment by danialho...@gmail.com on 23 Jan 2013 at 3:50

GoogleCodeExporter commented 9 years ago
Reproduced - http://pastebin.com/0yZGYBqT

Original comment by tapcio on 23 Jan 2013 at 4:59

GoogleCodeExporter commented 9 years ago
I must think now what to do with that, seems to be bug in detours .... Back 
again to Mologie or something... 

Original comment by tapcio on 23 Jan 2013 at 5:02

GoogleCodeExporter commented 9 years ago

Original comment by tapcio on 23 Jan 2013 at 5:20

GoogleCodeExporter commented 9 years ago
Found real issue - x360ce is leaking a hook in HookWMI.

Original comment by tapcio on 23 Jan 2013 at 5:27

GoogleCodeExporter commented 9 years ago
Ah, well hopefully both games have the same source issue

if you have a steam account i can gift you a copy of blade kitten if it turns 
out not to be the same issue.

Original comment by danialho...@gmail.com on 23 Jan 2013 at 5:31

GoogleCodeExporter commented 9 years ago
Can you quick test r516 ?

Original comment by tapcio on 23 Jan 2013 at 5:39

GoogleCodeExporter commented 9 years ago
built debug version

Blade Kitten still crashes on start
http://pastebin.com/96cTX5Bz

Batman:AA still crashes on exit
http://pastebin.com/tWS7iw9P

Original comment by danialho...@gmail.com on 23 Jan 2013 at 5:54

GoogleCodeExporter commented 9 years ago
if MS Detours is the root problem, theres always MinHook (as opposed to mologie)

Original comment by danialho...@gmail.com on 23 Jan 2013 at 6:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixed in r519.

Original comment by tapcio on 24 Jan 2013 at 10:01

GoogleCodeExporter commented 9 years ago

Original comment by danialho...@gmail.com on 16 Feb 2013 at 7:11