We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4668 - Libsdl 2.0.9 crash on macOS with joystick attached (usb, bluetooth...)
Summary: Libsdl 2.0.9 crash on macOS with joystick attached (usb, bluetooth...)
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.9
Hardware: x86_64 macOS 10.13
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-17 01:41 UTC by Weedy Weed Smoker
Modified: 2019-06-17 05:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Weedy Weed Smoker 2019-06-17 01:41:59 UTC
Libsdl 2.0.9 crashes SDL MAME 64-bit (http://sdlmame.lngn.net) on macOS (10.13 & 10.14 were tested) whenever a joystick is plugged in or connected via Bluetooth... Reverting to v2.0.8 fixes the issue !

Crash log :

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Floating point exception: 8
Termination Reason:    Namespace SIGNAL, Code 0x8
Terminating Process:   exc handler [0]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   mame64                        	0x0000000111d404c9 input_device_joystick::adjust_absolute_value(int) const + 57
1   mame64                        	0x0000000111d41616 input_device_absolute_item::read_as_switch(input_item_modifier) + 54
2   mame64                        	0x0000000111d3a9ff input_manager::code_value(input_code) + 511
3   mame64                        	0x0000000111d3ce3a input_manager::seq_pressed(input_seq const&) + 202
4   mame64                        	0x0000000111e13ca7 ui_input_manager::frame_update() + 55
5   mame64                        	0x0000000111d87b22 running_machine::call_notifiers(machine_notification) + 82
6   mame64                        	0x0000000111e24c5b video_manager::frame_update(bool) + 315
7   mame64                        	0x0000000111d86157 running_machine::run(bool) + 855
8   mame64                        	0x000000010ec1d745 mame_machine_manager::execute() + 613
9   mame64                        	0x000000010eaa9615 cli_frontend::start_execution(mame_machine_manager*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 661
10  mame64                        	0x000000010eaaadce cli_frontend::execute(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 78
11  mame64                        	0x000000010ec1e1d1 emulator_info::start_frontend(emu_options&, osd_interface&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 49
12  mame64                        	0x000000010ea9584b main + 219
13  libdyld.dylib                 	0x00007fff73a2c015 start + 1
Comment 1 Weedy Weed Smoker 2019-06-17 01:50:05 UTC
Compiled the latest snapshot of LibSDL, and the issue persists...
Comment 2 Ryan C. Gordon 2019-06-17 05:08:21 UTC
input_device_joystick is not a symbol in SDL; this is crashing in SDLMAME. If the SDLMAME devs think we're handing back bad data from SDL, causing the crash, please feel free to reopen this bug, but at the current time it doesn't appear to be on our end.

--ryan.