Search the web
Sign In
New User? Sign Up
psychtoolbox · Psychophysics Toolbox
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
Re: SCREEN runs out of memory   Message List  
Reply Message #52 of 11283 |
>Hi,
>
>I'm sorry to bother you--I am a first year graduate student working this
>quarter for Mike Shadlen at the University of Washington. I am trying to
>write a program for a visual psychophysics experiment that involves
>multiple 60 frame videos. The program worked fine with the Screen(Put
>Image) function except it was running too slowly. I of course realized why
>after I looked at the PutImage function.
>
>I've changed to a Screen(OpenOffScreenWindow), Screen(PutImage),
>Screen(CopyWindow) sequence. However, this causes the program to crash
>after a few trials, saying I either don't have enough memory or "???
>SCREENOpenOffscreenWindow.c: NewGWorld error -108.
>174 x 489 x 32 bits." I am clearing variables after their use, and MATLAB
>workspace memory is nowhere near to the 100MB I am giving MATLAB. So I
>have two questions. (1) Is there a better way to make movies that run at
>my monitor's refresh rate (75 Hz)? (2) Do you know what could cause the
>"NewGWorld" error?
>
>I've been trying to figure this out for quite some time, but so far I have
>had no success. Any comments would be greatly appreciated.
>
>Thanks so much,
>Sarah Allred

dear sarah

1. You're doing the right thing. MovieDemo.m is a good model for what you
want to do. You should be precomputing lots of images, putting each in
its own offscreen window. Don't forget to CLOSE those windows when you're
through with them. Each allocated window takes up memory. If you allocate
(i.e. open) new windows for each trial, and don't free (i.e. close) the
old ones, you'll quickly run out of memory.

2. The NewGWorld error, -108, means "not enough memory". Note that
allocating a GWorld, by SCREEN, is preferentially done in the so called
"Temp" memory that belongs to the Mac OS. I wonder if you might have
assigned ALL your memory to MATLAB and left none free for the Mac OS. If
so, you'll solve your problem by REDUCING the memory allocation to MATLAB.

3. The mex function BYTES will report how much regular and "Temp" memory
are available. Printing those values out before and after each trial will
help you track down the problem.

best

denis









Tue Feb 8, 2000 2:09 am

denis@...
Send Email Send Email

Message #52 of 11283 |
Expand Messages Author Sort by Date

... dear sarah 1. You're doing the right thing. MovieDemo.m is a good model for what you want to do. You should be precomputing lots of images, putting each in...
Denis Pelli
denis@...
Send Email
Feb 8, 2000
2:06 am

... dear sarah in my last note i explained the error and suggested how to deal with it. Since the error message was too enigmatic, i've expanded it to be more ...
Denis Pelli
denis@...
Send Email
Feb 8, 2000
3:03 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help