HISE Logo Forum
    • Categories
    • Register
    • Login

    Midi Overlay Panels in Compiled Plugin Crashing DAWS?

    Scheduled Pinned Locked Moved Bug Reports
    38 Posts 10 Posters 4.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GoodflowG
      Goodflow @Soundavid
      last edited by

      @Soundavid That's an elegant way of going about it. I tried this with a preset callback, and it definitely pushes the problem off of initialization in my project.

      Added:

      • Changed the Tile to "Empty", removed all data.
      • Added a preset setPostCallBack to enable/show/set ContentType and Data for the Tile (unless it's the "init" preset, which clears/disables/hides the Tile)
      • tested with "UpdateAfterInit" enabled, disabled, and with it toggled via the setPostCallback
      • tested with & without an onInit call to load the "init" preset, just to ensure that everything gets cleared.

      Ultimately, the problem shows back up when

      • The plugin is loaded
      • A preset is loaded
      • The plugin is removed and loaded again
      • A preset is loaded

      Hopefully that's not the case with your project/method. It just seems like no matter where the MidiOverlayPanel is fired up, something lingers on close and breaks on the next loaded MidiOverlayPanel.

      S 1 Reply Last reply Reply Quote 0
      • S
        Soundavid @Goodflow
        last edited by

        @Goodflow Ok I debugged a lot this problem and I think I found the culprit... the problem persisted in my project when i called an expansion that loads the Midi Overlay and this is what I found.

        • The Plugin Crashes when is removed and loaded again but only if there is one instance running.

        • If you have multiple instances and remove/load the plugin works fine but when you remove the last one and try to load it again it crashes.

        This means that the problem is when the plugin is closed completely so I checked the Midi Overlay Factory class in the source code and I found that the class is derived from the DeletedAtShutdown class from JUCE, this class deletes everything when the app is closed but maybe JUCE doesn't call this in plugins until the last instance is closed...

        So, I removed the DeletedAtShutdown from the Midi Overlay Factory class in the Source code of the plugin (not re-building hise) and the problem disappears in the plugin...

        I tested the plugin today in Logic checking memory and Cpu loads and works perfectly for now but maybe this could be a problem with another type of Midi Overlays or using the Standalone App or Windows (im using two MO tiles, Drag n drop and Midi Viewer).

        @Christoph-Hart Maybe you might want to check this out 👆

        GoodflowG M 3 Replies Last reply Reply Quote 2
        • GoodflowG
          Goodflow @Soundavid
          last edited by

          @Soundavid I was just going through the .h file doing the complete opposite, moving code INTO the DeletedAtShutdown class line by line. You just saved me hours of wheel-spinning, I can't thank you enough.

          Trying this out now.

          1 Reply Last reply Reply Quote 0
          • GoodflowG
            Goodflow @Soundavid
            last edited by

            @Soundavid Can confirm this worked for me in the plugin. Also tried recompiling HISE with the change, and it's more stable in handling the project now 🙏

            Thoroughly crash tested the midi note display and drag&drop, all good. The other MidiOverlayPanels seem to work smoothly from cursory checks, as well.

            S 1 Reply Last reply Reply Quote 1
            • S
              Soundavid @Goodflow
              last edited by

              @Goodflow Its working like charm for me too in my system, Im going to build it on windows today and report 🤞🏼

              GoodflowG 1 Reply Last reply Reply Quote 0
              • GoodflowG
                Goodflow @Soundavid
                last edited by

                @Soundavid All good on Windows here so far (tested HISE & plugin). Firing up a Linux vm to complete the trifecta, but this really seems to have done the trick.

                1 Reply Last reply Reply Quote 0
                • M
                  mehmethand @Soundavid
                  last edited by

                  @Soundavid said in Midi Overlay Panels in Compiled Plugin Crashing DAWS?:

                  @Goodflow Ok I debugged a lot this problem and I think I found the culprit... the problem persisted in my project when i called an expansion that loads the Midi Overlay and this is what I found.

                  • The Plugin Crashes when is removed and loaded again but only if there is one instance running.

                  • If you have multiple instances and remove/load the plugin works fine but when you remove the last one and try to load it again it crashes.

                  This means that the problem is when the plugin is closed completely so I checked the Midi Overlay Factory class in the source code and I found that the class is derived from the DeletedAtShutdown class from JUCE, this class deletes everything when the app is closed but maybe JUCE doesn't call this in plugins until the last instance is closed...

                  So, I removed the DeletedAtShutdown from the Midi Overlay Factory class in the Source code of the plugin (not re-building hise) and the problem disappears in the plugin...

                  I tested the plugin today in Logic checking memory and Cpu loads and works perfectly for now but maybe this could be a problem with another type of Midi Overlays or using the Standalone App or Windows (im using two MO tiles, Drag n drop and Midi Viewer).

                  @Christoph-Hart Maybe you might want to check this out 👆

                  I have the same crash and I want to try your solution but I'm a little bit confused about what to delete where to delete? Can you point it more clear for a newby please?

                  GoodflowG 1 Reply Last reply Reply Quote 0
                  • GoodflowG
                    Goodflow @mehmethand
                    last edited by

                    @mehmethand

                    HISE/hi_components/midi_overlays/MidiOverlayFactory.h

                    Line 40:

                    class MidiOverlayFactory: public DeletedAtShutdown
                    

                    gets changed to

                    class MidiOverlayFactory
                    
                    M ILIAMI 2 Replies Last reply Reply Quote 2
                    • M
                      mehmethand @Goodflow
                      last edited by

                      @Goodflow thank you so much.

                      1 Reply Last reply Reply Quote 0
                      • ILIAMI
                        ILIAM @Goodflow
                        last edited by

                        @Goodflow said in Midi Overlay Panels in Compiled Plugin Crashing DAWS?:

                        @mehmethand

                        HISE/hi_components/midi_overlays/MidiOverlayFactory.h

                        Line 40:

                        class MidiOverlayFactory: public DeletedAtShutdown
                        

                        gets changed to

                        class MidiOverlayFactory
                        

                        This fixes the Midioverlay Disappearing?
                        @Matt_SF Matt, Take a look 👁️‍🗨️

                        Matt_SFM d.healeyD 2 Replies Last reply Reply Quote 1
                        • Matt_SFM
                          Matt_SF @ILIAM
                          last edited by

                          @ILIAM @Goodflow awesome. Thanks!

                          Develop branch
                          Win10 & VS17 / Ventura & Xcode 14. 3

                          1 Reply Last reply Reply Quote 1
                          • d.healeyD
                            d.healey @ILIAM
                            last edited by

                            @ILIAM Is there a PR for this on github?

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            Matt_SFM 1 Reply Last reply Reply Quote 0
                            • Matt_SFM
                              Matt_SF @d.healey
                              last edited by

                              @d-healey not yet. I though i'd make a PR tonight after verifying it

                              Develop branch
                              Win10 & VS17 / Ventura & Xcode 14. 3

                              d.healeyD 1 Reply Last reply Reply Quote 1
                              • d.healeyD
                                d.healey @Matt_SF
                                last edited by

                                @Matt_SF Noice, yeah good idea to check it doesn't break anything

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                1 Reply Last reply Reply Quote 1
                                • ustkU
                                  ustk
                                  last edited by

                                  Is there not a risk to let something pending in memory if it's not deleted?

                                  Hise made me an F5 dude, browser just suffers...

                                  1 Reply Last reply Reply Quote 0
                                  • Matt_SFM
                                    Matt_SF
                                    last edited by

                                    I haven't faced any weirdness while tesing it, but of course I can't test it on different systems, so that's a questions for @Christoph-Hart : should I make a PR ?

                                    Develop branch
                                    Win10 & VS17 / Ventura & Xcode 14. 3

                                    ILIAMI 1 Reply Last reply Reply Quote 0
                                    • ILIAMI
                                      ILIAM @Matt_SF
                                      last edited by

                                      @Matt_SF Matt,Hey
                                      So the Disappearing tile fixed?
                                      did you tried on different DAWs ?

                                      Matt_SFM 1 Reply Last reply Reply Quote 0
                                      • Matt_SFM
                                        Matt_SF @ILIAM
                                        last edited by

                                        @ILIAM Yes. I've tested it in Ableton, FL Studio, Reaper and Cubase

                                        Develop branch
                                        Win10 & VS17 / Ventura & Xcode 14. 3

                                        ILIAMI 1 Reply Last reply Reply Quote 1
                                        • ILIAMI
                                          ILIAM @Matt_SF
                                          last edited by

                                          @Matt_SF said in Midi Overlay Panels in Compiled Plugin Crashing DAWS?:

                                          t in Ableton, FL Studio, Reaper and Cubase

                                          Yeah Man, Lets goo
                                          022063d48f1a54c620df440030c99bf0.gif

                                          ILIAMI 1 Reply Last reply Reply Quote 0
                                          • ILIAMI
                                            ILIAM @ILIAM
                                            last edited by

                                            @Matt_SF So this is what you changed?

                                            MidiOverlayFactory.h

                                            class MidiOverlayFactory: public DeletedAtShutdown
                                            {
                                            public:
                                            
                                            Changed to (public DeletedAtShutdown >> Removed )
                                            
                                            class MidiOverlayFactory
                                            {
                                            public:
                                            

                                            Correct?

                                            ILIAMI 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            18

                                            Online

                                            2.0k

                                            Users

                                            12.7k

                                            Topics

                                            110.3k

                                            Posts