HISE Logo Forum
    • Categories
    • Register
    • Login

    TimerObject execution time-out error

    Scheduled Pinned Locked Moved General Questions
    18 Posts 4 Posters 798 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.
    • d.healeyD
      d.healey @ustk
      last edited by

      @ustk What do you mean by a big project?

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

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @d.healey
        last edited by

        @d-healey Complex interface and big DSP

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

        1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey -- hmm OK but I also have a need to run a timer - and to stop it inside the timer and then calc a new "time" and restart the timer.. so simplified example:

          const var myTimer = Engine.createTimerObject();
          var kounter = 0;
          
          myTimer.setTimerCallback(function()
          {
              myTimer.stopTimer();    
          
              if (kounter == 0)
              {
                 myTimer.startTimer(30);
                 Console.print("short");
              }else{
                  myTimer.startTimer(200);
                  Console.print("Long");    
              }
              kounter = 1 - kounter;
          
          });
          myTimer.startTimer(30);
          

          How would you do this?

          HISE Development for hire.
          www.channelrobot.com

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

            I still have the timer issue...
            I have a lead though!
            The panel can be hidden, and I know hidden panels are not repainted in the background and cause issues...
            Investigating...

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

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

              @ustk said in TimerObject execution time-out error:

              @d-healey Complex interface and big DSP

              I haven't done any DSP stuff so this could be causing instability that I haven't experienced.

              @Lindon

              In you're example the timer effectively won't stop. So you might as well get rid of the .stopTimer() call. The call to startTimer() (inside the callback) will just change the timer's speed so should work how you want.

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

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @d.healey
                last edited by

                @d-healey said in TimerObject execution time-out error:

                @ustk said in TimerObject execution time-out error:

                @d-healey Complex interface and big DSP

                I haven't done any DSP stuff so this could be causing instability that I haven't experienced.

                @Lindon

                In you're example the timer effectively won't stop. So you might as well get rid of the .stopTimer() call. The call to startTimer() (inside the callback) will just change the timer's speed so should work how you want.

                --ohhhh. riiiight I didnt know I could effectively change the timer length without stopping it - great. Thanks.

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  Every time I have a project getting big, Hise behave strangely. I say strangely because it's not 100% the same issue all the time.

                  One thing that might cause issues is the compile time-out which fires if you have a lot of stuff to do in the first onInit call. For example loading a lot of audio files might cause the time-out to fire, but if you compile it multiple times, it wents through.

                  The default is 5 seconds, but you can raise that value if you run against that limit with bigger stuff in the HISE settings (search "Compile Timeout").

                  ustkU 2 Replies Last reply Reply Quote 0
                  • ustkU
                    ustk @Christoph Hart
                    last edited by ustk

                    @Christoph-Hart Yep that's what I thought at first, so I set it to 10sec, but my compile time is about 2sec with the i7...
                    It's like the scripts compile before the interface is done, because all the errors (in that case) are only "component not found" (sometimes 10-15 components)
                    I got all scripts in external .js files (about 35 files). Maybe it can be related...

                    Another thing, when I recompile (just F5) in the onInit script it generally works well. But if I'm in a subscript it's a crash 80% of the time (shift-F5 seems more stable though, because I guess it's more like an init sequence). So now I always keep a tab with the onInit opened and I try to compile in that tab even if I work somewhere else. Recompiling in the interface designer works too.

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

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

                      @Christoph-Hart It's weird, every now and then I get an execution time out from anywhere in the project. A loop in this script, a timer in that one, another loop somewhere else...

                      Nothing is related, and it happens with no apparent reason, except that it's when I pass the mouse on a painted panel (a hover redraw the panel and the execution time out points to a loop in the paint routine)... I recompile, it's gone, and 5 minutes later I get another one somewhere else...

                      Nothing should be twisted in the code, and everything works fine (parts of these scripts are several months old and I haven't modified them)

                      If you want to test my project I can share the git with you (only if you're interested, I know you have bigger fish to fry ;) )

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

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

                        I was thinking... In a panel constructor (same panel 4 times), I have a paint routine. In this paint routine, I have a loop (i goes up to 50) to paint a curve out of two values.

                        The question is, what happens if another panel callback is called when the loop of the first one isn't yet done?
                        I'm thinking of a leaking i

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

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @ustk
                          last edited by

                          @ustk try defining i in each funciton

                          local i;

                          HISE Development for hire.
                          www.channelrobot.com

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

                          52

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          101.9k

                          Posts