antimicrox icon indicating copy to clipboard operation
antimicrox copied to clipboard

QObject: Cannot create children for a parent that is in a different thread.

Open L00170299 opened this issue 2 years ago • 6 comments

Describe the bug Nintendo Switch pro controller in Fedora 33 connected by usb works fine. Same controller connected by Bluetooth shows error in terminal: "Warning: QObject: Cannot create children for a parent that is in a different thread. (Parent is GameControllerSet(0x55c732d1fcd0), parent's thread is QThread(0x55c733107230), current thread is QThread(0x55c732ba1920) ((null):0, (null))"

To Reproduce 1- Pair controller by bluetooth 2- launch antimicrox from console 3- Press any button in Nintendo switch controller to see errors in terminal (The antimicrox GUI wont crash but wont do anything else. )

Expected behavior it will execute the action configured for button in controller

Screenshots image

Configuration Version of antimicrox: 3.1.4 Used package: Fedora Repo: dnf System version: Fedora 33

Additional context

L00170299 avatar Sep 24 '21 19:09 L00170299

Could you update your AntiMicroX version to 3.1.7 (this version is not available yet, but I think you could download it from there https://bodhi.fedoraproject.org/updates/?search=antimicrox)

There were many fixes since then

pktiuk avatar Sep 24 '21 19:09 pktiuk

Hey Pawel,

Thanks for the info, I didn't know we could get the test pkgs.

Sadly it is still giving me same error. If I connect controller by usb it works fine. Its just when I try to use bluetooth. Let me know if I can help anyhow to fix/find the issue. ( please reply to @.*** )

[cid:a891be3a-dc22-42d0-ac67-4b013cd4e551]


From: Paweł Kotiuk @.> Sent: Friday, September 24, 2021 8:26 PM To: AntiMicroX/antimicrox @.> Cc: Cabrera Gonzalez Luis Uriel @.>; Author @.> Subject: Re: [AntiMicroX/antimicrox] QObject: Cannot create children for a parent that is in a different thread. (#238)

[EXTERNAL EMAIL] DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

Could you update your AntiMicroX version to 3.1.7 (this version is not available yet, but I think you could download it from there https://bodhi.fedoraproject.org/updates/?search=antimicroxhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbodhi.fedoraproject.org%2Fupdates%2F%3Fsearch%3Dantimicrox&data=04%7C01%7CL00170299%40student.lyit.ie%7C0c8a9841c3784c34d99c08d97f912b99%7C69cf187cbec04e178b944edc6bbb7214%7C0%7C0%7C637681083745945380%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eoU7juBe%2Fd0NhK4bYJFkReNaUAQcJGpZ%2FKcsLtURX9g%3D&reserved=0)

There were many fixes since then

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAntiMicroX%2Fantimicrox%2Fissues%2F238%23issuecomment-926869225&data=04%7C01%7CL00170299%40student.lyit.ie%7C0c8a9841c3784c34d99c08d97f912b99%7C69cf187cbec04e178b944edc6bbb7214%7C0%7C0%7C637681083745945380%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3%2B3sx2Z0Gg9kumUhEAb3cjyvs2UMui5fQX73GU00N1c%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAVUFGB67APBP4CC2CBZQ62TUDTGFFANCNFSM5EWR2VFQ&data=04%7C01%7CL00170299%40student.lyit.ie%7C0c8a9841c3784c34d99c08d97f912b99%7C69cf187cbec04e178b944edc6bbb7214%7C0%7C0%7C637681083745955336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gfyuUqNOOAP7RF8esnJzag3icjtSu55kZ1FQiDqxUFw%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7CL00170299%40student.lyit.ie%7C0c8a9841c3784c34d99c08d97f912b99%7C69cf187cbec04e178b944edc6bbb7214%7C0%7C0%7C637681083745955336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wxEUgcXcZXHoO%2FrybafPb0pj078fhFNs9YmhP7RO0ck%3D&reserved=0 or Androidhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7CL00170299%40student.lyit.ie%7C0c8a9841c3784c34d99c08d97f912b99%7C69cf187cbec04e178b944edc6bbb7214%7C0%7C0%7C637681083745965288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DxiykchhneLrxe8GoFGK4vBlJKS94JZmHggmBNsirdA%3D&reserved=0.

L00170299 avatar Sep 26 '21 10:09 L00170299

Does this pad work properly (by bluetooth) with any application on Linux?
The only symptom from user perspective is lack of reaction when button is pressed?

AFAIK, Nintendo Switch controllers are not fully supported on Linux yet.

They are waiting for merging into Linux kernel. Link to mailing list https://patchwork.kernel.org/project/linux-input/patch/[email protected]/

pktiuk avatar Sep 28 '21 11:09 pktiuk

Closing due to lack of feedback

pktiuk avatar Dec 18 '21 18:12 pktiuk

I'm seeing the same problem as reported in #274. Not sure if this helps but this is a stacktrace from the problem. (running antimicrox with some warnings commented out and QT_FATAL_WARNINGS=1)

[20:05:55.499] ❗WARN	QObject: Cannot create children for a parent that is in a different thread.
			(Parent is GameControllerSet(0x555555b644e0), parent's thread is QThread(0x555555f8c0b0), current thread is QThread(0x5555559d2d90)

Thread 1 "antimicrox" received signal SIGABRT, Aborted.
0x00007ffff641334c in __pthread_kill_implementation () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff641334c in __pthread_kill_implementation () from /usr/lib/libc.so.6
#1  0x00007ffff63c64b8 in raise () from /usr/lib/libc.so.6
#2  0x00007ffff63b0534 in abort () from /usr/lib/libc.so.6
#3  0x00007ffff6959126 in QMessageLogger::warning(char const*, ...) const () from /usr/lib/libQt5Core.so.5
#4  0x00007ffff6b6d297 in QObject::QObject(QObjectPrivate&, QObject*) () from /usr/lib/libQt5Core.so.5
#5  0x00005555557c15f0 in JoyAxis::JoyAxis (this=0x555555d1c6a0, index=0, originset=0, parentSet=0x555555b644e0, parent=0x555555b644e0) at /tmp/antimicrox/src/joyaxis.cpp:39
#6  0x00005555556afa05 in GameControllerSet::refreshAxes (this=0x555555b644e0) at /tmp/antimicrox/src/gamecontroller/gamecontrollerset.cpp:330
#7  0x0000555555838454 in SetJoystick::reset (this=0x555555b644e0) at /tmp/antimicrox/src/setjoystick.cpp:216
#8  0x00005555556ad830 in GameControllerSet::resetSticks (this=0x555555b644e0) at /tmp/antimicrox/src/gamecontroller/gamecontrollerset.cpp:43
#9  0x00005555556ad814 in GameControllerSet::reset (this=0x555555b644e0) at /tmp/antimicrox/src/gamecontroller/gamecontrollerset.cpp:39
#10 0x00005555557b3e61 in InputDevice::reset (this=0x555555b9a120) at /tmp/antimicrox/src/inputdevice.cpp:72
#11 0x00005555557b400f in InputDevice::transferReset (this=0x555555b9a120) at /tmp/antimicrox/src/inputdevice.cpp:102
#12 0x0000555555847b8d in InputDeviceXml::readConfig (this=0x5555568df050, xml=0x55555676ca20) at /tmp/antimicrox/src/xml/inputdevicexml.cpp:41
#13 0x000055555585f084 in XMLConfigReader::read (this=0x5555568df270) at /tmp/antimicrox/src/xmlconfigreader.cpp:142
#14 0x000055555585eaf4 in XMLConfigReader::configJoystick (this=0x5555568df270, joystick=0x555555b9a120) at /tmp/antimicrox/src/xmlconfigreader.cpp:87
#15 0x0000555555845ffa in JoyTabWidgetHelper::readConfigFile (this=0x5555560e2960, filepath=...) at /tmp/antimicrox/src/uihelpers/joytabwidgethelper.cpp:88
#16 0x00005555557475f6 in JoyTabWidget::changeJoyConfig (this=0x5555560e2740, index=1) at /tmp/antimicrox/src/gui/joytabwidget.cpp:913

I got to src/joyaxis.cpp#L39 but not sure where to go from there.

cork avatar Jun 01 '22 18:06 cork

What seams to happen is that the timers aren't started so turbo has no effect what so ever (not sure if toggle uses timers)

cork avatar Jun 01 '22 18:06 cork