Code Monkey home page Code Monkey logo

Comments (4)

tpoole avatar tpoole commented on May 23, 2024

I would strongly suggest using a child component to display your dialog; popping up modal dialogs from within plug-ins is fraught with danger. For example, in your code above, if you close the host application while the dialog is open then you will have a memory leak.

from juce.

beschulz avatar beschulz commented on May 23, 2024

Thanks for the suggestion.

The code above is just a minimalistic reproduction of the problem, in reality I'm creating the ModalDialog in the constructor of my PluginEditor and that is managing it's livetime. If I do it slightly later, all is good. Also with VST3 and AU, all is dandy.

AFAIK the modal component manager takes care of closing all remaining modal dialogs at exit. Otherwise PopupMenus et.al. would have the same problem, as they also are modal components (see void ComboBox::showPopup(), PopupMenu::showMenuAsync(), ).

I think it's just an issue with the order stuff is done when a new VST2-Plugin Editor is created.

EDIT: the reason why I want to create a modal dialog is, that I have components that are larger than my main plugin editor.

from juce.

tpoole avatar tpoole commented on May 23, 2024

Popups are vulnerable to the same problem; the JUCE Demo was only fixed a few days ago (6547452 and e2dc460).

I'll see if we can improve the modal state handling when a VST editor is created, though if I recall correctly it's occasionally necessary to create an editor silently in the background to please some hosts.

from juce.

beschulz avatar beschulz commented on May 23, 2024

I re-designed my UI, so that I no longer have this issue. thx.

from juce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.