Corrupt object while accessing the Live API - what does it mean


    Nov 07 2017 | 1:47 am
    I am working on quite a complex project involving multiple devices across tracks using javascript to implement a multi-channel looper on a launchpad. I am getting an error that I can't sort out:
    typedmess: api_handlemessage: corrupt object
    When I get these errors, part of the implementation breaks. It only happens when I start using more than one device. They use the same javascript file, so I am wondering if there is some conflict with all the variables/objects I am using. Does anyone have any idea what these errors could be indicating, or what I could look into?

    • Nov 07 2017 | 8:14 am
      Can you post some code - hard to say without seeing what's going on.
    • Nov 07 2017 | 12:24 pm
      Posting some code really doesn't get to the meat of it - I only see the error when trying to set this up in a Live Set with multiple instances on different 'slots'. The device works fine in isolation, and I see nothing wrong with the code as it is, just only when multiple instances are deployed, so I think there might be some general issue with javascript and live objects that I am overlooking.
      You really need a Launchpad to test this. Place one instance of the device on track and set the slot to 1, then hit the init button, and go into User 2 Mode. All is good, you can record audio, slice it, tap tempo, metronome, etc. When you add a second instance, and select slot 2 and then initialize the second device, trying to use the device by going in and out of user 2 mode, interacting with some of the buttons, etc, will eventually give the corrupt object error, and all the controls/LEDs from the slot 1 device will not function properly.
      I apologize for the mess and lack of comments, this is a work in progress.
    • Jun 17 2019 | 1:15 am
      I'm getting this behavior. However, sometimes I am able to use multiple instances of devices with the same js object. If the project is started and the devices are gradually added, that sometimes works. Other times, part of the functionality will be broken and I get the handlemessage error you mentioned. Most often, the live project will crash immediately on opening and cannot be recovered. I thought you could use the same js code and multiple of the same max device, but does anyone know if this is NOT the case? Is the general standard procedure assuming people will only have one of each device on a project, regardless if js is used or not?