Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glGenTextures call results in "Bus error"



At a guess - you need to be in a valid OpenGl context at the time - that's 'where' the textures are created. Windows may seem to work, but where do the textures end up?

Regards,

Bruce Wheaton

On Oct 31, 2007, at 9:23 PM, Joseph Toscano wrote:

Hi,

I am writing an OpenGL/GLUT project in pure C, and I've come across a disturbing problem: calling glGenTextures results in the application crashing with "Bus error" being printed to the console. A crash log is also generated by CrashReporter.

In an attempt to isolate the true problem, I created a fresh Xcode project with one single .c file: it contains nothing but a main() entry point, and a simple call to glGenTextures. Unfortunately, the same exact issue persists even in this isolated environment.

I am writing and executing this code on a first-generation MacBook running OS X 10.5. The CPU is an Intel Core Duo, and the graphics processor is an integrated Intel GMA 950 chip.

Bizarrely, this same code runs without any problems on a Windows machine using the latest GLUT libs from Nate Robins' website.

Any help regarding this matter will be greatly appreciated. Below I have cited all relevant information to the problem. Thanks for reading!

Here is the complete code (gentextures.c):
-----------

#include <GLUT/glut.h>

int main(int argc, char *argv[])
{
	GLuint t;
	
	glGenTextures(1, &t);
	return 0;
}

-----------


And here is an excerpt from the crash report: ----------- Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0

Thread 0 Crashed:
0 libGL.dylib 0x95eb7ddb glGenTextures + 27
1 GenTextures 0x00001ff9 main + 31 (gentextures.c:9)
2 GenTextures 0x00001fae start + 54


-----------

--JT
http://zhaymusic.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/bruce% 40spearmorgan.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >glGenTextures call results in "Bus error" (From: Joseph Toscano <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.