PTB on Intel

I finally had a change to try out the PTB (using the current beta version) on my MacBook Pro running MATLAB 7.2. The short story is that it doesn't work. The longer story is that anything that calls screen seems to end with the flashing red caution screen. below is a printout of the output from one of these crashes, in case it's useful (I tried several of the various tests and they all failed with the same message).

There is also a somewhat serious general problem using matlab under X11 on intel (which I've not been able to find on any of the discussion lists, though I've not dug incredibly deeply). When running MATLAB in an xterm or rxvt window under X11, it will regularly stop accepting keyboard input, such that one has to kill the window altogether. hopefully the upcoming matlab fix will deal with this issue.

cheers,
russ

>> TestDrawingStuffOSX or TestTextureOSX


PTB-INFO: This is the Screen-Prototype for PTB 1.0.7, intended as update for Psychtoolbox
1.0.6
PTB-INFO: Implementation details may change in the final release for Psychtoolbox 1.0.7 -
Use at your own Risk!



OpenGL-Extensions are: GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_vertex_blend G
L_ARB_window_pos GL_ARB_shader_objects GL_ARB_vertex_shader GL_EXT_multi_draw_arrays GL_EX
T_clip_volume_hint GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord GL_AP
PLE_client_storage GL_APPLE_specular_vector GL_APPLE_transform_hint GL_APPLE_packed_pixels
GL_APPLE_fence GL_APPLE_vertex_array_object GL_APPLE_vertex_program_evaluators GL_APPLE_e
lement_array GL_APPLE_flush_render GL_NV_texgen_reflection GL_NV_light_max_exponent GL_IBM
_rasterpos_clip GL_SGIS_generate_mipmap GL_ARB_shading_language_100 GL_ARB_imaging GL_ARB_
point_parameters GL_ARB_texture_env_crossbar GL_ARB_texture_border_clamp GL_ARB_multitextu
re GL_ARB_texture_env_add GL_ARB_texture_cube_map GL_ARB_texture_env_dot3 GL_ARB_multisamp
le GL_ARB_texture_env_combine GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat GL
_ARB_shadow GL_ARB_depth_texture GL_ARB_shadow_ambient GL_ARB_fragment_program GL_ARB_frag
ment_shader GL_ARB_occlusion_query GL_ARB_point_sprite GL_ARB_vertex_buffer_object GL_ARB_
pixel_buffer_object GL_EXT_compiled_vertex_array GL_EXT_framebuffer_object GL_EXT_texture_
rectangle GL_ARB_texture_rectangle GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_
minmax GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra GL_EXT_stenci
l_wrap GL_EXT_texture_filter_anisotropic GL_EXT_separate_specular_color GL_EXT_secondary_c
olor GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_texture_compression_s3tc GL_EXT
_texture_compression_dxt1 GL_EXT_blend_equation_separate GL_EXT_texture_mirror_clamp GL_AP
PLE_ycbcr_422 GL_APPLE_vertex_array_range GL_APPLE_texture_range GL_APPLE_float_pixels GL_
ATI_texture_float GL_APPLE_pixel_buffer GL_NV_blend_square GL_NV_fog_distance GL_ATI_textu
re_mirror_once GL_ATI_text_fragment_shader GL_ATI_blend_equation_separate GL_ATI_blend_wei
ghted_minmax GL_ATI_texture_env_combine3 GL_ATI_separate_stencil GL_ATI_texture_compressio
n_3dc GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGI_color_matrix


WARNING: Querying rasterbeam-position doesn't work on your setup! (Returns a constant valu
e)

WARNING: Couldn't determine end-line of vertical blanking interval for your display! Troub
le with beamposition queries?!?


PTB-INFO: OpenGL-Renderer is ATI Technologies Inc. :: ATI Radeon X1600 OpenGL Engine :: 1.
5 ATI-1.4.26
PTB-INFO: Renderer has 256 MB of VRAM and a maximum 250 MB of texture memory.
PTB-Info: VBL startline = 900 , VBL Endline = -1
PTB-Info: Measured monitor refresh interval from VBLsync = 16.699048 ms [59.883654 Hz]. (5
0 valid samples taken, stddev=0.047322 ms.)
PTB-Info: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT extension for efficient high-performance t
exture mapping...

WARNING: Mismatch between measured monitor refresh intervals! This indicates problems with
rasterbeam position queries.


----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! ----

One or more internal checks (see Warnings above) indicate that
queries of rasterbeam position are not properly working for your setup.

This will cause Screen('Flip') to report less accurate/robust timestamps
(VBLTimestamp, StimulusOnsetTime) for stimulus timing. As accurate timestamps are crucial
for
properly timed stimulus presentation and automatic checking of presentation timing, you ma
y experience
an excessive number of skipped frames / wrong presentation deadlines *plus* the built-in c
heck for such
problems doesn't work reliably anymore!


Please try the following measures to solve or work-around the problem:
1. Make sure that your machine is not running other demanding software in parallel and the
n retry.
2. If you use a dual-display setup, please put all displays in mirror-mode with same resol
ution and color depth.
3. If it doesn't help or is not possible, try to change assignment of the primary- and sec
ondary display.
4. On desktops or tower machines with two external display connectors, *PHYSICALLY* swap t
he connections, aka
which display is plugged into which video-out socket at the back-side of your computer.
5. If that doesn't help or is not possible on dual- or multi-display setup, disconnect or
disable all displays except
the one for stimulus presentation to the subject.


If everything fails, please report your problem including all these messages and informati
on on your specific
setup (Type of graphics card and connected displays, output of 'DescribeComputer') to the
Psychtoolbox forum.
-> You may have found a bug in MacOS-X or your graphics-hardware.


(I also found that DescribeComputer doesn't work correctly, due to a problem with MacModelName):

>> DescribeComputer
<CFData 0x35981f0 [0xa07be17c]>{length = 6, capacity = 6, bytes = 0x0016cb8b9256}
MATLAB(1422,0xa000ed58) malloc: *** Deallocation of a pointer not malloced: 0xbfff8370; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
<CFData 0x35981f0 [0xa07be17c]>{length = 6, capacity = 6, bytes = 0x0016cb8b9256}
MATLAB(1422,0xa000ed58) malloc: *** Deallocation of a pointer not malloced: 0xbfff83c0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
??? Error using ==> MacModelName
Wrong byte order in mapping file.

Error in ==> DescribeComputer at 56
thisMacTytpe=MacModelName;





---
Russell A. Poldrack, Ph.d.
Associate Professor
UCLA Department of Psychology
Franz Hall, Box 951563
Los Angeles, CA 90095-1563

phone: 310-794-1224
fax: 310-206-5895


Hi Russ,

You might want to try running matlab from the terminal (ie Apple's
application). Before I made the mistake of installing the security update on
my MacBook Pro, I used matlab extensively in this manner for about a month
without any keyboard lock-ups.

In order to work well with X11 you will need to set the DISPLAY variable. To
do this I put the following code in my .cshrc script:

if (! $?DISPLAY) then
setenv DISPLAY :0.0
endif

Good luck,

-Aaron

**************************************************
Aaron Seitz, Ph.D.
Research Assistant Professor
Department of Psychology
Boston University
64 Cummington St.
Boston, MA 02215

Ph: (617) 353-1104
Fax: (617) 353-6933
Email: aseitz@...
Web: http://people.bu.edu/aseitz/
**************************************************

> From: <psychtoolbox@yahoogroups.com>
> Reply-To: <psychtoolbox@yahoogroups.com>
> Date: 27 May 2006 19:17:36 -0000
> To: <psychtoolbox@yahoogroups.com>
> Subject: [psychtoolbox] Digest Number 1342
>
> There is also a somewhat serious general problem using matlab under
> X11 on intel (which I've not been able to find on any of the
> discussion lists, though I've not dug incredibly deeply). When
> running MATLAB in an xterm or rxvt window under X11, it will
> regularly stop accepting keyboard input, such that one has to kill
> the window altogether. hopefully the upcoming matlab fix will deal
> with this issue.
>
Hi Russ,

could you upgrade to the latest beta and retest? The warnings you've
seen are just warnings, not fatal errors. They tell you that
rasterbeam position queries don't work on your setup and that PTB is
using a less accurate fallback-path. I've improved the code in the
beta so that it differentiates between "beamposition queries not
supported by system" and "beamposition queries supported but not
working properly" on OS-X. In case of missing functionality, it now
silently switches to the fallback code instead of outputting a lot of
scary warnings - There's no point outputting warnings if one can't do
anything to fix them. The same fallback code is always silently used
on M$-Windows, as this system doesn't support beampos queries. In
practice it means that timing noise for reported stimulus onset
timestamps (the return value 'vbl' of vbl=Screen('Flip')) can increase
from reliably less than 100 microseconds on OS-X/PowerPC to something
in the order of multiple 100 microseconds up to occasional spikes of
multiple milliseconds. This only refers to the reported timestamps and
the internal timing checks. *Stimulus onset* will be still synced to
retrace with microsecond accuracy.

It would be sad if beamposition queries would get removed from the
gfx-drivers on Intel-Macs - a step back for OS-X and in the direction
of M$-Windows. But maybe this is just a temporal limitation and the
drivers will improve with future OS-X software updates.

I tried to "fix" MacModelName as well: It should shut up instead of
giving error messages. That's not a real fix, because Apple decided to
change the format of some name mapping files in OS-X 10.4.5 to break
this function. Would need to be rewritten from scratch to get it
working again :(

best,
-mario

--- In psychtoolbox@yahoogroups.com, Russell Poldrack <poldrack@...>
wrote:
>
> I finally had a change to try out the PTB (using the current beta
> version) on my MacBook Pro running MATLAB 7.2. The short story is
> that it doesn't work. The longer story is that anything that calls
> screen seems to end with the flashing red caution screen. below is a
> printout of the output from one of these crashes, in case it's useful
> (I tried several of the various tests and they all failed with the
> same message).
>
> There is also a somewhat serious general problem using matlab under
> X11 on intel (which I've not been able to find on any of the
> discussion lists, though I've not dug incredibly deeply). When
> running MATLAB in an xterm or rxvt window under X11, it will
> regularly stop accepting keyboard input, such that one has to kill
> the window altogether. hopefully the upcoming matlab fix will deal
> with this issue.
>
> cheers,
> russ
>
> >> TestDrawingStuffOSX or TestTextureOSX
>
>
> PTB-INFO: This is the Screen-Prototype for PTB 1.0.7, intended as
> update for Psychtoolbox
> 1.0.6
> PTB-INFO: Implementation details may change in the final release for
> Psychtoolbox 1.0.7 -
> Use at your own Risk!
>
>
>
> OpenGL-Extensions are: GL_ARB_transpose_matrix GL_ARB_vertex_program
> GL_ARB_vertex_blend G
> L_ARB_window_pos GL_ARB_shader_objects GL_ARB_vertex_shader
> GL_EXT_multi_draw_arrays GL_EX
> T_clip_volume_hint GL_EXT_rescale_normal GL_EXT_draw_range_elements
> GL_EXT_fog_coord GL_AP
> PLE_client_storage GL_APPLE_specular_vector GL_APPLE_transform_hint
> GL_APPLE_packed_pixels
> GL_APPLE_fence GL_APPLE_vertex_array_object
> GL_APPLE_vertex_program_evaluators GL_APPLE_e
> lement_array GL_APPLE_flush_render GL_NV_texgen_reflection
> GL_NV_light_max_exponent GL_IBM
> _rasterpos_clip GL_SGIS_generate_mipmap GL_ARB_shading_language_100
> GL_ARB_imaging GL_ARB_
> point_parameters GL_ARB_texture_env_crossbar
> GL_ARB_texture_border_clamp GL_ARB_multitextu
> re GL_ARB_texture_env_add GL_ARB_texture_cube_map
> GL_ARB_texture_env_dot3 GL_ARB_multisamp
> le GL_ARB_texture_env_combine GL_ARB_texture_compression
> GL_ARB_texture_mirrored_repeat GL
> _ARB_shadow GL_ARB_depth_texture GL_ARB_shadow_ambient
> GL_ARB_fragment_program GL_ARB_frag
> ment_shader GL_ARB_occlusion_query GL_ARB_point_sprite
> GL_ARB_vertex_buffer_object GL_ARB_
> pixel_buffer_object GL_EXT_compiled_vertex_array
> GL_EXT_framebuffer_object GL_EXT_texture_
> rectangle GL_ARB_texture_rectangle GL_EXT_texture_env_add
> GL_EXT_blend_color GL_EXT_blend_
> minmax GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr
> GL_EXT_bgra GL_EXT_stenci
> l_wrap GL_EXT_texture_filter_anisotropic
> GL_EXT_separate_specular_color GL_EXT_secondary_c
> olor GL_EXT_blend_func_separate GL_EXT_shadow_funcs
> GL_EXT_texture_compression_s3tc GL_EXT
> _texture_compression_dxt1 GL_EXT_blend_equation_separate
> GL_EXT_texture_mirror_clamp GL_AP
> PLE_ycbcr_422 GL_APPLE_vertex_array_range GL_APPLE_texture_range
> GL_APPLE_float_pixels GL_
> ATI_texture_float GL_APPLE_pixel_buffer GL_NV_blend_square
> GL_NV_fog_distance GL_ATI_textu
> re_mirror_once GL_ATI_text_fragment_shader
> GL_ATI_blend_equation_separate GL_ATI_blend_wei
> ghted_minmax GL_ATI_texture_env_combine3 GL_ATI_separate_stencil
> GL_ATI_texture_compressio
> n_3dc GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGI_color_matrix
>
>
> WARNING: Querying rasterbeam-position doesn't work on your setup!
> (Returns a constant valu
> e)
>
> WARNING: Couldn't determine end-line of vertical blanking interval
> for your display! Troub
> le with beamposition queries?!?
>
>
> PTB-INFO: OpenGL-Renderer is ATI Technologies Inc. :: ATI Radeon
> X1600 OpenGL Engine :: 1.
> 5 ATI-1.4.26
> PTB-INFO: Renderer has 256 MB of VRAM and a maximum 250 MB of texture
> memory.
> PTB-Info: VBL startline = 900 , VBL Endline = -1
> PTB-Info: Measured monitor refresh interval from VBLsync = 16.699048
> ms [59.883654 Hz]. (5
> 0 valid samples taken, stddev=0.047322 ms.)
> PTB-Info: Small deviations between reported values are normal and no
> reason to worry.
> PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT extension for
> efficient high-performance t
> exture mapping...
>
> WARNING: Mismatch between measured monitor refresh intervals! This
> indicates problems with
> rasterbeam position queries.
>
>
> ----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! ----
>
> One or more internal checks (see Warnings above) indicate that
> queries of rasterbeam position are not properly working for your setup.
>
> This will cause Screen('Flip') to report less accurate/robust timestamps
> (VBLTimestamp, StimulusOnsetTime) for stimulus timing. As accurate
> timestamps are crucial
> for
> properly timed stimulus presentation and automatic checking of
> presentation timing, you ma
> y experience
> an excessive number of skipped frames / wrong presentation deadlines
> *plus* the built-in c
> heck for such
> problems doesn't work reliably anymore!
>
>
> Please try the following measures to solve or work-around the problem:
> 1. Make sure that your machine is not running other demanding
> software in parallel and the
> n retry.
> 2. If you use a dual-display setup, please put all displays in mirror-
> mode with same resol
> ution and color depth.
> 3. If it doesn't help or is not possible, try to change assignment of
> the primary- and sec
> ondary display.
> 4. On desktops or tower machines with two external display
> connectors, *PHYSICALLY* swap t
> he connections, aka
> which display is plugged into which video-out socket at the back-
> side of your computer.
> 5. If that doesn't help or is not possible on dual- or multi-display
> setup, disconnect or
> disable all displays except
> the one for stimulus presentation to the subject.
>
>
> If everything fails, please report your problem including all these
> messages and informati
> on on your specific
> setup (Type of graphics card and connected displays, output of
> 'DescribeComputer') to the
> Psychtoolbox forum.
> -> You may have found a bug in MacOS-X or your graphics-hardware.
>
>
> (I also found that DescribeComputer doesn't work correctly, due to a
> problem with MacModelName):
>
> >> DescribeComputer
> <CFData 0x35981f0 [0xa07be17c]>{length = 6, capacity = 6, bytes =
> 0x0016cb8b9256}
> MATLAB(1422,0xa000ed58) malloc: *** Deallocation of a pointer not
> malloced: 0xbfff8370; This could be a double free(), or free() called
> with the middle of an allocated block; Try setting environment
> variable MallocHelp to see tools to help debug
> <CFData 0x35981f0 [0xa07be17c]>{length = 6, capacity = 6, bytes =
> 0x0016cb8b9256}
> MATLAB(1422,0xa000ed58) malloc: *** Deallocation of a pointer not
> malloced: 0xbfff83c0; This could be a double free(), or free() called
> with the middle of an allocated block; Try setting environment
> variable MallocHelp to see tools to help debug
> ??? Error using ==> MacModelName
> Wrong byte order in mapping file.
>
> Error in ==> DescribeComputer at 56
> thisMacTytpe=MacModelName;
>
>
>
>
>
> ---
> Russell A. Poldrack, Ph.d.
> Associate Professor
> UCLA Department of Psychology
> Franz Hall, Box 951563
> Los Angeles, CA 90095-1563
>
> phone: 310-794-1224
> fax: 310-206-5895
> email: poldrack@...
> web: www.poldracklab.org
>
Mario,

I commented the priority ( ) command, and it seems to be working without freezing now.
Thanks! I wonder why the priority command causes matlab to crash.

A side note, I had installed the stand alone update to 10.4.7, but it didn't help.

Thanks,
Feng

-----------
Feng Zhou, Ph.D.
Department of Psychological and Brain Sciences
Johns Hopkins University
Ames 139
3400 N. Charles St
Baltimore, MD 21218
Email: fengzhou@... webpage: http://psy.jhu.edu/~fengzhou
Office phone: 410 516 4030 Cell phone: 617 319 6766
Mario,

Regarding freezing vs. crashing, they had both occurred. However, the good news is that my
program runs fine now, even with the Priority command. So it seems updating both PTB to
beta and installing the stand alone OS 10.4.7 update fixed the problem of Screen function
on Intel Mac.

PTB Beta also seems to have fixed some keyboard and mouse problems with my system. I can
fully run experiments in my Macbook Pro now.

Thanks again!
Feng