HISE Logo Forum
    • Categories
    • Register
    • Login

    External display buffers visualization crash

    Scheduled Pinned Locked Moved Bug Reports
    bugdisplay buffercrash
    18 Posts 2 Posters 886 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.
    • ustkU
      ustk @Matt_SF
      last edited by ustk

      @Matt_SF This is probably because the data objet of P1 (buffer) and P2 (value) are not defined before the first timer call.
      Panels are always painting a first time at compile, when these objects don't yet exit
      THEN, the timer runs a first time creating those objects.

      Two solutions :

      • Declare the object after the panels are referenced
      const var P1 = Content.addPanel("P1", 0, 0);
      P1.data.buffer = Content.createPath();
      
      const var P2 = Content.addPanel("P2", 110, 0);
      P2.data.value = 0;
      
      • Or check if the data objects are defined for the paintRoutine before using them
      // in P2 paint routine
      if (isDefined(this.data.buffer))
          g.fillPath(this.data.buffer, this.getLocalBounds(0));
      
      // in P2 paint routine
      if (isDefined(this.data.value))
          g.setColour(Colours.withAlpha(Colours.white, this.data.value));
      

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

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

        @ustk Thanks for your answer Greg! Unfortunately it still returns the same error... 🤔

        Edit : If I 'Continue' debugging in VS, I end up here:

            inline int size() const noexcept
            {
                return numUsed;
            }
        
        HISE Debug.exe!juce::ArrayBase<juce::NamedValueSet::NamedValue,juce::DummyCriticalSection>::size() Ligne 201 HISE\JUCE\modules\juce_core\containers\juce_ArrayBase.h(201)
        

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

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

          @Matt_SF Well it's not crashing here.
          Last develop commit? Mine's dating from 5 days ago... 9580e1bc3ddd30f85e6dc77d5593e41ebee9d359

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

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

            @ustk that's odd. I was on the commit from July 10th and I just build the latest commit today...
            I'll clean everything manually and rebuild it again

            Edit: @d-healey No David, I have only one HISE source folder on my computer 😂

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

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

              Nope, still no luck. I even checked the JUCE folder in the projucer...

              The weird thing is that it works when I load the project but crashes as soon as I hit 'Compile' again...

              (And now, the snippet browser is also crashing with the latest commit :face_with_tears_of_joy:
              Something related to the new CSS additions)

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

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

                OK I built the latest Master branch but it still crashes...
                @Christoph-Hart Maybe you'l have an idea about this

                Oddly it used to work before...

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

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

                  @Matt_SF Have you tried the commit I pointed?
                  Do you delete the binary folder before building?

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

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

                    @ustk Yes and yes, but it still crashes... It must be something on my machine then but I don't know what could cause this. I haven't made any modifications in the source code...
                    I'll try to dig in...

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

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

                      I even deleted my HISE folder and re-cloned it from Christoph's repo but it's still not working...
                      Oddly, if I increase the timer, it doesn't crash (above 300ms)... 🤔

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

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

                        @Matt_SF Strange indeed... Have you tried a new minimal project from scratch? Maybe this one is corrupted somehow... Though I wouldn't understand why it doesn't crash above 300ms...
                        No error code in the console?
                        If you run a debug in your IDE, what does the crash report say?

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

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

                          @ustk I recreated a minial project but the crash still happens.
                          I'm also puzzled by the timer thing...

                          What the IDE outputs :
                          1 - actually I made a mistake in my OP, there's a debug breakpoint in

                          HISE Debug.exe!hise::HiseJavascriptEngine::RootObject::ConstReference::isConstant() Ligne 88
                          HISE\hi_scripting\scripting\engine\JavascriptEngineExpressions.cpp(88)
                          
                          bool isConstant() const override
                          {
                              jassert(ns != nullptr); 
                              auto v = ns->constObjects.getValueAt(index); // << BREAKPOINT
                          
                              // objects and arrays are not constant...
                              return !v.isArray() && !v.isObject();
                          }
                          

                          2 - 'Read access violation' in

                          HISE Debug.exe!juce::ArrayBase<juce::NamedValueSet::NamedValue,juce::DummyCriticalSection>::size() Ligne 201
                          HISE\JUCE\modules\juce_core\containers\juce_ArrayBase.h(201)
                          
                          inline int size() const noexcept
                           {
                                  return numUsed;
                          }
                          

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

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

                            @Matt_SF Strangely when opening your snippet, the global cable not is not there (probably something wrong in the xml)
                            Have you tried a very minimal snippet without a global cable?

                            Screenshot 2024-07-25 at 14.53.46.png

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

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

                              @ustk yes it isn't displayed in the snippet example (coming from the examples repo), but the cable method works fine.
                              I tried indeed without the cable.

                              I'm actually working on a drums plugin, that's why it's more convenient to use the buffer solution because I can dynamically change the buffer source, which is not possible to do when using global cables.

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

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

                                @Matt_SF please try this snippet, I'd like to check if your huge buffer length can be problematic in the present case.

                                HiseSnippet 1571.3ocuX8taaaCDmJILs1McXEqO.B4SJ.dtVNooIaXXt4OtyXMoFwoACqnHiQh1lvRjZRzM1anC6i6wZOR6MX6HojkTRbah2V8GRL4c7te2w69cLoarviljHhQVUNcZDEYsFt2Ttb39CILNpyAHqUwRZhDs2zHRRB0GYYs7KTxrprBR+4u918HADtGMeKD5LAyi9RVHSlua2VeOKHnMwmdJKrf1a0pimfuuHPLFvwx3FnHh2Hx.5wDkZKgAPbnOSJh6II.XPVqrmveZughK4F8OikvtHfpV3h5AFxrcaQfuBwpcQ6OjE32MKdSPfU5lG8Kah9GiOh4ylsedV3y0BryOQw7g0Rkg2xkfmaQ30n.7tAHYU.RqXfziv87hYQxbIJ77.bGtjF2m.o8hPwnKZoeaY79BPCtrdHYDscLrX1Ib1tQiZ1vO13qqVER8IR62Qhs8YIQAjo6MteeZbO3xviZ+M15xg5CnxCttXm0M9yt8O3tNXrB15hFvYuAKdMK4bETr2qa29vSNuWme7PvBtM2AjBVqdBUdBiOvbHHYDQikLZhS0esZk0M69RJefb35eUQaTCjd73P3ljyoAIfP2puW4wh9rKAj4BtKKmAfbeQXjfCKbV2HVEfUMeUAltPog7DwXIiSc5Ol6IYBtyfMT3YfRASAsi4WI0IbI6mGSubHSRAKUoZEVeaGVxAz9fE7cjCYI08IRR8K1XipU.a3GStrKQNrnnZ15E.9doviDrmXL2OARg0rcqqRjogVNLUsZw6SBBt.5oxwoFlErq5xBRxdwTnDN2o2fedxSrIfV.BMereCTKULga2PCl2pU8MSNOQRhk0rmbNk6Wyd54gLt9WjIuM2H1MzvuRJnhoQpzqSVDkEOJSoiHmMUpmEN1B9wBI8UowU02W09ph52+FkotviEAAfEuIwFe8ANnCeb3Ez3ZPYTvX5LEgt2xTB34SITjwxyT+UPQAuCmIeUDkOOdLTZQK7sW24.31TwijtWdeBr2Az2AjxFVkJ3CnIijhHstoU5.OqTK8gYbNpzNhALK2GatBPSlwa+6uo0zYK9yKZcIyWNb1F1wsFRYCFly+25mZgtN8FPrJ7GGPjkYaUiXRE.46RTbJZLdBSNs3Hn+ynfusP7Q3tLo2vaFiKcCXDtU9+.ioCtdH9PfAzSlCvUvs+gOASovF+WMshA7ox4qgyGLTBD.UbI1eUqgkEDRoCtr9CbdWVjhFHldpnKnuSBILJfdB.9Z1WDH7F0i8Kzq2ZFYv1dJMb7Ro8WjN3Uu0oK2O7skYHwfiHxXFz9fgbfYVX1PIUNXIUirYcC0ZUASOfwTu3ugOoBcmkv.gtYBKvAbLUdoHdj9dJ86Hq6YtTRzI4y6OAfOj6UUsV2CCTu0afddPf3REU.KsdFtsz60UDLMZnfy7TaYzHC5OODFLHyv+2QRNkvBTM.8Fm.TV9uh2CTV+1Pn.z5XgO7MbahGjXmpFynZjTjdPUKMtt2rp2RXMu.RkgUFI6whl7DfoPM8k5ohKqjahdi2TlqJNT3ardIm+3BNelFKl6Vtf6VCKR7f25pnLPWKZio0KH9t4MU5OfNIil+J8RWcGXcGtOchhM3KgYGcIwvSpkFUWc1JvUGw3mop+guppGPGQlLa8Vv5dRZjpeSsFFtm9WFbjJjKcNTAitZtQ+BbSPp9Syc2oQyMa1rfKp.RgOkbyiAy4ZNQC2s1sgq61Pa1H5klzoQglM2c2Fa8zsa1bys14Y67zzmF2NlBuzh6MMCa5AmyKbcKEtqhc2dNw6ZZCaehp8.U53naapzctoxW.rLy2nq7wLpxH2C2cHI4Cbgbqrxp5YuWEJ4ui.gJTnWAmvFzD5bJWk+Y3P320yjcmJwWpTQp0cOIX15JIg4f+UwQTxnxf+AlVTsf6DxWYQaN0yMJF1kwa9aLNkDCuHWqv7zVObVsBd5wRlp1NImojBOiOKq.r0+qMvh7VyOIiBCIdwhy8LS2UAz806.oYt9+mPE7Qp01tn2kR+L6EZgvei+4ddkM00NXyE8fatnGbqE8fOcQO31K5Ae1hdvc93GT8uf44ikhPyCTfNitGpKBsrNjSfGioehI5e.jgizrK
                                

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

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

                                  @ustk Thanks. Same thing : it loads fine, and the buffer is displayed, but when I hit 'Compile' - without changing anything in the script - it crashes HISE.

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

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

                                    Bibidi babidi bump !

                                    @Christoph-Hart could you take a look at this if you have a moment please?
                                    Just tell me if there is indeed something to be fixed, or if I need another tee-shirt 🙂

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

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

                                      Ok, if someone hits the same issue, I might have found a solution for this. I don't know if that's the proper way of handling it, but it seems to be working ok.

                                      I chaned this bit, and replaced the assertion:

                                      bool isConstant() const override
                                      {
                                          jassert(ns != nullptr); 
                                          auto v = ns->constObjects.getValueAt(index);
                                      
                                          // objects and arrays are not constant...
                                          return !v.isArray() && !v.isObject();
                                      }
                                      

                                      by this :

                                      bool isConstant() const override
                                      {
                                          if (ns == nullptr)
                                              return false;    
                                              
                                          auto v = ns->constObjects.getValueAt(index);
                                      
                                          // objects and arrays are not constant...
                                          return !v.isArray() && !v.isObject();
                                      }
                                      

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

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

                                      71

                                      Online

                                      1.7k

                                      Users

                                      11.7k

                                      Topics

                                      102.2k

                                      Posts