emulator crashes because of connection with controller
Hello from a year ago to here the emulator crushes when launching any game. At first I thought it was a matter of emulator updates but I just realized that it is the command I use that causes this error. The remote I use is from the nacon company. url: https://www.mediamarkt.es/es/product/_mando-nacon-ps4-controller-con-cable-negro-1381980.html?utm_source=google&utm_medium=cpc&utm_campaign=MM_ES_SEARCH_GOOGLE_CATEGORIES_PLA_PEGOSIDE_CATEGORIES_PLAEGOJOROSIDE_SMEGORIES_PLA_PLA-SMIDE_SMITTAL_PLAEGOJORIES_CATEGORIES_Pla PH_TV_ALL_ALL & ds_rl = 1280902 & ds_rl = 1280902 & gclid = Cj0KCQiAoNWOBhCwARIsAAiHnEhhd4ddRmMKL7D9lle_JeOCRl8PeDw1c2hjqFIsaIHjDjMeIHAL_whjqFIsaIHjDjMEIHawtw5djMeIHawdwAdw5DjMeIHAL gwAdw5DjEIHawtwAdScBcAwAdScBc
I write here so that you know that this error exists and I hope you can solve it. All the best
Upload the log file after the crash
where do i upload it?
in order to start a game I have to start it with the controller unplugged and once it is run, connect it. if I do it with the remote connected the emulator crashes
I don't see any crash in the log
I think I can hardly access the log because when you run the game with the controller connected the emulator crashes and I have to pull the task manager to close it and when I close the file that you say it disappears :(
is this? RPCS3.log
I have the same problem, windows 11 with a ps4 nacon wired controller. Happens to a few games (I don't know which ones anymore) and sometimes also the Rufus partition tool. I just unplug it before launching bios or a game. Maybe some apps treat it like a faulty or portable storage device.
@thijsi123 thank you very much for writing in this post and I hope that your comment and mine serve to investigate the reason why this error is caused and it is solved. I do not know if the file that I have uploaded is the correct one so that they can know what is happening.
This may or may not be related to the same issue, but when my PS5 controller disconnects, the emulator crashes.
RPCS3.log
Please test again
RPCS3.log RPCS3.log.gz TTY.log some log files IDK if these are any of help. I just recorded it too, the moment the controller disconnects the application will load the bios/games. This file size of the gif is a bit too big for GitHub so I'll just link the Imgur here: https://imgur.com/a/6JX6Yld This is all on the latest version as far as I know.
@LeronHinds your controller doesn't seem to report the expected data. This would suggest that it is not an original DualSense controller.
i'm getting the same issue as @LeronHinds too with a 100% OEM dualsense controller (bought new in box like 4 days ago). it seems to be directly correlated with the dualsense pad going into sleep mode and disconnecting, so i'm not sure it's actually in scope of this ticket as reported (i will open a new ticket if asked to do so).
log reports:
F {Pad Thread} SIG: Thread terminated due to fatal error: Segfault reading location 00000000000000e0 at 00007ff8157acb0b.
Emu Thread Name: 'Pad Thread'.
and it's reproducible, too:
- boot game
- go into a pause menu or something
- wait for dualsense controller to fall asleep and disconnect
- segfault
i'll happily provide any further information upon request and a full log if someone could direct me to the log location on macOS (it's not in ~/.cache like on linux and i haven't been able to find any documentation about where it is on macOS).
system specs: macbook pro M1 Pro (10 core) 32 GB RAM macOS monterey 12.3.1 rpcs3 version 0.0.21-13446-21f744e2 (manually patched to use libmoltenVK.dylib v1.1.6 to fix a compatibility issue with kingdom hearts 1.5)
edit: found logs TTY.log RPCS3.log.gz
i'm getting the same issue as @LeronHinds too with a 100% OEM dualsense controller (bought new in box like 4 days ago). it seems to be directly correlated with the dualsense pad going into sleep mode and disconnecting, so i'm not sure it's actually in scope of this ticket as reported (i will open a new ticket if asked to do so).
log reports:
F {Pad Thread} SIG: Thread terminated due to fatal error: Segfault reading location 00000000000000e0 at 00007ff8157acb0b. Emu Thread Name: 'Pad Thread'.and it's reproducible, too:
- boot game
- go into a pause menu or something
- wait for dualsense controller to fall asleep and disconnect
- segfault
i'll happily provide any further information upon request and a full log if someone could direct me to the log location on macOS (it's not in ~/.cache like on linux and i haven't been able to find any documentation about where it is on macOS).
system specs: macbook pro M1 Pro (10 core) 32 GB RAM macOS monterey 12.3.1 rpcs3 version 0.0.21-13446-21f744e2 (manually patched to use libmoltenVK.dylib v1.1.6 to fix a compatibility issue with kingdom hearts 1.5)
edit: found logs TTY.log RPCS3.log.gz
still reproduceable, on same metal mac on MacOS Ventura, with DualShock4 on rpcs3 0.0.25-14360
i guess it's a general error not realted to particular game, since we have a Segfault reading location.
I was having this issue because of my dualsense. Not sure if its related but my games would crash every time i was using that controller. I switched to xinput and its stable. Anyone know why?
This is still a thing in November 2024. Can restart the PC and play one game okay, that'll boot, then anything after that will crash/lockup the emulator. Unplug the controller and it'll launch games again. Nacon ps4 controller. Bizarre that this is still a thing :( Absolutely zero problem with this controller on any other emulators, or games for that matter.
I also have a Hori pad, wireless, and RPCS3 launches stuff fine with that connected. Definitely an issue with Nacon stuff (and 8bit do and some others it seems?). Why would/could this be? Seems very odd. Nacon are a massive 3rd party pad company, too, and a lot of people have those pads. They're one of the best "low end" pads available. Would be great if this could get resolved.
I also have this similar issue, on mac, with connection DS4 bluetooth. When opening video is done for GOW HD collection, it crushed. When I choose keyboard as player 1, then I could passthrough GOW HD version selection, and entered into GOW V1. I did a workaround for savestate with this GOW1 submenu. Attaching logs with this issue RPCS3.log
I had the same issue on macOS and worked around it by changing DualSense to SDL on Pads menu,
But wanted to see what is going on here and spotted the following in two different crashes,
Thread 66 Crashed:: Pad Thread
0 CoreFoundation 0x18504d5a4 __CFCheckCFInfoPACSignature + 44
1 CoreFoundation 0x184f51128 CFRunLoopAddSource + 92
2 IOKit 0x188d57bac IOHIDDeviceScheduleWithRunLoop + 88
3 IOKit 0x188dba6f4 __IOHIDManagerDeviceApplier + 632
4 IOKit 0x188d1abd4 __IOHIDManagerDeviceAdded + 800
5 IOKit 0x188d1a76c __IOHIDManagerSetDeviceMatching + 368
6 IOKit 0x188d1a578 IOHIDManagerSetDeviceMatchingMultiple + 220
7 IOKit 0x188d5b090 IOHIDManagerSetDeviceMatching + 92
8 rpcs3 0x104b84ed4 hid_enumerate + 356
9 rpcs3 0x10490cfa8 hid_pad_handler<DualSenseDevice>::enumerate_devices() + 176
10 rpcs3 0x10490cd2c hid_pad_handler<DualSenseDevice>::Init() + 676
11 rpcs3 0x1049297dc pad_thread::Init() + 2380
12 rpcs3 0x10492abf4 pad_thread::operator()() + 56
13 rpcs3 0x104775ed0 named_thread<pad_thread>::trampoline(void*) + 40
14 libsystem_pthread.dylib 0x184e8ec0c _pthread_start + 136
15 libsystem_pthread.dylib 0x184e89b80 thread_start + 8
Thread 65 Crashed:: Pad Thread
0 CoreFoundation 0x18504d5a4 __CFCheckCFInfoPACSignature + 44
1 CoreFoundation 0x184f51128 CFRunLoopAddSource + 92
2 IOKit 0x188d57bac IOHIDDeviceScheduleWithRunLoop + 88
3 IOKit 0x188dba6f4 __IOHIDManagerDeviceApplier + 632
4 IOKit 0x188d1abd4 __IOHIDManagerDeviceAdded + 800
5 IOKit 0x188d1a76c __IOHIDManagerSetDeviceMatching + 368
6 IOKit 0x188d1a578 IOHIDManagerSetDeviceMatchingMultiple + 220
7 IOKit 0x188d5b090 IOHIDManagerSetDeviceMatching + 92
8 rpcs3 0x104e24ed4 hid_enumerate + 356
9 rpcs3 0x104bacfa8 hid_pad_handler<DualSenseDevice>::enumerate_devices() + 176
10 rpcs3 0x104bacd2c hid_pad_handler<DualSenseDevice>::Init() + 676
11 rpcs3 0x104bc97dc pad_thread::Init() + 2380
12 rpcs3 0x104bcabf4 pad_thread::operator()() + 56
13 rpcs3 0x104a15ed0 named_thread<pad_thread>::trampoline(void*) + 40
14 libsystem_pthread.dylib 0x184e8ec0c _pthread_start + 136
15 libsystem_pthread.dylib 0x184e89b80 thread_start + 8
And by a quick search it seems this is the case here https://github.com/signal11/hidapi/issues/205#issuecomment-527654560 and use of hid_enumerate apparently isn't thread safe and may need a thread lock.
I also have this similar issue, on mac, with connection DS4 bluetooth. When opening video is done for GOW HD collection, it crushed. When I choose keyboard as player 1, then I could passthrough GOW HD version selection, and entered into GOW V1. I did a workaround for savestate with this GOW1 submenu. Attaching logs with this issue RPCS3.log this solved by select SDL. mentioned by ebraminio
@victorhujie and others who had the issue specifically in macOS, thanks to great work of @Megamouse in #17284 this should be resolved without a need to change the controller to SDL in Pads menu. Non-macOS ports also should be improved (tests are welcome) but this should specifically improved the macOS side as far as I could test going from immediately constant crash to working without crash for hours.
Before testing please make sure build number of the version you are testing is 18001 or higher and if you still have some crash issue, please switch to SDL (the app should be restarted to take effect it seems) to if see if this is the same root as this issue and uploading any form of log if something went wrong will be great. Thanks
@victorhujie, @Funkyspectrum, @ebraminio all issues on controllers should be fixed. Please retest