1231 – Previously working panel now crashing on receiving midi

Home Forums General Programming 1231 – Previously working panel now crashing on receiving midi

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5840
    Llamatron
    Participant
      • Topics: 7
      • Replies: 27
      • Total: 34

      I installed latest ctrlr nightly and receiving some midi messages (for example active sensing from my DW8000, or play start message from a sequencer) crashes my previously working panel.

      I think it probably has to do with LUA as I have a method called on midi message reception, and another panel which doesn’t have such a method doesn’t seem to crash. Unfortunately I don’t get any error message in the log so I don’t really know what exactly is causing this.

      Uploading said panel in case having a look at this method (called myMethod) could help pinning down the issue.

      PS: where are all the older nightlies gone?

      Attachments:
      You must be logged in to view attached files.
      #5842
      dasfaker
      Keymaster
        • Topics: 80
        • Replies: 793
        • Total: 873
        • ★★★

        Are you using getRange? If the range exceeds the size of the midi received data this crash Ctrlr.

        #5843
        Llamatron
        Participant
          • Topics: 7
          • Replies: 27
          • Total: 34

          No I don’t use getRange

          #5885
          Llamatron
          Participant
            • Topics: 7
            • Replies: 27
            • Total: 34

            Pretty sure the problem is in this code, but I can’t figure where as even if I uncomment the console message nothing shows in the console. Without a method linked to midi message reception or the default empty method there is no crash. It seems to happen when receiving 1 byte midi messages, but I’m not 100% sure.

            midiReceived = function(midiMessage)

            —    console(“Midi message received”)

            s = midiMessage:getSize()
            sysexData = midiMessage:getLuaData()
            b = sysexData:getByte(0)

            midiChannel = panel:getGlobalVariable(1)
            programMessage = 0xC0 + midiChannel
            dumpMessage = 0x30 + midiChannel

            if b == programMessage then
            —        console(“Received program change”)
            dumpRequest = {0xF0, 0x42, dumpMessage, 0x03, 0x10, 0xF7}
            m = CtrlrMidiMessage(dumpRequest)
            panel:sendMidiMessageNow(m)
            end

            dumpByte = sysexData:getByte(2)

            if b == 0xF0 and s == 57 and dumpMessage == dumpByte then
            —        console(“Received dump”)
            assignValues(midiMessage)
            end

            end

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The forum ‘Programming’ is closed to new topics and replies.
          There is currently 0 users and 146 guests online
          No users are currently active
          Forum Statistics
          Threads: 2,495, Posts: 17,374, Members: 77,605
          Most users ever online was 12 on January 22, 2019 3:47 pm
          Ctrlr