AudioThumbnail produces segfault in destructor

Hi JUCE community. I have a problem with AudioThumbnail class. It has window field which initialized in constructor of AudioThumbnail. Thumbnail destructor (after few nested functions) has this line window->invalidate() which produce sigfault cause window object is null by this moment.

I use this class as described at this tutorial Maybe it’s AudioThumbnail design issue? Though I’m not very good at c++ and can miss something obvious. Thanks for any help.

AudioThumbnail is a mature class, and it is more likely a problem with your code. Maybe you are double deleting your AudioThumbnail object? If you can provide a minimum set of code that exhibits the problem, we may be able to help you.

I’ve sometimes had problems if I had change listeners added to the thumbnail and didn’t remove those in the destructor from the thumbnail. (m_thumb->removeAllChangeListeners(); )

Thanks for all answers. The problem was in my misunderstanding of c++ shared ptr usage, causing AudioProcessor to be removed twice. Thread can be closed.