MIDI DESIGNER
The only MIDI controller for iPad, iPhone, and Mac


Talk to other MIDI Designer users about MIDI Designer, iOS MIDI and related topics. Or share layouts, pages, and ideas.

Check out our Facebook Group.

Of course, if you want to send us an email, feel free.

Open problem reports

Summary of user requests
Crashing on Batch Sends on iOS 14.2 - MIDI Designer Q&A

Crashing on Batch Sends on iOS 14.2

0 votes
asked Nov 13, 2020 in Defect (Fixed) by adamixoye (500 points)
recategorized Dec 15, 2020 by MIDI Designer Team (Dan)
Unable to repro on iPhone 14.2 but crashes are relatively easy to fix. Let’s see how fast we can have the team do this, thanks
Are these just normal pickers? You mentioned something about stream byter.
The pickers I was using are supercontrols, and some of the subs are processed through Stream Byter.  I would have to look at it to double check on the details.

I would also have to double check if any non-super pickers or non-Stream Byter commands cause crashing.  I tested a handful that are my most used commands, but I think those are mostly supers and/or involve Stream Byter.
I think we can see the crashes... is it iPad Pro (12.9-inch) (Model A1584) [and don't worry that's not a serial number ;)]?

If that's the case, it's pretty deep in the CoreMIDI stuff, so it might hard to fix.

However, it might be our SB integration. I'll try some sample scripts and circle back.

Sadly (and happily), even with an iPad on iOS 14.2, I'm not able to repro with simple pickers.
not even able to repro using some simple SB output rules. I'm not saying you're not facing a real problem, but we'll have to find out more about it. Thanks!
You're correct on the model info
I could send the layout if that would help
send the layout directly to support, don't use the previous Zendesk ticket as it strips attachments. Thanks!
Sent to the support email from the app, if there is an issue let me know.
Adam can you confirm this is fixed in the latest Beta ("Next") please? Thanks!
No, it's still broken with those two main pickers that are supers.  :-(  Crashes every time.  Everything else I've tried, including other pickers, seems okay.
Just put up another build, pretty confident it solves for your case (or breaks everything). Thanks!
Broke everything for me - crashes on load
Just submitted a new build, startup crash should be mitigated. Sorry about this but we're having trouble repro'ing some of these errors.
Still crashing on startup.  Stays open for seconds at most.
Got it, our technicians are working on your problem and can reproduce the crash. Which is where we were about 24 hours ago, more or less, but at least we're holding the line. I"ll be back when we have an update. Thanks.
No fix at the present time. MD Next will work but won't solve this crash.
We spent a fair bit of time on this crash in the lab today. As far as we can tell, this is a bug in CoreMIDI. We'll try to reproduce the issue better and then file a radar, but for now the answer is going to be to "hold tight."
Adam: while it looks like there's nothing interesting about the MIDI messages that are causing the crash, AND the crashes aren't helped by slowing things down... your layout is pretty unique in terms of producing these crashes. The best way you can help -- in case there's something you're doing that you could avoid doing -- is to "bracket the problem." Remove everything from your layout until the crashes no longer happen... This includes entire  pages of controls and SB rules too. Here's an example: the crashes still happen even if you remove EVERY page but the crashing one. So that moves the investigation forward a bit. Etc.

We haven't seen a lot of crashing out there, so we'd like to know what your layout does that others do not.

Thanks!
Dan
Seems like removing Bank 1 Page 3 will stop the crashing. So now you could narrow it down within that page, Adam, please. Also: are you aware that you have something like 6 banks filled with pages? Check the Page Arranger available under Page Properties... you might want to pare your layout down for sanity (doesn't help the crashes though)... Seems like the answer is somewhere in page 3 (I think).
While this makes NO sense at all, if you delete the control just to the right of SY-300 On/Off Toggle on Bank 1 Synth Page -- or change it's CC address -- the crashing stops. No idea why this control changes your outcomes, it looks quite normal from all perspectives and sends out find alone.

Let me know if you can verify this workaround.
Alright, now we're getting somewhere!  When I remove the "SY-300 Presets" picker (on Bank 1 Page 3) as a sub to the "Sounds and Songs" picker on Bank 1 Page 1, that stops the crashes.  I have assigned and unassigned this and that's definitely the issue.

The also somewhat predictably fixes the "Current Song Set" picker, the other picker that was crashing, because it's a super for "Sounds and Songs."

The SY-300 picker doesn't crash it by itself.  Something about it as a sub of the "Sounds and Songs."  The control in MD is a pitch bend that then gets filtered into Stream Byter to do a bank/song select.  I have a similar control ("Beat Buddy Songs" on Bank 1 Page 5), I don't know why the one works and the other doesn't.  But the SY-300 control is by far the more expendable of the two, so that's good news for me.

Re: my layout, I've created MD pages for almost every MIDI controlled pedal I've ever owned and just stash them in this master layout.  I only use a couple of pages regularly.  Some pages should probably be "archived" as I don't even own the pedal anymore.  But unless there is strong performance reason that I shouldn't be doing this I kind of like it as is.
We cross-posted, I found the same thing.  That's a fix I can definitely live with this as a fix for now, perhaps permanently, I just hope I don't accidentally recreate it in another context.
I'd love to dive deeper from the black-box diagnosing side. Fixing your layout and giving you a workaround is great, of course, but the larger goal here is to produce the simplest possible layout in which this bug occurs. Unfortunately, deleting your SB rules *also* fixes the bug, so... weird times.
I don't know if you dug into my SB rules but they have decent documentation / commenting.  I'm assuming that the issue is in the SB rules that pertain to the SY-300 control.  I bet if you delete just that part it fixes it as well, the real issue is probably in what is triggered by that control.  I am in a hurry, I can be a little more specific in a follow-up later.
I haven't tested, but I'm betting this is the troublesome SB code somehow:

IF M0 == E9 # Channel 10 Pitch Bend

  # Incoming pitch change values 1-169
  # Coded in MSB (M2) and LSB (M1)
  # is to represent out messages for selecting
  # Bank 0, Program 1-99
  # Band 1, Program 1-70

  # Calculate the values to send
  # L1 = Bank number
  # L2 = PC number

  IF M2 == 0
    IF M1 < 63
      ASS L1 = 0
      ASS L2 = M1
    END
    IF M1 > 62
      ASS L1 = 1
      MAT L2 = M1 - 63
    END
  END

  IF M2 == 1
    ASS L1 = 1
    MAT L2 = M1 + 1D
  END

  SND B9 00 L1 # Bank Select MSB
  SND B9 20 L1 # Bank Select LSB
  SND C9 L2 # Program Select +D200 +I

  EA = XX +B # Block the Pitch Bend
END
You would think but in my testing it didn't work.

Don't be surprised if the solution doesn't follow any logic. It's revealing some bug in CoreMIDI. There isn't even a bug in SB, but rather something that is causing CoreMIDI to crash. Even worse, I've inspected the packet that is causing CoreMIDI to crash and it's got nothing particular to it.

Luckily the scientific method works just as well when stuff makes no sense at all.
It's actually this piece

#==============
# Delayed On/Off
#==============
IF M0 == B9 08
  IF M2 == 7F
    SND F0 41 11 00 00 00 13 12 30 00 00 00 01 4F F7 +F +D4000
  END
  IF M2 == 00
    SND F0 41 11 00 00 00 13 12 30 00 00 00 00 50 F7 +F +D4000
  END

  B9 08 = XX XX +B # Block the Incoming CC
END

which might be random, or might be the delays.
I think the +F's are "ignore normal MIDI byte limits" so it might be perfect storm
On the gripping hand... I'm experiencing crashes too, and I've got no SB rules at all. So hopefully we'll find some kind of workaround soon for iOS 14.2.
@Adam please try latest beta 202011232222... it might fix this crash once and for all. Thanks!
First test worked!  I added those controls back in as subs, without changing anything in my SB rules, and the pickers are no longer causing a crash.  I'll keep testing.

Curious if you have a good handle on what fixed it?
Yes, it was just some low level C code that has always been wrong. Not sure what changed in iOS 14.2 that revealed this issue.
Uh oh.

All my testing previously had been in the program to see if it would crash or not.  I wasn't connecting to any devices.

I'm having an actual connection issue that I wasn't having before, it's not talking to one of my devices, a WIDI Master.  At all.  It's talking to a different device.  The device it's talking to is an "in" connection (device --> MD), it's not talking to an "out" connection (MD --> WIDI Master).

Anyway I can get an emergency rollback?
I rolled back to 202011220924 and my connection worked so there is definitely something about 202011232222 that is not compatible with my WIDI Master.

I had one crash in 202011220924 with the troublesome sub controls connected (but it wasn't crashing consistently like in earlier builds), so I disconnected them and I will continue to monitor.
Okay we've got some things to work through but the lab techs are off for the next few days

More soon thank you!
Hey Adam, looked through the builds and deltas... not seeing anything that could give you that result. I'm hoping/guessing it's an experimental error on your side. We'll send up another build today and see how it plays. Thanks!
Latest -- 202011271515 -- should roll back anything weird with your WIDI in the connection problems. In fact, I'm pretty sure that NO midi worked at all in 202011220924... but anyway, let's see how this goes. I can't figure out if it's a) very crashy or 2) not too crashy at all. Thanks!
Are those build numbers right?  MIDI was working for me in 0924, not 2222, that's why I rolled back to 0924.

I will test soon either way.
They are year, month, Day, Hour, minute

because Apple says they have to be ascending
Sadly, the low level code bug was fake news. Let's see how the latest build works out. At some point will figure out the problem in your layout. For now, you have a work around.
Yeah, I get the naming convention, I was just curious about your post which seemed to reference the opposites regarding what did/didn't work.  A little irrelevant now.

New build seems to work...connections are working, no crashes yet.
Yeah sorry I meant in 202011232222 no MIDI at all worked...

Getting excited to build some confidence around the latest build and possibly ship in the next week or so. I might have to use the red phone to call some users. Keep testing and reporting, please. Thanks!
To be clear though, I didn't try the weird sub/picker combo that was giving me trouble, I'll do that soon.  Right now that's not important to me, what I care about is that everything else is functional which so far it is...
Yeah it still doesn't like those subs.
Yes and I can repro that problem. Baffling but at least possible to figure out in theory
The good news is that EITHER iOS 14.3 (still in beta) OR the latest Xcode (and therefore the latest version of Beta) fixes this issue definitively. Looking forward to finding out which, thanks for the patience!
It's iOS 14.3 that will fix. We've only tested on the Simulator but we're 99% sure that Apple unscrewed CoreMIDI and fixed the problem in iOS 14.3. Since it releases in less than 24 hours... we'll see.
I can’t believe how shocked I am pleased I am to report that it’s working. iOS 14.3 fixes it. Amazing.

1 Answer

+1 vote
 
Best answer
Fixed in iOS 14.3
answered Dec 15, 2020 by MIDI Designer Team (Dan)
...