Bug with end() before newMouseTracker

PennController for IBEX Forums Bug Report Bug with end() before newMouseTracker

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8410
    mawilson
    Participant

    I posted something about this in the support forum, but after further testing it seems to be a bug, so I’m making a post here as well. If you use end() in a trial with a MouseTracker prior to creating the MouseTracker, the script freezes. PCIbex does not display an error message, but the following error appears in the JavaScript console:

    
    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map')
        at window.PennController._AddElementType.end (PennController.js:40:93530)
        at n.end (PennController.js:33:64935)
        at n.hasOwnProperty.end (PennController.js:33:48507)
        at b.<computed>.<computed>.h [as endTrial] (PennController.js:33:23603)
        at async PennController.js:33:63340
    

    Here’s an experiment that serves as a MWE, at https://farm.pcibex.net/r/BtxkDp/:

    
    PennController.ResetPrefix(null) // Shorten command names (keep this line here)
    
    Sequence('trial')
    
    newTrial('trial',
        newText().log(), // this is just so there's a result to send, otherwise it spins forever
        end(),
        newMouseTracker('mouse') // comment this out, or put it before end(), and it works
    )
    

    I’ve found a workaround for my use case that just puts the MouseTracker before the end() call, but I figured this probably still isn’t the intended behavior (I didn’t see anything in the documentation).

    • This topic was modified 1 year, 8 months ago by mawilson. Reason: better defined bug
    #8412
    mawilson
    Participant

    Oh, forgot to add: I’m using whatever version of PennController is currently on the PCIbex Farm (which I think is 1.9).

    #8423
    Jeremy
    Keymaster

    Thank you for identifying and reporting this bug! As I’ve said in your other topic, I will work on fixing it for the next release of PennController

    Jeremy

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