Forum
    • Categories
    • Register
    • Login

    Anyone else hit this Engine.getUptime() crasher?

    Scheduled Pinned Locked Moved Bug Reports
    11 Posts 2 Posters 14 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.
    • dannytaurusD
      dannytaurus
      last edited by dannytaurus

      HISE was crashing for me fairly often, mostly when left open playing MIDI for a long time.

      Claude reckons to have found the cause (here's the PR fix), and it certainly seems to have fixed it for me.

      Engine.getUptime() fetched the current MIDI event pointer twice, once to null-check it and again to read its timestamp, but audio thread can clear that pointer between the two reads, so timer callbacks on scripting thread would occasionally crash.

      The fix reads the pointer once into a local and uses that, matching every other call site in the file.

      Just wondering why this hasn't come up before. Anyone else experienced random crashes while playing MIDI?

      HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
      Meat Beats: https://meatbeats.com
      Klippr Video: https://klippr.video

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @dannytaurus
        last edited by

        @dannytaurus What are you using the timer for?

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

        dannytaurusD 1 Reply Last reply Reply Quote 0
        • dannytaurusD
          dannytaurus @David Healey
          last edited by

          @David-Healey For updating UI stuff.

          1. The latch clock on an Overs indicator around the level knob, so it stays visible for 1.5 seconds
          2. A fancy 'ease back' in a custom wave display - easy to get rid of that one and no great loss

          HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
          Meat Beats: https://meatbeats.com
          Klippr Video: https://klippr.video

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @dannytaurus
            last edited by

            @dannytaurus I don't do any long running animations with timers so that's probably why I haven't hit such issues.

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

            dannytaurusD 1 Reply Last reply Reply Quote 0
            • dannytaurusD
              dannytaurus @David Healey
              last edited by

              @David-Healey These are both quite short animations - the Overs one is 1.5s and the wave display is 150ms.

              The Overs one only runs when the level goes over, but the wave display one runs on every note.

              The timer runs throughout the life of the plugin instance, but the calls to getUptime() are limited to the short ranges above, and it's the getUptime() calls that were triggering the crash bug.

              HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
              Meat Beats: https://meatbeats.com
              Klippr Video: https://klippr.video

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @dannytaurus
                last edited by

                @dannytaurus I think I have used getUptime in a few of my interface scripts, mostly I use it in non-deferred scripts though, could that make a difference? But it looks like a good bug fix either way.

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

                dannytaurusD 2 Replies Last reply Reply Quote 0
                • dannytaurusD
                  dannytaurus @David Healey
                  last edited by

                  @David-Healey Maybe. I'm looking at whether I can ditch timers completely. Never liked using them in web app front ends, and don't like using them in HISE either.

                  Is there a more HISE-y way to keep an overs indicator showing for 1.5s after an over hits?

                  HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • dannytaurusD
                    dannytaurus @David Healey
                    last edited by dannytaurus

                    @David-Healey Switched the overs timer to a tick counter and removed the fancy easing in the wave display - it won't be missed.

                    So no more getUptime() calls in my plugin now. But I'll leave the PR so Christoph can judge if it's worth merging.

                    HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                    Meat Beats: https://meatbeats.com
                    Klippr Video: https://klippr.video

                    1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @dannytaurus
                      last edited by

                      @dannytaurus said in Anyone else hit this Engine.getUptime() crasher?:

                      Is there a more HISE-y way to keep an overs indicator showing for 1.5s after an over hits?

                      I'm not sure what an over is :)

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

                      dannytaurusD 1 Reply Last reply Reply Quote 0
                      • dannytaurusD
                        dannytaurus @David Healey
                        last edited by

                        @David-Healey Sorry, I mean output level greater than 1.0, so I can show a red ring around the level knob to indicate 'over'.

                        HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                        Meat Beats: https://meatbeats.com
                        Klippr Video: https://klippr.video

                        David HealeyD 1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @dannytaurus
                          last edited by

                          @dannytaurus Aha, I use the built in peak meter floating tile for level display, I think it has some options for controlling the decay time, using laf you can probably style the overs to have the appearance you want. If it doesn't do what you need already I would look at extending it.

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

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

                          18

                          Online

                          2.8k

                          Users

                          14.0k

                          Topics

                          121.6k

                          Posts