Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Crash in xinputgamepad on exit program
QtWS25 Last Chance

Crash in xinputgamepad on exit program

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikag
    wrote on last edited by
    #1

    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
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      Schwingi
      wrote on last edited by
      #2

      Is there any solution for this problem? It occurs only on a few computers, but i cant find the difference...

      raven-worxR 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Did you check with something like Dependency Walker whether there's a .dll missing or different from the system where it's running properly ?

        Also, are you using a more recent version of Qt ?

        Is there any difference between the versions of DirectX on your systems ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • S Schwingi

          Is there any solution for this problem? It occurs only on a few computers, but i cant find the difference...

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @Schwingi said in Crash in xinputgamepad on exit program:

          Is there any solution for this problem? It occurs only on a few computers, but i cant find the difference...

          did you compare the version and origin of the xinput.dll amongst the machines where it is working and where it is not?

          Also note that the QtGamepad module is still in Technology Preview state and not yet and still may contain bugs and thus not meant for production.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • S Offline
            S Offline
            Schwingi
            wrote on last edited by
            #5

            Hey,
            I actually use Qt 5.10, but the crash also occurs in 5.8 or 5.9.
            But on the computer where it crashes, there isn't a "xinput1_4.dll" in system32 directory.
            On the computer where it doesn't crash, the process explorer shows, that he use the "xinput1_4.dll".
            But also if i copy this dll in system32 or application directory on the computer where it doesn't work it crashs and the process explorer shows, that he also doesn't use this neither. The directx version is not relevant.
            So how can i be sure that this dll is used when this causes the crash. Thank you

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved