Assertion in MessageManager


#1

I have updated to the latest juce revision and now I get an assertion in MessageManager when I quit the my application. With an older juce revision I did not get this assertion. I cant find the problem. I have one Component and I am deleting all child components in the destructor, but I get this assertion. I dont know what I am doing wrong. I also have some Listeners. Should I delete them seperately or do I forget to delete something else? Did something changed in Juce and I have to delete some Object which I did not have to do with older Juce revisions?

Peter


#2

…which assertion is it?


#3

The assertion is in juce_MessageManager.cpp line 65


#4

Sounds like you’re leaking a component. I added the assertion recently to help catch mistakes like that, but it’s up to you to track down the source of your leak - it won’t be caused by anything that I’ve changed, you were probably always leaking without noticing it.


#5

On windows, when this happens, usually you can see something like:
“Detected memory leaks!”
“Dumping objects->”

in the output console.
The list of strings after “Dumping objects” can help to find the leak.


#6

I had this problem recently and tracked it down to a threading issue. I had a value tree object that was being read from both the message thread and the audio thread. I solved the problem by using an intermediate set of variables and used a critical section when writing to them. May be relied to your problem. I would also make sure you are removing your listeners in the detractor before you delete the component to be on the safe side.


#7

Thank you guys for your quick answers. I found the problem. I was using PropertiesFile not correctly and that was the Object I did not release.
Thanks again for your efforts.

Peter