Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retroarch crashing after unplugging and plugging controller #14459

Open
vitormmatos opened this issue Oct 2, 2022 · 6 comments
Open

Retroarch crashing after unplugging and plugging controller #14459

vitormmatos opened this issue Oct 2, 2022 · 6 comments

Comments

@vitormmatos
Copy link

Retroarch v1.10.3
OS: MacOS BigSur (Intel)
Controller: Dualshock 4


While plugging the controller, it does not get recognized at first try.
When unplugging and plugging again, few times it actually works, most of the times it just crashes.

Not sure if this should be 2 separate issues, but here it is nevertheless.

@LibretroAdmin
Copy link
Contributor

Give us a stack trace

@vitormmatos
Copy link
Author

RetroArch(45274,0x1099d6e00) malloc: *** error for object 0x7f7ffa17fa00: pointer being freed was not allocated
RetroArch(45274,0x1099d6e00) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort ./RetroArch

@LibretroAdmin
Copy link
Contributor

Needs to be a much more thorough stacktrace, that is not enough to go on and can't really be debugged.

@vitormmatos
Copy link
Author

There wasn't generated a log file.
The best that could be done was to run it in the terminal and replicate the issue, and that's what I did.

Any suggestions?

@LibretroAdmin
Copy link
Contributor

Compile and run/debug RetroArch from Xcode, then a stack trace should show up.

serakeri added a commit to serakeri/RetroArch that referenced this issue Feb 21, 2023
Prevent double free and null dereference when the controller is quickly reconnected.
Handle error when controller device query returns null instead of crashing.
@serakeri
Copy link
Contributor

It was difficult to reproduce but I saw the same issue. Most of the crashes I saw were related to double frees. I've been using the changes for a while with no crashes even when trying to disconnect and reconnect the controller quickly. I updated my local repo and saw a new controller related crash that I sent a separate pull request for first.

LibretroAdmin pushed a commit that referenced this issue Feb 21, 2023
Prevent double free and null dereference when the controller is quickly reconnected.
Handle error when controller device query returns null instead of crashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants