Crash in xinputgamepad on exit program



  • Calling QGamepadManager instance gives two warning messages

    auto* manager = QGamepadManager::instance();
    
    qt warn: Failed to load XInput library xinput1_3.dll (qxinputgamepadbackend.cpp:277, bool __cdecl QXInputGamepadBackend::start(void))
    qt warn: Failed to start gamepad backend (qgamepadmanager.cpp:66, __cdecl QGamepadManager::QGamepadManager(void))
    

    And on program exit there's a crash in xinputgamepad. No other gamepad related code is called.

    Is there any way to check if the returned QGamepadManager::instance is in a valid state?
    And is it possible to prevent this from crashing on machines where xinput1_3.dll is missing? (Apart from not calling instance...)

    Qt 5.8 64-bit

    dxdiag reports this:
    Operating System: Windows 7 Professional 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_ldr.170427-1518)
    Processor: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz (4 CPUs), ~2.4GHz
    DirectX Version: DirectX 11

    Callstack on crash:

    xinputgamepadd!QAtomicOpsBySize<4>::fetchAndStoreRelaxed<int>+0x28
    xinputgamepadd!QGenericAtomicOps<QAtomicOpsBySize<4> >::fetchAndStoreAcquire<int,int>+0x1b
    xinputgamepadd!QBasicAtomicInteger<int>::fetchAndStoreAcquire+0x1e
    xinputgamepadd!QXInputThread::signalQuit+0x1f
    xinputgamepadd!QXInputGamepadBackend::stop+0x96
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x1db8
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x1b8a5
    ucrtbased!<lambda_e971338317bfa523bb8920b43d823727>::operator()+0x117
    ucrtbased!__crt_seh_guarded_call<int>::operator()<<lambda_d22e02de4d14401f49897516b29a2b7c>,<lambda_e971338317bfa523bb8920b43d823727> & __ptr64,<lambda_b0b8599c9027f5b14541fbbd6863d1f1> >+0x35
    ucrtbased!__acrt_lock_and_call<<lambda_e971338317bfa523bb8920b43d823727> >+0x5c
    ucrtbased!_execute_onexit_table+0x25
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x1568e
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x16639
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x1640c
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x167c3
    Qt5Gamepadd!QGamepadKeyNavigation::gamepadChanged+0x16936
    ntdll!LdrShutdownProcess+0x1db
    ntdll!RtlExitUserProcess+0x90
    ucrtbased!exit_or_terminate_process+0x3a
    ucrtbased!common_exit+0x102
    ucrtbased!exit+0x16
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.