[ACT-R-users] Novice experiment code problem
Dan Bothell
db30 at andrew.cmu.edu
Sat Nov 19 14:19:36 EST 2011
--On Saturday, November 19, 2011 1:20 PM +0000 James Grange <j.a.grange at psy.keele.ac.uk> wrote:
> Hi all,
>
> Apologies for the novice question.
>
> I am adapting the experiment code of tutorial 4's assignment (the Zbrodoff
> experiment) to be a simple flanker task. I have only slightly modified the
> code from the Zbrodoff, but I am running in to an error that I can't find
> location of the faulty code (code attached).
>
> When I run the do-trial function [i.e. (do-trial "a" "b" "incongruent" "z"
> t) ], I get the following error:
>
> Error: Non-structure argument NIL passed to ref of structure slot 1
> [condition type: SIMPLE-ERROR]
>
> It seems that NIL is being passed to the present-trial function, but
> nothing should be passed to this function as *TRIALS* should be empty, as
> it should have been cleared during (defmethod
> rpm-window-key-event-handler).
>
> As you can see from the code, I have commented out all the higher level
> code at this point as I am just trying to get the code to present a single
> trial.
>
While I can't really debug your Lisp code for you since I don't know
exactly what it or the model is supposed to do, I can tell you where
the error is occurring when I run the do-trial function like you
show, and that may help you fix it.
The error happens in the rpm-window-key-event-handler method when
*trials* is already empty. Thus, trial is set to nil and it is
the call to (trial-block trial) which actually throws the error.
I don't know if that's a problem with the model pressing keys when you
weren't expecting it to or if there's something wrong with the
experiment code, but hopefully that'll help you to fix it.
Dan
More information about the ACT-R-users
mailing list