HISE Logo Forum
    • Categories
    • Register
    • Login

    addChildPanel - Repaint Issue

    Scheduled Pinned Locked Moved Bug Reports
    9 Posts 4 Posters 913 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.
    • Casey KolbC
      Casey Kolb
      last edited by Casey Kolb

      We use a lot of child panels in our plugin, but if we try to redraw the child panels, they will reset to the default panel state and there's no way to correct it. This happens very consistently in both in HISE and the compiled plugin.

      What it looks like after redrawing:
      Phantom Child Panels.png

      What it's supposed to look like (ignore image size difference):
      a1698ccd-ab2b-4e44-a9c0-05288001d6cf-image.png

      Casey Kolb
      Founder & CEO of Lunacy Audio
      Composer | Producer | Software Developer

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Casey Kolb
        last edited by ustk

        @Casey-Kolb I'm asking for this bug to be resolved for a while...

        Can't help pressing F5 in the forum...

        Casey KolbC 1 Reply Last reply Reply Quote 1
        • Casey KolbC
          Casey Kolb @ustk
          last edited by

          @ustk It's a shame because the child panel system is so powerful. All of our preset and sound pack browsers are built with them, and they're so flexible. But this bug makes the whole thing look so unprofessional to the user.

          Casey Kolb
          Founder & CEO of Lunacy Audio
          Composer | Producer | Software Developer

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

            Yeah this is the ghost panel issue striking again. My "solution" is to do all my painting on the parent panel, using the children only for positioning and mouse callbacks. This is not a good solution but it works until the problem is fixed.

            Here's one of my posts from my beta thread, including a demo project:

            @d-healey said in [beta test] Finally I have a new product (almost)!:

            @Christoph-Hart I've made a minimal project that demonstrates the draw image issue. I'd be grateful if you could try it out and see if there is anything obvious I'm doing wrong.

            Things I've noticed:

            • The problem is intermittent
            • The problem only occurs when drawing on child panels
            • I have only been able to create the issue using an image from an expansion. Using images loaded into the pool from the project's image folder don't seem to trigger the problem.
            • Calling child.loadImage after child.setPaintRoutine greatly reduces the problem occurring, you'll notice in the minimal project I am intentionally calling loadImage first in order to trigger the issue more often.
            • The problem happens regardless of OpenGL state.
            • It occurs on Windows and OSX more often than on GNU/Linux.
            • The problem always triggers the first time you turn the button on after recompiling the script - should make it easier to debug :)

            When you load the project and turn the button on a child panel should be added and the image from the expansion should be drawn. When you turn the button off the image should be unloaded from the child panel and the child panel should be removed. Click it on and off repeatedly and sometimes the issue will occur sometimes it wont.

            DrawImage.zip

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            Casey KolbC 1 Reply Last reply Reply Quote 2
            • Casey KolbC
              Casey Kolb @d.healey
              last edited by Casey Kolb

              @d-healey The child panels also constantly crash my HISE when I recompiile. I've gotten in the habit of just completely closing and reopening HISE when I need to recompile. Not sure if you've experienced this too? We're using hundreds at a time, so that could be part of it.

              Casey Kolb
              Founder & CEO of Lunacy Audio
              Composer | Producer | Software Developer

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Casey Kolb
                last edited by

                @Casey-Kolb I haven't experienced that, but I'm only using a few.

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                oskarshO 1 Reply Last reply Reply Quote 1
                • oskarshO
                  oskarsh @d.healey
                  last edited by

                  @d-healey Hey is there any fix to this? It seems like it still draws the ghost panels :(
                  Screenshot 2025-02-21 at 3.02.14 PM.jpg

                  HISE Developer for hire :)

                  ustkU 1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @oskarsh
                    last edited by ustk

                    @oskarsh So this has been fixed long ago. The child panel system is very reliable and I use it everywhere I can just because I like ☺

                    The reason you have this (well, without a snippet it's hard to be sure) might be because you create new children without removing the old ones.
                    When you create/update you child panels, be sure to clean the parent first

                    I always call this prior rebuilding the children:

                    inline function removeDanglingPanels()
                    {
                    	for (child in mainPnl.getChildPanelList())
                    		child.removeFromParent();
                    }
                    removeDanglingPanels();
                    

                    I also call this at init to be sure the parent is empty

                    Can't help pressing F5 in the forum...

                    oskarshO 1 Reply Last reply Reply Quote 2
                    • oskarshO
                      oskarsh @ustk
                      last edited by

                      @ustk that’s the solution. Of course! Thank you.

                      Somehow I was under the impression that they would get clearer automatically. Thank you!

                      HISE Developer for hire :)

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

                      57

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      102.1k

                      Posts