We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

toArray is not a function – Viewport Freeze

Home Forums Programming toArray is not a function – Viewport Freeze

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #67980
    Mariusz
    Customer

    Hi! I created a pretty complicated puzzle structure to play a kind of animation consisting of a few scenes in my app. At some point (at different random moments) the app viewport (the HTML embed section) freezes and cannot be moved/clicked/anything. In the console, I get this error:

    Uncaught TypeError: i.toArray is not a function
        at ya (v3d.js:1:619926)
        at us.Ya [as setValue] (v3d.js:1:623907)
        at ms.upload (v3d.js:1:627496)
        at v3d.js:1:772602
        at Fl.renderBufferDirect (v3d.js:1:773736)
        at We (v3d.js:1:779817)
        at Qe (v3d.js:1:779430)
        at ke (v3d.js:1:779007)
        at Fl.render (v3d.js:1:784271)
        at Tf.render (v3d.js:1:1076776)
    ya @ v3d.js:1
    Ya @ v3d.js:1
    upload @ v3d.js:1
    (anonymous) @ v3d.js:1
    Fl.renderBufferDirect @ v3d.js:1
    We @ v3d.js:1
    Qe @ v3d.js:1
    ke @ v3d.js:1
    Fl.render @ v3d.js:1
    render @ v3d.js:1
    render @ v3d.js:1
    render @ v3d.js:1
    (anonymous) @ v3d.js:1
    (anonymous) @ v3d.js:1
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1
    requestAnimationFrame (async)
    o @ v3d.js:1

    My puzzle structure looks more or less like it is in the picture. I tried to disable all the puzzles and enable them step by step to see when the error appears. I didn’t see any clear pattern maybe besides one thing: is there any limit to the “when finished do” slots we can use in one single puzzle structure tree? I have some hints that this might be the problem here – although I hope it’s something different because the animation sequences made this way work pretty nicely!

    Because of the requestAnimationFrame (async) I also tried to play around with switching on and off the “Advanced playback options” for “play animation” puzzles but it didn’t have any effect.

    Maybe you have any other clues on what could cause this error?

    Attachments:
    You must be logged in to view attached files.
    #67988
    kdv
    Participant

    My puzzle structure looks more or less like it is in the picture.

    Not enough info. Show all of them or upload the app and share the link.

    is there any limit to the “when finished do” slots we can use in one single puzzle structure tree?

    No.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #68091
    Mariusz
    Customer

    Thanks kdv for your reply. Unfortunately, I cannot share the project since it’s covered by NDA with a client and is still in progress. I tried to recreate the scene in a separate application that I could share with you but unfortunately, I had no luck in receiving the same error.

    But after hours of testing different enable/disable puzzles in the whole application (it’s really quite big and complex) I eventually came up with a walkaround that seems to work. I figured out that the problem was caused by using a “tween camera” in such a complex puzzle structure – it works fine when I try to recreate it in a blank application but messes up when used in my original complex app.

    Anyway, I replaced the “tween camera” puzzles (which come up in a sequence to get the animations to flow one after another, so there are a few of them), with “set position” and “camera look at” puzzles to move the camera to the proper position manually. And this way, it all works.

    I suppose this might be some internal puzzle bug maybe? I assume this from the console report. I attach the v3d.js file as well, maybe this will give you some clue on what’s going on here.

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.