Hi,
I have a script in which in each trial I create a new RGB matrix and convert it into an texture (something like "texture1 = Screen('MakeTexture', ...)"). Strangely, after about 600 trials, the programm crashes each time with the below error messages. I clear out the textures after each trial (Screen('Close')) and I have a ATI Radeon HD 4350 with 1024MB RAM. Matlab V7.0 and PTB 3.0.8 are running on a Dell PC with 3.25 GB RAM. So it looks to me if a real memory problem is rather unlikely.
Some more details
- the RGB matrix is 12x12x3 in uint8 format
- the window is opened with
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'UseFastOffscreenWindows');
[window, rect] = PsychImaging('OpenWindow', 0);
- the code crashes each time pretty mich after the same amount of trials
- feature('memstats') tells me that there is lots of free RAM and virtual Memory. Also, the largest free contigous block is 1053 (but the following blocks are much smaller).
- it also shows me some flip errors that shouln'd be there (see error log below)
Many thanks, I'll appreciate any help! I have be sitting over this problem some hours now and I need to get it fixed soon.
Nico
Error Message:
PTB-ERROR: Texture creation failed or malfunctioned for a texture of requested size w x h = 12 x 12 texels
PTB-ERROR: and at least 4 bytes VRAM memory consumption per texel.
PTB-ERROR: Currently there are already 1 textures, offscreen windows, movies or proxies open.
PTB-ERROR: All these objects consume system memory and could lead to ressource shortage.
PTB-ERROR: My current (rough and probably way too low) estimate is that at least 0.000000 MB of memory are
PTB-ERROR: consumed for textures, offscreen windows and similar objects.
PTB-ERROR: Another cause of failure could be that your graphics hardware doesn't have sufficient amounts of
PTB-ERROR: free VRAM memory. Try to reduce the precision and/or size of your texture image to the lowest
PTB-ERROR: acceptable setting for your purpose.
PTB-ERROR: Read the online help for Screen MakeTexture? or Screen OpenOffscreenWindow? for information
PTB-ERROR: about how to reduce the number of color channels and/or precision of the texture.
PTB-ERROR: It may also help to reduce general VRAM memory consumption:
PTB-ERROR: Reduce the display resolution to the smallest acceptable resolution or disable the 2nd
PTB-ERROR: display of a dual-display setup if it isn't strictly needed for your study.
PTB-ERROR: Other than that you could upgrade to more powerful graphics hardware (more VRAM) or try to split
PTB-ERROR: your oversized image into multiple separate subimages and draw them sequentially to the screen.
PTB-ERROR: That way you'll be able to draw larger images, albeit at drastically lowered performance and more
PTB-ERROR: coding hazzle.
Error in function MakeTexture: Usage error
Texture creation failed, most likely due to unsupported precision or insufficient free memory.
INFO: PTB's Screen('Flip', 10) command seems to have missed the requested stimulus presentation deadline
INFO: a total of 497 times out of a total of 2450 flips during this session.
I have a script in which in each trial I create a new RGB matrix and convert it into an texture (something like "texture1 = Screen('MakeTexture', ...)"). Strangely, after about 600 trials, the programm crashes each time with the below error messages. I clear out the textures after each trial (Screen('Close')) and I have a ATI Radeon HD 4350 with 1024MB RAM. Matlab V7.0 and PTB 3.0.8 are running on a Dell PC with 3.25 GB RAM. So it looks to me if a real memory problem is rather unlikely.
Some more details
- the RGB matrix is 12x12x3 in uint8 format
- the window is opened with
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'UseFastOffscreenWindows');
[window, rect] = PsychImaging('OpenWindow', 0);
- the code crashes each time pretty mich after the same amount of trials
- feature('memstats') tells me that there is lots of free RAM and virtual Memory. Also, the largest free contigous block is 1053 (but the following blocks are much smaller).
- it also shows me some flip errors that shouln'd be there (see error log below)
Many thanks, I'll appreciate any help! I have be sitting over this problem some hours now and I need to get it fixed soon.
Nico
Error Message:
PTB-ERROR: Texture creation failed or malfunctioned for a texture of requested size w x h = 12 x 12 texels
PTB-ERROR: and at least 4 bytes VRAM memory consumption per texel.
PTB-ERROR: Currently there are already 1 textures, offscreen windows, movies or proxies open.
PTB-ERROR: All these objects consume system memory and could lead to ressource shortage.
PTB-ERROR: My current (rough and probably way too low) estimate is that at least 0.000000 MB of memory are
PTB-ERROR: consumed for textures, offscreen windows and similar objects.
PTB-ERROR: Another cause of failure could be that your graphics hardware doesn't have sufficient amounts of
PTB-ERROR: free VRAM memory. Try to reduce the precision and/or size of your texture image to the lowest
PTB-ERROR: acceptable setting for your purpose.
PTB-ERROR: Read the online help for Screen MakeTexture? or Screen OpenOffscreenWindow? for information
PTB-ERROR: about how to reduce the number of color channels and/or precision of the texture.
PTB-ERROR: It may also help to reduce general VRAM memory consumption:
PTB-ERROR: Reduce the display resolution to the smallest acceptable resolution or disable the 2nd
PTB-ERROR: display of a dual-display setup if it isn't strictly needed for your study.
PTB-ERROR: Other than that you could upgrade to more powerful graphics hardware (more VRAM) or try to split
PTB-ERROR: your oversized image into multiple separate subimages and draw them sequentially to the screen.
PTB-ERROR: That way you'll be able to draw larger images, albeit at drastically lowered performance and more
PTB-ERROR: coding hazzle.
Error in function MakeTexture: Usage error
Texture creation failed, most likely due to unsupported precision or insufficient free memory.
INFO: PTB's Screen('Flip', 10) command seems to have missed the requested stimulus presentation deadline
INFO: a total of 497 times out of a total of 2450 flips during this session.