Project

General

Profile

Actions

Emulator Issues #11399

closed

SDL2 Crash on Exit on Linux - Device objects live beyond backend shutdown due to shared_ptr usage

Added by Anonymous over 5 years ago. Updated over 5 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-9320

Description

What's the problem? Describe what went wrong.

On Linux, when Dolphin is built with SDL support, Dolphin Segfaults on exit if an xbox360 gamepad is attached (I do not have other gamepads to test this with, so other gamepads may or may not be affected)

What steps will reproduce the problem?

  1. Build Dolphin for Linux with SDL support
  2. Launch Dolphin, configure the Gamepad for SDL
  3. Exit Dolphin, Dolphin will now crash with a segmentation fault

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

5.0-8743-dirty
Branch: HEAD
Revision: a61036abfed95e8d1e193222e7eaa23fac4c6f43

What are your PC specifications? (CPU, GPU, Operating System, more)

CPU: i7-4771
GPU: GTX 760
OS: Gentoo Linux 64-bit, Gnome Desktop

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Backtrace with line numbers and debug symbols

Actions #1

Updated by JosJuice over 5 years ago

  • Priority changed from Normal to Low

Dolphin's SDL support is a bit legacy by now. I'll keep this issue open in case someone wants to take a look at the problem, though.

Actions #2

Updated by Billiard26 over 5 years ago

  • Subject changed from SDL2 Crash on Exit on Linux to SDL2 Crash on Exit on Linux - Device objects live beyond backend shutdown due to shared_ptr usage
  • Status changed from New to Accepted
  • Assignee set to Billiard26
  • Priority changed from Low to Normal

Upon closer examination this is actually the sign of a bigger problem. shared_ptr are all over the place and are causing Device objects to be destructed after input backends are shutdown. It's surprising that SDL is the only one to experience a crash as this is wrong for all the backends. Some weak_ptr are in order.

Actions #3

Updated by Billiard26 over 5 years ago

  • Status changed from Accepted to Fix pending
Actions #4

Updated by JosJuice over 5 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-9320
Actions

Also available in: Atom PDF