Jump to content

MIDI Patch Change CRASH - Anyone seen it?


timbertune
Go to solution Solved by des99,

Recommended Posts

Wonder if anyone’s seen this odd crash? It’s 100% repeatable both on my previous Intel iMac and now on my new M2 Mac Studio. I have an old Roland XV2020 connected to the Mac over a MOTU Micro Express interface. It’s all configured in my template's Logic Environment and the XV has been there for years without issue…. But for the last 6 months or so, if I select the patch browser for the XV (by double clicking the icon on the track in Logic’s arrange page), I can scroll thru the patches - BUT then one of two things will always happen. A) Logic quits immediately if I click on a patch, or B) Logic freezes graphically when I click, ie. menus won’t open, the Logic display is ‘frozen’, but other apps are fine and the mouse is still fine and task manager does NOT show Logic as ‘not responding’. My only option then is ‘Force Quit’ (coz you can’t even select ‘quit’ in Logic coz the menus are frozen).     

Very strange and, as I say, totally reproduceable.  Any thoughts? Anyone else ever seen anything like it?

Link to comment
Share on other sites

19 minutes ago, oscwilde said:

Can you share the template?
Maybe one of us can take a look..."

Thanks for the reply.  Oddly, I can't share the exact template but your suggestion makes me think of a possible test or workaround.  I'll copy the objects from the MIDI environment into a blank template and see if the problem still persists, which I think it will.     I've used this template for years without trouble, but it's only the last few versions of Logic where this new crash/freeze has appeared.   I wonder if it's possible there's something in the 'custom bank change messages' that could somehow bring Logic Pro to its knees?   

Anyway, soon as I can I'll see if I can make a 'generic' form of my template that still exhibits the bug on my system, then share that here for others to test.    I'm also thinking of making a screen-grab video of the crash, just to show it in action...  Thanks.

  • Like 1
Link to comment
Share on other sites

MIDIBUG_TESTlxp.logicx

So - here's the Logic project which I created.  Just an empty project with a few Audio tracks and a few GM Midi tracks, plus the Roland XV2020 Multi-Instrument from the the MIDI Environment in my larger template.   For me, when I attempt to change patches on this instrument - which has worked FOR DECADES - now Logic freezes graphically.   Every time.  I made a video of this happening a couple times, but the movie file is too big to be uploaded here... maybe I'll try YouTube if I can figure that out?  Thanks to anyone who takes some time to explore this weirdness.

Link to comment
Share on other sites

It looks corrupt to me - the fact that the multi instrument comes up with a big missing "?" icon suggests there's something wrong with it, and the behaviour confirms that. (Unless it's a custom icon only on your system perhaps?)

I can change presets from the track inspector OK, but I can't open the patch listing window in the environment (and you get hangy/crashy behaviour etc)

I'd suggest removing it from your template and either creating a fresh new copy, or finding a version that's not corrupt from an earlier project and substituting that...

  • Like 1
Link to comment
Share on other sites

2 hours ago, des99 said:

It looks corrupt to me - the fact that the multi instrument comes up with a big missing "?" icon suggests there's something wrong with it, and the behaviour confirms that. (Unless it's a custom icon only on your system perhaps?)

I can change presets from the track inspector OK, but I can't open the patch listing window in the environment (and you get hangy/crashy behaviour etc)

Thanks for the reply.  The "?" in the icon field doesn't mean anything bad though, and is no indication of any kind of corruption.  It simply indicates that I used a custom icon for this instrument.   As for cutting and pasting from an earlier version, that is also not possible.  THis is the exact same instrument that's been in my template for over 10 years, and all versions of this instrument cause the same freeze or crash in the current version of Logic.

BUT I think you're correct that the next thing for me to try is to create a fresh new environment object for this instrument and see if it behaves any better.  The trick will be finding the 'custom bank change messages' which are required to navigate the patches on a Roland synth.  But maybe by now those are readily available somewhere...     Thanks again for looking into it.

  • Like 2
Link to comment
Share on other sites

Thanks des99 - that sounds promising.  I've just done some more testing and I'm pretty sure the Custom Bank Messages are the culprit.  Which, when you think about it, is kinda messed up - that a little chunk of SysEx is enough to bring Logic to its knees so decisively...     

But when I created a fresh Multi-Instrument in the Environment and assigned it to the right MIDI out port, I was able to play the XV without trouble, and change patches on the basic GM internal banks.  But no luck accessing any other banks, and none of the existing Logic preset BankChange commands work either.  Surprising that the JV1080 or 2080 don't work, since they're pretty similar boxes and the XV2020 was just a smaller JV2080 really...  Anyway,  maybe the 5080's code is the missing piece of this puzzle.  I just can't figure out why the XV bank command worked fine for years and now causes such immediate mayhem...    But I'm no programmer.    

Thanks again.

Link to comment
Share on other sites

4 minutes ago, timbertune said:

Which, when you think about it, is kinda messed up - that a little chunk of SysEx is enough to bring Logic to its knees so decisively...

Well, there have been bugs with sysex faders and this handling in the multi-instrument before, so I'm pretty sure that, whatever the cause, your instruments are corrupted which is why we are getting hangs/crashes with your specific multi-instrument.

My XV bank change messages still work the same just as they did when I made them in, er, Logic 5.x I think... and they'll be the same format as all the XV series. You will need custom bank messages for these though, otherwise you won't be able to switch banks.

  • Like 2
Link to comment
Share on other sites

46 minutes ago, des99 said:

You might want to check out my XV5080 multi-instrument I posted in another thread, which has all the custom bank definitions for that - the XV2020 is a derivative of that so should be very similar...

Dang - had my hopes up and everything.  I cut and pasted your XV5080 object into my project and started playing some of the tracks (after assigning it to the same MIDI port as my XV2020).   All was fine and promising until I selected bank 7 (where the XV's expansion boards are - the ones I'm trying to get to).   INSTANT crash... just like before.    SIGH.

  • Like 1
Link to comment
Share on other sites

Hmm, I can indeed replicate it here, but it's only for that bank. I can open the multi instrument patch names fine, and access all other banks as normal, but switching to bank 7 crashes Logic.

I'll have a look at this to see if I can figure out the issue, and issue a fixed version if so and it's not an inherent Logic bug. It's not related to the actual bank change message (as changing this, or deleting it, doesn't fix the crash on selecting that bank), it's something with the data in that bank.

I'll also check which Logic version this behaviour started to show up in... (my templates go back a way, and this multi instrument has been in all my projects I've ever made).

Link to comment
Share on other sites

35 minutes ago, oscwilde said:

Just had a look at this...and it appears each SRX board has a unique string....so not sure if a generic MSB/LSB pairing will work.

Like I said, you have to use custom bank changes for these - I've posted the details in the post where I shared the 5080 multi. I've been using it for years, and I can access all the banks in my XV5080, including the many preset, internal and card banks...

I'm just investigating the crashing now, as this would either be a corruption issue, or a genuine Logic bug. I'm just gathering data right now...

10.8.1 shows the issue
10.7.9 shows the issue
10.6.3 works fine and bank 7 is fine*

So it seems like something that's come along in 10.7.x somewhere, and is likely a genuine bug in multi-instrument handling, as I'm loading the same templates that crash 10.7.x and 10.8.x in 10.6.x and they work fine there.

I'm seeing if I can find a way to fix it, or work around the issue, it's a weird one...

* Well, it actually isn't, but 10.6.3 at least handles it gracefully and doesn't crash

  • Like 1
  • Wow! 1
Link to comment
Share on other sites

18 minutes ago, des99 said:

Like I said, you have to use custom bank changes for these - I've posted the details in the post where I shared the 5080 multi. I've been using it for years, and I can access all the banks in my XV5080, including the many preset, internal and card banks...

Yep...know your enviro object.
The question/thought was less about the unique identifiers for each expansion board (addressed thru custom bank messages), but whether or not the actual physical slot in the 2020 (vs 5080) is relevant here....is the sysex string for the 2020 different for slot A vs slot B (and slots A thru D in the 5080)?

Link to comment
Share on other sites

21 minutes ago, oscwilde said:

The question/thought was less about the unique identifiers for each expansion board

Honestly, I can't remember offhand but it'll be in the specs and I can look it up. I'm more interested in troubleshooting this issue right now, and I think I've got a lead on it...

Edit: Ok, I can fix it (which is good) and Logic will no longer crash on that bank. It's a name corruption issue (but we don't know how it happened). I'll issue a fixed version shortly...

Edit: Here's a fixed version of the XV 5080 multi:

xv_fixed.logicx.zip

I'll have another look at @timbertune's file and see whether it suffered the same issue (which I'll explain shortly...)

Edit: Ok, timbertune's issue is indeed the exact same issue as mine. It's hard to say whether it's corruption, a Logic bug, or a Logic bug that's caused the corruption, but it's a sneaky one, for sure!

Given that the same exact issue affected different multis that originated on different systems, when it previously worked without issue, I'm leaning toward a genuine Logic bug for this.

@timbertune - do you want me to "fix" your XV2020 multi for you?

  • Like 1
Link to comment
Share on other sites

35 minutes ago, des99 said:

 

@timbertune - do you want me to "fix" your XV2020 multi for you?

Wow - I have to say that I am very impressed indeed by your persistence in getting to the bottom of this annoying bug.  And I agree, it really feels like a "Logic bug" to me because of the way it has survived thru various multi-instrument objects, various Logic versions and MacOS's, not to mention happening on both Intel and Mac Silicon machines.

To answer your question above - Most definitely YES PLEASE do a fix on my XV2020 multi if you don't mind.   As to the oscwilde's question about which specific SRX expansion card is, I THINK it's the "World" expansion card.  I'm basing that on the patch names from my multi, but since I haven't been able to use those banks in almost a year, I'm not 100% sure.   I used to have different cards in those slots but sold them off as Roland released the equivalents in software...    But I'm pretty sure it's the 'World' card still in there.

Weird that Apple has been silent about this bug after I've sent them crash reports since it started.  But thanks so much to Des99 for drilling down on this.  I've had a somewhat painful process moving from my old intel 'Hackintosh' to the new M2 Studio.  First the audio interface drivers wouldn't work - got that sorted.  Then the MOTU MIDI interface refused to work - finally got that sorted.   And now this dumb bank-change bug was biting me almost daily...  It will be glorious to once again click patch-change browsers without fear!  🙂

  • Like 1
Link to comment
Share on other sites

  • Solution
9 minutes ago, timbertune said:

Not urgent - take all the time you need.  Much appreciated.

Here you go:

MIDIBUG_fixed.logicx.zip

There were a couple of patch names in bank 5 I don't have as I'm not sure what bank those patch names are from, possibly an SRX card or something. Those two patches I've manually named "--", and you'll need to rename them to the correct names at your end. Otherwise, the rest are fixed.

As to what the problem was, you won't believe it, but all patches with single quotes in their names would crash Logic when selecting a bank that uses them. Probably a text encoding issue. And you can't fix those names in recent versions of Logic, because it will just crash when you try to go to that bank.

In Logic 10.6.x however, the multis load, but the names with corrupt text encoded single quotes are handled gracefully, and just display as empty strings (which also makes them nice and visible). This means we can overtype those with the correct names - single quotes 'n all 🙂 - and save, and the multis then work correctly in later versions of Logic. 

So somewhere along the line, there's probably been an internal change in text handling which caused this, and multis with patch names containing single quotes of some form encoded from previous versions aren't handled gracefully.

(I haven't bothered to dig into the file contents themselves to really get more details on the encoding issue as it can be fixed in the above way, so that's as deep as I want to get into it at this stage.)

Thanks for posting about this, it's a quirky little bug to be aware of, and you might want to report it, and submit both your original file, and the fixed version, for the Logic devs to take a look at...

  • Like 1
  • Wow! 1
Link to comment
Share on other sites

1 hour ago, oscwilde said:

@des99 and @timbertune
Just had a look at this...and it appears each SRX board has a unique string....so not sure if a generic MSB/LSB pairing will work.
What specific expansion board(s) are in the unit...and in which slot?

https://www.roland.com/au/support/by_product/xv-2020/support_documents/4e07310c-2d35-4c48-b6ed-68e1bbc21575/

Just looking at this again and wondering if perhaps this problem started when I changed the SRX cards in my XV2020 -- maybe I didn't adjust the corresponding unique strings in my Logic XV multi-instrument, and that disagreement between SRX bank names may be what causes the crash?  It's odd because the actual PATCH names are fine - I cut and pasted those.  But maybe the hidden bank-name parameters didn't get switched appropriately when moved some SRX cards around (I used to have 4 SRX cards in a 1080 and 2 in the XV, then I sold most of them off and kept my faves in the XV)

Link to comment
Share on other sites

8 minutes ago, timbertune said:

maybe I didn't adjust the corresponding unique strings in my Logic XV multi-instrument, and that disagreement between SRX bank names may be what causes the crash?

No, what causes the crash is the text encoding of single quote characters in patch names in the multis, and it has nothing to do with what you did, or SRX cards or anything. Logic knows nothing about the contents of your module - it just stores "for patch 23, display the text 'Big Boy Bass 14'" or whatever. And it's this text string, when containing single quote characters presumably entered in from previous versions or macOS systems that was crashing Logic when it tried to display them.

8 minutes ago, oscwilde said:

You get the gold star and elephant stamp today

Whoop whoop! ☺️

8 minutes ago, oscwilde said:

so imagine it might be a by-product of a change elsewhere in 10.7 onwards?

Probably yes, at least that would be my best guess without more information. If you've ever developed for macOS, in C, C++, Objective C or Swift (all of which can coexist in the same app, and all are used in Logic), you'll understand just how complex string handling can be, and how each language and framework uses different representations of strings. So these things can, and do crop up to byte (sic) a developer...

By looking at the raw data stored in the project I might be able to uncover more info, but hey, I'll leave that work to the Logic devs, as they get paid for it... 😄

  • Love 1
  • Haha 1
Link to comment
Share on other sites

Amazing - thanks so very much.  Single quote characters - WHO F'IN KNEW?  
 I tried out the revised object you posted and sure enough it worked  HOORAY. 

The only prob now is that for some reason I could only get the XV to produce audio in 'patch mode' (ie. one sound) vs 'performance mode' (individual sounds on each MIDI channel).  But I'm pretty sure that has something to do with the XV itself and some button I must have randomly pressed while attempting to trouble shoot this nonsense last week... .  Even if it's only working in patch mode, it proves that MIDI is getting thru, AND changing banks no longer causes freezes or crashes.  Phew! The Apple folks owe you big coz like I say, I'd been sending them crash reports on this one for months now and not even a glimmer of a response.    I guess now I can finally go back to cursing the fan on my Kurzweil, the way the All-Powerful MIDI overlords intended.   cheers!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...