Error jassertfalse; // Your run() method mustn't throw any exceptions!

sometimes , in xcode when I build and run my project, I get an error like this:

but other times my program just runs as expected.

I have no idea what this is about, can anyone give me a clue?

Well your run method is throwing an exception somewhere - so somewhere some code is calling: throw ...;

I had figured that much - but there’s two things preventing me fixing it:

  1. I can’t seem to see where the exception is being thrown - maybe I just don’t understand the Xcode debugging stuff properly…

  2. it is intermittent. with no changes to the code it comes and goes.

I have a couple of theories why that might be:

  1. there’s something accessing undefined / out of range memory, which changes in a way that only throws an exception some of the time,

  2. the manta hardware that the app exists to communicate with is sometimes sending a message before my code is fully initialised to handle it correctly. This could be because I’m unclear exactly what order my objects and variables are created in.

however i just see the juce assertion, I haven’t managed to uncover what exception is being thrown, which defeats the whole point of an exception which is to give a named error when something fails right?

BTW right now it has stopped doing it - so maybe I inadvertently fixed something - but I don’t know what! It may come back…

Have you tried using the address sanitiser: