MidiKeyboardComponent crashes on iOS


#1

When attempting to use the keyboard to play more than one note at once, I get a JUCE Assertion failure in juce_Array.h:255

This is happening in my app and the Juce Demo (running the latest version of Juce of course).  I saw a previous post about this from a year ago, but there didn't seem to to be any resolution to the issue. Whatcha think Jules?

 

 


#2

Works perfectly for me. What's the stack trace?


#3

here you go. this is running on a retina iPad on iOS 7.0 if that helps at all:

 


#0    0x384c56e4 in __kill ()
#1    0x00065c64 in juce::Array<int, juce::DummyCriticalSection, 0>::getUnchecked(int) const at /Users/nhdika/Code/JUCE/modules/juce_audio_basics/../juce_core/containers/juce_Array.h:255
#2    0x00140d2a in juce::MidiKeyboardComponent::updateNoteUnderMouse(juce::Point<int>, bool, int) at /Users/nhdika/Code/JUCE/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp:698
#3    0x00140cd8 in juce::MidiKeyboardComponent::updateNoteUnderMouse(juce::MouseEvent const&, bool) at /Users/nhdika/Code/JUCE/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp:691
#4    0x00140ff0 in juce::MidiKeyboardComponent::mouseEnter(juce::MouseEvent const&) at /Users/nhdika/Code/JUCE/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp:786
#5    0x00273294 in juce::Component::internalMouseEnter(juce::MouseInputSource, juce::Point<int>, juce::Time) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/components/juce_Component.cpp:2370
#6    0x00347c7e in juce::MouseInputSourceInternal::sendMouseEnter(juce::Component&, juce::Point<int>, juce::Time) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp:115
#7    0x00346ebe in juce::MouseInputSourceInternal::setComponentUnderMouse(juce::Component*, juce::Point<int>, juce::Time) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp:238
#8    0x0037866e in juce::MouseInputSourceInternal::setPeer(juce::ComponentPeer&, juce::Point<int>, juce::Time) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp:253
#9    0x002f3210 in juce::MouseInputSourceInternal::handleEvent(juce::ComponentPeer&, juce::Point<int>, juce::Time, juce::ModifierKeys) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp:300
#10    0x002761aa in juce::MouseInputSource::handleEvent(juce::ComponentPeer&, juce::Point<int>, long long, juce::ModifierKeys) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp:566
#11    0x002e2db8 in juce::ComponentPeer::handleMouseEvent(int, juce::Point<int>, juce::ModifierKeys, long long) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:87
#12    0x002eccb6 in juce::UIViewComponentPeer::handleTouches(UIEvent*, bool, bool, bool) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm:743
#13    0x002ec9fa in -[JuceUIView touchesBegan:withEvent:] at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm:367
#14    0x30089b0c in -[UIWindow _sendTouchesForEvent:] ()
#15    0x30084c08 in -[UIWindow sendEvent:] ()
#16    0x30059f58 in -[UIApplication sendEvent:] ()
#17    0x30058746 in _UIApplicationHandleEventQueue ()
#18    0x2d89af26 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#19    0x2d89a474 in __CFRunLoopDoSources0 ()
#20    0x2d898bde in __CFRunLoopRun ()
#21    0x2d803540 in CFRunLoopRunSpecific ()
#22    0x2d803322 in CFRunLoopRunInMode ()
#23    0x325072ea in GSEventRunModal ()
#24    0x300ba1e4 in UIApplicationMain ()
#25    0x002ef986 in juce::juce_iOSMain(int, char const**) at /Users/nhdika/Code/JUCE/modules/juce_gui_basics/native/juce_ios_Windowing.mm:79
#26    0x001e21dc in juce::JUCEApplicationBase::main(int, char const**) at /Users/nhdika/Code/JUCE/modules/juce_events/messages/juce_ApplicationBase.cpp:211
#27    0x0001ce5e in main at /Users/nhdika/Code/JUCE/extras/JuceDemo/Source/ApplicationStartup.cpp:174
 


#4

Ah, it's a touch-screen.. I was only testing with a physical keyboard. Thanks, I'll have a look at that when I get a moment.


#5

FYI this should be fixed now.