*** Dangling pointer deletion! Class: MidiFile

I’m in Xcode on macOS building for iOS.
When declaring a variable of type juce::MidiFile like this

juce::MidiFile midiFile;

I get this at the end of the scope

*** Dangling pointer deletion! Class: MidiFile JUCE Assertion failure in juce_LeakedObjectDetector.h:68

and when pressing continue I get

*** Dangling pointer deletion! Class: OwnedArray JUCE Assertion failure in juce_LeakedObjectDetector.h:68

Any hints?

Hm it works for me here. Tried to create one on the stack aswell as on the heap, in
neither case I get any assertion.

Are you doing something with the object, adding it to an OwnedArray or anything?

Thanks for testing @cycle440

Here is some more background regarding the problem.
JUCE (actually Tracktion Engine) is used in an iOS framework and the framework is used in a Cordova plugin. The reason we use Cordova is to be able to call JUCE/Tracktion Engine functionality in an iOS app built in Javascript.

Here is the stripped Objective-C++ method causing the problem.

- (void)insertSongClipMidi:(CDVInvokedUrlCommand*)command
{
    // Here usually goes code for getting data from the Javascript side.
    // I get the problem both with and without this code.
    juce::MidiFile midiFile;
    // Here usually goes code for returning data to the Javascript side.
    // I get the problem both with and without this code.
}

I have a number of other Objective-C++ methods inserting wav clips, playing tracks etc where I get no dangling pointers.
The only time we experience dangling pointers is when using the juce::MidiFile.

Any hints on how to proceed tracking this down?

very strange. Looking at the construcor for MidiFile it simply initializes a member variable called timeFormat. As well, this class has existed for quite a long time, so one would expect a report of this issue previously. My gut says the declaration of the class, unto itself, is not the issue.