Permut8 crashes Logic Pro

Julian Crooke86 views15 posts
  • Users avatarJulian Crooke

    Hi there, I tried sending a bug report directly some weeks ago, but there was no response. Maybe the forum is a better place for it?

    Sometimes Logic crashes when starting up and loading a project containing Permut8. Once the startup-crash happens once, then all the times after that Logic instead freezes while starting up and loading the project, and the machine has to be rebooted in order to load the project again.

    Logic can be started in a "safe mode" to avoid loading the project, but then if the project is loaded manually, it still freezes, until after a reboot is performed.

    A crash report is attached:

    Permut8_Logic_crash_report.txt(112kB, 64 downloads)

    Thanks,
    Jules

  • Users avatarMagnus Lidström

    Hmmm... Disturbing. I have not heard about this before and I cannot reproduce the problem myself, regardless how many times I restart Logic. It might have something to do with the exact MacOS version (yours is Mac OS X 10.12.6, I've only got 10.13 or 10.14 to test with at the moment). Looks like the crash is very early in the Audio Unit startup code.

    The fact that you need to reboot to get it working again means that the operating system is left in an invalid state, which normally a plug-in bug should not be able to cause on its own. One theory is that it is related to the deprecation of the Component Manager. However, many other plug-ins (including all our others) also use this deprecated technology.

    Have you tried any of our other plug-ins? Do they behave any better?

    Have you discovered any particular pattern when crashes seem to begin? E.g. is there any special project that seem to trigger it? Perhaps a combination with other specific plug-ins in use?

  • Users avatarJulian Crooke

    Thanks for looking into this issue Magnus, I agree it is disturbing!

    I have tried opening and closing Logic with the same project several times now and it's not crashing again yet.

    I'm reluctant to update to the latest macOS, since I've read stories about the graphics drivers for my GPU getting worse after 10.12.X. But maybe I'll try that next if this gets too troublesome.

    The issue occurs with different projects, but I'm not sure if your other plugins also crash since I haven't used them in a little while (even though I love them), and I haven't yet noticed whether there's a pattern related to plug-ins from other vendors.

    I wish I could pin it down more, but it's very intermittent. I'll keep an eye on it and get back to you if anything surfaces.

  • Users avatarMagnus Lidström

    That is actually true. I have had problems with graphics sometimes becoming extremely sluggish since 10.13, although much less since a few OS updates ago.

    Please post here again if it happens, including a new crash log that I can compare to the first one. Thinking of making a beta build of Permut8 for you for further debugging, but a lot has changed since the last official build and I am not sure how easy it will be to build a stable version right now.

  • Users avatarJulian Crooke

    EDIT: Argh, sorry I didn't get the crash report this time, but there's other info here that might be useful...

    Hello, just a small update to this issue:

    My system is currently in the "bad" state as already discussed in this thread. So I opened Logic with a different project having no Sonic Charge plug-ins in it (since that's the only way I can open Logic when in the bad state).

    Then I added other vendor plug-ins and used them with no problem. But then I added an instance of Echobode, and logic froze up. I then restarted Logic again and this time added an instance of Bitspeak, and again it froze up. Also same story with Synplant and Microtonic instruments.

    I tried making Logic play the track while adding the plug-ins to see what happens, and it keeps playing the track while "frozen"! But the mouse still turns into a pinwheel and all windows cease updating graphically. Although the existing plugin-windows can be dragged around, they will not respond to anything other than that. Space bar also will not start/stop the track at this point. Also as you may guess, the plug-in being added never actually appears or becomes active in the signal chain.

    I haven't noticed this issue with anything other than Sonic Charge plug-ins so far. Is nobody else using the same framework for their plug-ins that I could test the issue with next time? Could it be some licensing protection gone wrong or something?

  • Users avatarMagnus Lidström

    Could you please name a few of those other plug-ins that you loaded without problem?

    Since the crash seem to happen very early in AU startup you could try another plug-in that was bridged with Symbiosis. E.g. any of https://xferrecords.com/ plugins.

  • Users avatarJulian Crooke

    Just tried all of these ones right now. And to double-check after all of these ones worked, I added Echobode, and it froze again.

    Instruments:

    Xfer Serum
    TAL Sampler
    Toontrack EZKeys
    Roland D50
    Novation BassStation
    reFX quadraSid (wrapped in 32-Lives)
    Korg MS20
    Arturia Mini V

    Effects:

    Valhalla Room
    XLN RC-20 Retro Color
    SugarBytes Effectrix
    CableGuys HalfTime
    PSP 84
    iZotope Vinyl
    Argotlunar

    MIDI effects:

    Xfer Cthulhu
    BlueArp

  • Users avatarMagnus Lidström

    I just had an idea since it only happens to SC plug-ins. Maybe it's the semaphore protecting our preferences acting up. If you end up in this "bad state" again, could you please try running this program:
    SCRegTool.zip(166kB, 18 downloads)

    Unzip it in your user home folder, start Terminal and type:

    ./SCRegTool u

    Now try launching Logic again.

  • Users avatarJulian Crooke

    Brilliant, it worked! Now I don't have to reboot, thanks!

    So I assume I can run that from any folder, not just homedir, so I'll stick it in a util dir instead?

  • Users avatarMagnus Lidström

    Great! We found the culprit. Now I only need to figure out why this breaks down on your system (and possible others of course) and if there is anyway I can improve it in our future updates.

    (I do have some ideas of alternative techniques to try, but it would have to be a very solid replacement if I find one. I've been using that semaphore solution since 2004 or something and as far as I know it has worked perfectly up until now.)

    Thanks a lot for your patience. I'll be in touch when I have something new to test. Can I reach you at your @tpg.com.au email if I need too?

    And yeah, meanwhile, feel free to put that command-line anywhere you like and run it whenever you need.

  • Users avatarJulian Crooke

    Thanks for being such a diligent developer!

    (Yeah I guess it's awkward if code might crash without releasing a system-wide resource.)

    Yes you can reach me at that email.

  • Users avatarMagnus Lidström

    Well, I don't know if it is the actual semaphore logic that is causing the bug or if there is a crash inside the preference loading which happens when the semaphore is open. At first you talked about Permut8 crashing and after that everything froze up. But then you said that you inserted Echobode into a clean project and it just froze (no crash that time, right?). Not sure what to make of it yet, but probably going to start by swapping out the named semaphore (which is a bad construct anyhow) with something else. If I can find something that works.

  • Users avatarJulian Crooke

    Ah, sorry I need to clarify, Permut8 crashed in the usual (but rare) way a few days ago but I have avoided rebooting all of this time.

    Then I was mucking around in Logic and absent-mindedly inserted a Sonic Charge plug-in (honestly was probably Permut8 again) and it froze. So then I did some experiments with adding e.g. Echobode and all your other plug-ins to see if they also resulted in the freeze, and they did. All of this was AFTER the first crash which happened with Permut8, without rebooting after it. It may just be Permut8 because that's the only SC plug-in I've been using just lately, not sure.

    So I guess it's something like this: Permut8 locks semaphore and crashes (in prefs loading?). Then all subsequent startups of all SC plugs try locking semaphore and get blocked forever since Permut8 never got to release it.

  • Users avatarMagnus Lidström

    Right. Sorry, I should have understood that from what you wrote really. Thanks for the clarification.

    - Julian Crooke wrote:
    So I guess it's something like this: Permut8 locks semaphore and crashes (in prefs loading?). Then all subsequent startups of all SC plugs try locking semaphore and get blocked forever since Permut8 never got to release it.

    That is the most reasonable explanation yes. Kind of hoped it was something bad with the semaphore itself, but it wouldn't make a lot of sense tbh. So even if I manage to replace the semaphore with something that is automatically released after process termination (maybe a robust mutex in shared memory) (which is a good idea regardless) we still have the mysterious Permut8 crash to figure out.

    As said, a beta build would help there. How easy is it for you to reproduce that Permut8 startup crash?

  • Users avatarJulian Crooke

    - Magnus Lidström wrote:
    That is the most reasonable explanation yes. Kind of hoped it was something bad with the semaphore itself, but it wouldn't make a lot of sense tbh.

    Unless maybe there is a race condition in the semaphore-locking bit, on startup of Logic when loading multiple Permut8 instances and maybe more than one instance thinks they got the lock at the same time? Does Logic start up multiple plug-ins all at once on separate threads?

    As said, a beta build would help there. How easy is it for you to reproduce that Permut8 startup crash?

    Unfortunately I don't know how to easily reproduce the crash. I don't know the conditions under which it happens except that I think it's only when Logic is starting up (loading a project), and it's only maybe once per fortnight with my typical usage patterns. (Although maybe if it's a race condition it might happen only when there is more than one SC plug-in in the project?)

    Maybe I could just try opening and closing Logic a bit more often, and randomly adding several Permut8 instances to projects?

    EDIT: Hmm, maybe that race condition idea is not right. I just tried dozens of instances in one project stacked in different ways, and restarted quite a few times, but so far no crash. I guess it is more mysterious as you say.

You need to be to post a reply

Sign In / Sign Up


First time here? Just enter your current email and sign up.
×