Skip to content

CoreMIDI4J doesn't like repeatedly disconnecting devices #19

@eclab

Description

@eclab

I'm getting a lot of crashes after disconnecting devices and reconnecting again (perhaps 3 or 4 times -- not many!). This is in Edisyn (https://github.com/eclab/edisyn/), from selecting the "MIDI:Change MIDI" menu 3 or 4 times. Try it out! I'm running Java 1.7.0_51 on OS X 10.9.5. I'll usually get a hang or a hard VM dump. Example VM dump stack trace:

uk.co.xfactorylibrarians.coremidi4j.CoreMidiException: Exception in CoreMIDI JNI Library by "MIDIPortDisconnectSource" - OS STatus Code: ffffd5af
	at uk.co.xfactorylibrarians.coremidi4j.CoreMidiInputPort.midiPortDisconnectSource(Native Method)
	at uk.co.xfactorylibrarians.coremidi4j.CoreMidiInputPort.disconnectSource(CoreMidiInputPort.java:71)
	at uk.co.xfactorylibrarians.coremidi4j.CoreMidiSource.close(CoreMidiSource.java:130)
	at edisyn.Synth.gatherMidiDevices(Synth.java:1203)
	at edisyn.Synth.setupMIDI(Synth.java:486)
	at edisyn.Synth.setupMIDI(Synth.java:468)
	at edisyn.Synth$14.actionPerformed(Synth.java:780)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:128)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:708)
	at java.awt.EventQueue$4.run(EventQueue.java:706)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x00007fff754e8340, pid=18392, tid=77059
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [CoreFoundation+0xe6899340]  OBJC_METACLASS_$___NSCFString+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/sean/java/distros/edisyn.git/trunk/hs_err_pid18392.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions