HISE Logo Forum
    • Categories
    • Register
    • Login

    HISE crashes when setOnGridChange(true, onGrid) is used

    Scheduled Pinned Locked Moved Bug Reports
    2 Posts 1 Posters 99 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.
    • M
      MidiMinion
      last edited by

      I can run the following code without any issues, but when I change the last line to true (so the function runs synchronously), HISE crashes immediately.
      Has anyone else experienced something like this?
      I’m wondering if this is a known issue or if I might be doing something wrong.

      const var th = Engine.createTransportHandler();
      th.setSyncMode(1);
      th.setEnableGrid(true, 5);
      
      inline function onGrid(grid) 
      {
          Console.print(grid);
      }
      
      th.setOnGridChange(false, onGrid); // works fine
      // th.setOnGridChange(true, onGrid); // crashes HISE
      
      1 Reply Last reply Reply Quote 0
      • M
        MidiMinion
        last edited by MidiMinion

        I figured it out.
        In case someone else gets stuck at this point. When calling synchronously, the parameters of the function must be complete:

        const var th = Engine.createTransportHandler();
        th.setSyncMode(1);
        th.setEnableGrid(true, 5);
        
        inline function onGrid(grid, timestamp, first)  // Parameters need to be complete
        {
            Console.print(grid);
        }
        th.setOnGridChange(true, onGrid); 
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        21

        Online

        2.0k

        Users

        12.7k

        Topics

        110.6k

        Posts