# OS X: DrawText OpenGL error

**URL:** https://psychtoolbox.discourse.group/t/os-x-drawtext-opengl-error/659
**Category:** Uncategorized
**Created:** [April 26, 2005, 3:30pm UTC](https://psychtoolbox.discourse.group/t/os-x-drawtext-opengl-error/659 "2005-04-26T15:30:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sandhitsu.rm](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandhitsu.rm](https://psychtoolbox.discourse.group/u/sandhitsu.rm)
#### Post date: [April 26, 2005, 3:30pm UTC](https://psychtoolbox.discourse.group/t/os-x-drawtext-opengl-error/659/1 "2005-04-26T15:30:22Z")

</div>

There seems to be a bug in DrawText in the latest release Version 1.0.5.  
My experiment code which used to work now crashes with the following  
message:  
  
INTERNAL PSYCHTOOLBOX ERROR  
 error: Psycherror\_OpenGL  
 general description: OpenGL call returned an error  
 specific description: GL\_INVALID\_ENUM  
 module name: Screen  
 subfunction call: DrawText  
 file name:  
/Development/PsychSourceGL/Source/Common/Screen/SCREENDrawText.c  
 function name: SCREENDrawText  
 line number: 293  
??? (null)  
  
The crashing line of code is:  
  
Screen(window,'DrawText',['Experiment is over -' ' you got '  
num2str(percentcorrect) '% correct' ],10,30,white);  
  
System: Dual G5 PowerMac(MATLAB 7.0) AND G4 Powerbook(MATLAB 7.0.4)  
  
I tried reproducing the bug with a small code segment by just opening a  
screen and trying DrawText - in that case nothing happens ( doesn't draw  
anything but doesn't crash). It was impractical to include the original  
experiment code since it's too long and call several outside functions.  
  
Sandhitsu Das  
University of Pennsylvania
