Crash when starting app on OS X Lion when enumerating HID devices

Bug #1019542 reported by Kamil Figiela
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Critical
RJ Skerry-Ryan

Bug Description

App just after the main window shows up. Backtrace says it is problem with HID devices. I attached full crash log from os x with backtrace, hardware spec etc.

Regarding my HID devices:
 - MacBook keyboard & trackpad
 - Bluetooth Apple Keyboard and Trackpad (not connected at the moment)
 - USB Soundcard with two buttons (not connected at the moment)

I tried connecting those devices and nothing changes.

Thread 9 Crashed:
0 com.apple.framework.IOKit 0x99bf312e IOHIDManagerCopyDevices + 15
1 org.mixxx.mixxx 0x004520b3 HidControllerPresetFileHandler::~HidControllerPresetFileHandler() + 5699
2 org.mixxx.mixxx 0x0015b90c QDebug::~QDebug() + 18348
3 org.mixxx.mixxx 0x004e485a ControllerEngineConnectionScriptValue::~ControllerEngineConnectionScriptValue() + 2490
4 QtCore 0x009e912a QMetaCallEvent::placeMetaCall(QObject*) + 42
5 QtCore 0x009e9bda QObject::event(QEvent*) + 1018
6 QtGui 0x00cf50bc QApplicationPrivate::notify_helper(QObject*, QEvent*) + 188
7 QtGui 0x00cfb6f9 QApplication::notify(QObject*, QEvent*) + 2041
8 QtCore 0x008ec36c QCoreApplication::notifyInternal(QObject*, QEvent*) + 108
9 QtCore 0x009dd2fe QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 734
10 QtCore 0x00a0315f QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 63
11 QtCore 0x009dbbd1 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
12 QtCore 0x009dbf1a QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 170
13 QtCore 0x0091f76d QThread::exec() + 157
14 QtCore 0x009206b6 QThreadPrivate::start(void*) + 150
15 libsystem_c.dylib 0x93369ed9 _pthread_start + 335
16 libsystem_c.dylib 0x9336d6de thread_start + 34

Related branches

Revision history for this message
Kamil Figiela (kamil-figiela) wrote :
Revision history for this message
Kamil Figiela (kamil-figiela) wrote :

I forgot to mention the fact that Mixxx was working perfectly just two days ago (the same version). I cleared configuration (file in ~/Library/Preferences and ~/Library/Application Support/Mixx) and did reboot OS X and problem persists.

I found project https://github.com/signal11/hidapi and created additional attachment from the output of hidtest program. They probably had similar issue https://github.com/signal11/hidapi/issues/26 with this API.

Revision history for this message
Kamil Figiela (kamil-figiela) wrote :

I forgot to mention the fact that Mixxx was working perfectly just two days ago (the same version). I cleared configuration (file in ~/Library/Preferences and ~/Library/Application Support/Mixx) and did reboot OS X and problem persists.

I found project https://github.com/signal11/hidapi and created additional attachment from the output of hidtest program. They probably had similar issue https://github.com/signal11/hidapi/issues/26 with this API.

Revision history for this message
jus (jus) wrote :

Same issue here with OSX 10.6.8 and Mixxx 1.11beta1.
Just got a new graphic tablet cause my old one died, and if it is connected Mixxx crashes on startup.
.....
Debug [Main]: Displaying mixxx
Debug [Controller]: ControllerManager: Setting up devices
Debug [Controller]: Scanning PortMIDI devices:
Debug [Controller]: Scanning HSS1394 devices:
Reading symbols for shared libraries + done
Debug [Controller]: Nodes detected: 0
Debug [Controller]: Scanning HID devices:
Reading symbols for shared libraries + done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010
[Switching to process 64868 thread 0x8703]
0x00007fff81f0202a in IOHIDManagerCopyDevices ()
Crashed Thread: 9

Thread 9 Crashed:
0 com.apple.framework.IOKit 0x982d85d5 IOHIDManagerCopyDevices + 16
1 org.mixxx.mixxx 0x00455eb3 hid_enumerate + 83
2 org.mixxx.mixxx 0x0015d1cc ControllerManager::slotSetUpDevices() + 252
3 org.mixxx.mixxx 0x004e865a ControllerManager::qt_metacall(QMetaObject::Call, int, void**) + 762
4 QtCore 0x00bdb12a QMetaCallEvent::placeMetaCall(QObject*) + 42
5 QtCore 0x00bdbbda QObject::event(QEvent*) + 1018
6 QtGui 0x00ee70bc QApplicationPrivate::notify_helper(QObject*, QEvent*) + 188
7 QtGui 0x00eed6f9 QApplication::notify(QObject*, QEvent*) + 2041
8 QtCore 0x00ade36c QCoreApplication::notifyInternal(QObject*, QEvent*) + 108
9 QtCore 0x00bcf2fe QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 734
10 QtCore 0x00bf515f QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 63
11 QtCore 0x00bcdbd1 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
12 QtCore 0x00bcdf1a QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 170
13 QtCore 0x00b1176d QThread::exec() + 157
14 QtCore 0x00b126b6 QThreadPrivate::start(void*) + 150
15 libSystem.B.dylib 0x90182259 _pthread_start + 345
16 libSystem.B.dylib 0x901820de thread_start + 34

Revision history for this message
Kamil Figiela (kamil-figiela) wrote :

This bug is somehow non deterministic, today I tried to start Mixxx beta and it works fine.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 1019542] Re: Crash when starting app on OS X Lion when enumerating HID devices

Jus -- can you try a more recent 1.11 build? I think I fixed this in
lp:mixxx/1.11 r3291

On Wed, Jul 4, 2012 at 11:17 AM, Kamil Figiela <email address hidden>wrote:

> This bug is somehow non deterministic, today I tried to start Mixxx beta
> and it works fine.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1019542
>
> Title:
> Crash when starting app on OS X Lion when enumerating HID devices
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1019542/+subscriptions
>

Revision history for this message
jus (jus) wrote :

Tried with fresh 1.11.0-beta2-pre bzr r3297 installation which crashed too.
Note: Compiled with "scons shoutcast=0" , probably wont matter but who knows (shoutcast=1 wont compile since months).

If i disconnect the device, Mixxx starts with no prob.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks -- I suspect this is an issue with hidapi because it looks like it crashes on a simple call to hid_enumerate.

Could you try building hidapi's 'hidtest' program and seeing if that crashes?

Try this:
git clone git://github.com/signal11/hidapi.git
cd hidapi/mac
make
./hidtest

Changed in mixxx:
importance: Undecided → Critical
milestone: none → 1.11.0
status: New → Confirmed
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
jus (jus) wrote :

Does not crash with the device connected

localhost:mac user$ ./hidtest
Device Found
  type: 056a 00de
  path: USB_056a_00de_0x100505990
  serial_number:
  Manufacturer: Wacom Co.,Ltd.
  Product: CTH-470
  Release: 100
  Interface: -1

Device Found
  type: 05ac 0246
  path: USB_05ac_0246_0x10050a750
  serial_number:
  Manufacturer: Apple Inc.
  Product: Apple Internal Keyboard / Trackpad
  Release: 108
  Interface: -1

Device Found
  type: 05ac 0221
  path: USB_05ac_0221_0x100501000
  serial_number:
  Manufacturer: Apple, Inc
  Product: Apple Keyboard
  Release: 69
  Interface: -1

Device Found
  type: 05ac 8242
  path: USB_05ac_8242_0x1005047d0
  serial_number:
  Manufacturer: Apple Computer, Inc.
  Product: Apple IR
  Release: 16
  Interface: -1

Device Found
  type: 05ac 0246
  path: USB_05ac_0246_0x100507c10
  serial_number:
  Manufacturer: Apple Inc.
  Product: Apple Internal Keyboard / Trackpad
  Release: 108
  Interface: -1

Device Found
  type: 05ac 0246
  path: USB_05ac_0246_0x10050b910
  serial_number:
  Manufacturer: Apple Inc.
  Product: Apple Internal Keyboard / Trackpad
  Release: 108
  Interface: -1

Device Found
  type: 05ac 0246
  path: USB_05ac_0246_0x100509630
  serial_number:
  Manufacturer: Apple Inc.
  Product: Apple Internal Keyboard / Trackpad
  Release: 0
  Interface: -1

Device Found
  type: 056a 00de
  path: USB_056a_00de_0x100506bb0
  serial_number:
  Manufacturer: Wacom Co.,Ltd.
  Product: CTH-470
  Release: 100
  Interface: -1

Device Found
  type: 0000 0000
  path:
  serial_number:
  Manufacturer:
  Product: Apple Mikey HID Driver
  Release: 0
  Interface: -1

Device Found
  type: 05ac 0221
  path: USB_05ac_0221_0x100503660
  serial_number:
  Manufacturer: Apple, Inc
  Product: Apple Keyboard
  Release: 69
  Interface: -1

unable to open device
localhost:mac user$

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Since this is fixed in hidapi but not yet part of a release I've put together a pre-release of hidapi 0.8.0 and imported that into our tracker. It includes every commit up through commit a22320f76d66db269cbb3e709a23231990bc9b69. https://github.com/signal11/hidapi/commit/a22320f76d66db269cbb3e709a23231990bc9b69

Could you please give lp:mixxx/1.11 r3410 a try?
Builds should show up here shortly: http://builds.mixxx.org/builds/release-1.11.x/r3410/

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Tentatively marking this fixed since I haven't heard anything back from Kamil.

Thanks for the report!

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6549

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.