Just found another weird issue with E-Prime 2.
The help file (and logic dictates) that if you call c.Log, the context object should log the variables in that Level to the data file.
However, not only have I figured out how to not get that to work... I have figured out how to get a perfectly good TextDisplay object to not log keystrokes as it should.
The interesting thing is that the information is being correctly logged to the E-Recovery text file that E-prime generates but is not being converted to the .edat2 file. I do not yet understand why.
Ok, the situation is this; I have in the SessionProc set up a loop using a couple of in-line script objects and a Label object to loop through some movie files and capture responses to them. A bit hackish.
I have run the E-Recovery file through E-Recover and it gave me a hint that a "Complete Record" is surrounded by a "logframe start" and a "logframe end" tags in the text file. Makes sense.
My problem is that there are 20-odd logframe start and logframe end tag pairs and it only seems to convert the first one.
Edit:
Ok, as usual there are a couple of "undocumented" features that you need to do to get this working.
You need to call the c.PushNewFrame before your objects and c.PopFrame after the objects have run to get the correct logging levels to appear and be processed by E-Recover.
For instance
c.PushNewFrame
'manually manipulate the objects using script files
c.Log
c.PopFrame
'Loop until exit
Easy once you know the solution.
Showing posts with label E-Prime 2. Show all posts
Showing posts with label E-Prime 2. Show all posts
Thursday, January 31, 2013
Friday, January 25, 2013
E-Prime 2 RESP hidden characters. Bug or Gotcha?
I have just wasted some time tracking down a weird bug/feature/gotcha in E-Prime 2.
For example the code below is trying to detect a press of the space bar.
Debug.Print "Response is " & GetResponse.RESP
if GetResponse.RESP = "SPACE" then
Debug.Print "Space bar pressed"
else
Debug.Print "Something else pressed"
End if
In the debug window you can see:
Response is SPACE
Something else pressed
Why is this so?
Because the Debug output window HIDES SOME CHARACTERS OF THE OUTPUT.
The actual RESP text is "{SPACE}", but the Debug window silently cleans it up to "SPACE" which means that any text comparison you do based on the information you have from the Debug window will be wrong.
If you want to test this try:
Debug.Print "Length of RESP is " & Len(GetResponse.RESP)
Debug.Print "Response is " & GetResponse.RESP
You will see that the length of the string is two characters longer than the string that is output. I.e
Length of RESP is 7
Response is SPACE
Is this a bug, feature or gotcha? You decide. Really depends how much of your valuable time you waste trying to figure it out.
How I have missed being able to set breakpoints or inspect the stack or any basic debugging tools in Eprime....
For example the code below is trying to detect a press of the space bar.
Debug.Print "Response is " & GetResponse.RESP
if GetResponse.RESP = "SPACE" then
Debug.Print "Space bar pressed"
else
Debug.Print "Something else pressed"
End if
In the debug window you can see:
Response is SPACE
Something else pressed
Why is this so?
Because the Debug output window HIDES SOME CHARACTERS OF THE OUTPUT.
The actual RESP text is "{SPACE}", but the Debug window silently cleans it up to "SPACE" which means that any text comparison you do based on the information you have from the Debug window will be wrong.
If you want to test this try:
Debug.Print "Length of RESP is " & Len(GetResponse.RESP)
Debug.Print "Response is " & GetResponse.RESP
You will see that the length of the string is two characters longer than the string that is output. I.e
Length of RESP is 7
Response is SPACE
Is this a bug, feature or gotcha? You decide. Really depends how much of your valuable time you waste trying to figure it out.
How I have missed being able to set breakpoints or inspect the stack or any basic debugging tools in Eprime....
Labels:
bug report,
E-Prime 2
Wednesday, August 15, 2012
Debugging errors with playing movies in E Prime 2.0.10.etc
Ok, set up the experiment and test on my main dev machine. Movies work fine. using MOV files in this case.
Move the experiment and the movie files to laptop... failes miserably due to video codec.
Install quicktime... fails.
Install VLC... fails.
Install K-lite... plays. (now using ffdshow)
The experiment runs like a dog. (No hardware acceleration)
Move to a new machine.... test the exp. Fails miserably due to video codec.
Install K-lite... fails.. but differently.
Install DirectX.... better but new failure. (Unable to load sound 203...)
Install VLC and Quicktime just to cover my bases... still fails but whinging about audio now. Tells me to check AudioLoadReport in Experiment folder. (They are actually in the same folder as the stimuli videos.. which is not the same as the experiment folder... but close enough. (BUG anyone at PST who cares))
The AudioLoadReport is complete garbage. It's XML, which I could deal with.. but it does not actually say anything useful.
Interestingly, of the 60 MOV files in the stimuli set, 13 have generated AudioLoadReport.xml and VideoLoadReport.xml files... but the rest have not. This is common on all three computers. I have had a look at all the video files in GSpot and MediaInfo and they use the same Codec's for both Audio and Video (Vanilla Mov file with MPEG4, AVC and PCM audio.)
Weirdly inconsistent.
I'm now trying to update everything on box 3 to see if it will magically come good. I'm at a bit of a loss at the moment as to why it is having trouble. Quicktime, VLC, Media Player Classic and Windows Media Player can all play the files correctly. There is some weird filter graph issue that shows up in an older copy of GSpot...so I think the issue is with my DirectX setup on that machine.
The investigation continues.
Ran CodecConfig. Still no love.
Later...
I used GraphStudio from K-lite to have a look at the filter graph and found the audio pin was not rendering to anything from the Apple Media Splitter filter. This seems to be due to the Mov files having PCM audio rather than AAC which is more usual in Mov files. I then tried using the Haali media splitter and hooking the audio pin to the DirectSound output filter... Success! So all I had to do was then swap the prefered filter for Mov files from Gabest Splitter to Haali using the "Manage prefered DirectShow source Filters" tool in K-lite and the experiment played flawlessly.
Interestingly on my main dev machine the Gabest Splitter filter is not installed. It has the LAV Splitter as the primary splitter for Mov and it works perfectly. Download LAV Splitter here
Move the experiment and the movie files to laptop... failes miserably due to video codec.
Install quicktime... fails.
Install VLC... fails.
Install K-lite... plays. (now using ffdshow)
The experiment runs like a dog. (No hardware acceleration)
Move to a new machine.... test the exp. Fails miserably due to video codec.
Install K-lite... fails.. but differently.
Install DirectX.... better but new failure. (Unable to load sound 203...)
Install VLC and Quicktime just to cover my bases... still fails but whinging about audio now. Tells me to check AudioLoadReport in Experiment folder. (They are actually in the same folder as the stimuli videos.. which is not the same as the experiment folder... but close enough. (BUG anyone at PST who cares))
The AudioLoadReport is complete garbage. It's XML, which I could deal with.. but it does not actually say anything useful.
Interestingly, of the 60 MOV files in the stimuli set, 13 have generated AudioLoadReport.xml and VideoLoadReport.xml files... but the rest have not. This is common on all three computers. I have had a look at all the video files in GSpot and MediaInfo and they use the same Codec's for both Audio and Video (Vanilla Mov file with MPEG4, AVC and PCM audio.)
Weirdly inconsistent.
I'm now trying to update everything on box 3 to see if it will magically come good. I'm at a bit of a loss at the moment as to why it is having trouble. Quicktime, VLC, Media Player Classic and Windows Media Player can all play the files correctly. There is some weird filter graph issue that shows up in an older copy of GSpot...so I think the issue is with my DirectX setup on that machine.
The investigation continues.
Ran CodecConfig. Still no love.
Later...
I used GraphStudio from K-lite to have a look at the filter graph and found the audio pin was not rendering to anything from the Apple Media Splitter filter. This seems to be due to the Mov files having PCM audio rather than AAC which is more usual in Mov files. I then tried using the Haali media splitter and hooking the audio pin to the DirectSound output filter... Success! So all I had to do was then swap the prefered filter for Mov files from Gabest Splitter to Haali using the "Manage prefered DirectShow source Filters" tool in K-lite and the experiment played flawlessly.
Interestingly on my main dev machine the Gabest Splitter filter is not installed. It has the LAV Splitter as the primary splitter for Mov and it works perfectly. Download LAV Splitter here
Labels:
E-Prime 2,
Research Resources
Subscribe to:
Posts (Atom)