1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Script Array Out of Bounds

Discussion in 'Scripting Workshop' started by sachsm, Feb 4, 2006.

Thread Status:
Not open for further replies.
  1. sachsm

    sachsm Forum Member

    Messages:
    28
    I am using the arpeggiator script and getting a 'Script Array Out of Bounds' error in line 673.

    select($note_order)
    case 1 {as pressed}
    $loop_cursor := $cursor
    $ap := 0
    while($ap < $cursor )
    LINE 673 %loop_buffer[$ap] := %pressed[$ap]
    inc($ap)
    end while

    I think this error is also the precursor to Kontakt crashing, just a guess since they always seems to happen together. I tried looking at the script but I am not sure why this array is being indexed 'out-of-bounds'.
    Has anyone else seen such problems with the arp scripts?

    Thanks,

    Mike Sachs
     
  2. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Hi Mike,
    I think it's unlikely that an 'Array Out of Bounds' error in itself would case Kontakt to crash. I've gotten this error in other contexts many times without any problems. It's still possible though that the script behaves in some way that exposes a K2 bug.

    The arpeggiator script doesn't call the message function (except in 'on init'). That means that if there is an error, that error message will stay visible since the script never shows any other message that replaces earlier ones.
    So, I would guess that this error happen at some point in time and that you link a crash happening later to this error since the error message is still visible. Is it possible that that's the case?

    I'm sorry, I really would want to be more helpful here.
    Does your crashes only happen when using this particular script?
    Can you see anything strange going on in the 'Engine' info in Kontakt?

    Btw. anyone else who thinks it's strange that Kontakt displays line numbers in error messages, but no line numbers in the script editor!?

    Best,
    Nils
     
  3. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Yeah, go get 'em Nils! I guess they think we have nothing better to do than to actually count a couple hundred or so lines each time we get one of their error messages. Not too programmer friendly :-(

    Bob
     
  4. sachsm

    sachsm Forum Member

    Messages:
    28
    Well thanks to Nils editor I was able to find the line numbers that matches the warning display.
     
Thread Status:
Not open for further replies.