Illegal call in audio thread: AsyncUpdater call and Heapblock allocation



  • I've got a project that builds and works fine in the release version of HISE. However, I need the improvements made to the MIDIPlayer import mechanism that were introduced in the scriptnode version back at the beginning of August (allowing import of non-960ppq midi files correctly), so I've compiled several different commits of the HISE au/vst plugins to make use of the changes. It's literally the ONLY reason I need the scriptnode version.

    Now, though, when using the au/vst builds (any of the more recent ones), if I have any scripts that aren't deferred, I get a continuous stream of errors in the console any time the transport is running in the host:

    Screen Shot 2020-09-14 at 5.13.58 PM.png

    Deferring the scripts prevents the errors from occurring, however it causes errors when processing any Messages (HISE complains, for instance, that I can't Message.ignoreEvent(true) because the message is not being processed in the MIDI callback...except it IS). So I'm at an impasse.

    I have none of these issues with the release version.

    I've contemplated (and attempted) backporting the changes from the MidiPlayer.cpp, but there's a fair amount of additional code added to the the scriptnode version of those files, so it's not such a simple task. There are obviously some dependencies and variables that are required for the newer version that aren't present in the release version.

    Any ideas? I'm stumped.

    a



  • Go to preferences and uncheck Audio Thread Guard Enabled. If you defer callbacks then your script is no longer running in real time which means you can't ignore MIDI messages because they may have already happened before your script sees them.

    4652fdc4-9f43-4483-ac15-00dfcb3d4ee2-image.png



  • <insert gif of snoopy dancing>

    I am in your debt, thanks soooo much for the quick reply! That solved it 🙂

    Also, I appreciate the explanation about deferal....I suspected something like that was going on, but am still getting my feet wet here so every little bit of information helps!

    a


Log in to reply
 

16
Online

736
Users

2.9k
Topics

24.7k
Posts