Sigsegv in AGL, but not GLUT

Wheatie
Unregistered
 
Post: #1
Is there any reason why code that renders a model just fine in a GLUT application running on Mac OS X would crash in a fullscreen AGL application with a Sigsegv (11) error? I'm pretty sure the AGL setup code works because another application built with the same base code doesn't crash. Please help.

David Blyth
Wheatie000@aol.com
Quote this message in a reply
Jeff Binder
Unregistered
 
Post: #2
We'd need to see the code in order to help you. It would also be helpful if you could use a debugger to see where the crash happens.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
SigSegV (segmentation violation) is usually caused by dereferencing a NULL pointer.

In the specific case of OpenGL, this can be caused by not having an OpenGL context when you call an OpenGL function.

Run your program with the debugger and post a stack trace...
Quote this message in a reply
Wheatie
Unregistered
 
Post: #4
I'll be willing to send the Project Builder project and sources to anyone who thinks they can help, and I'd gladly post any information from the debugger, except for the fact that I don't exactly know how to do that...

David Blyth
Wheatie000@aol.com
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
Make sure you have debugging symbols turned on. If you haven't changed your project settings, you shouldn't need to do anything.

Run your program with the debugger (spray can icon), when it crashes click on the "Console" tab, type "bt" in the tiny little pane that appears at the top of the window, hit return, send us what it prints.

Alternatively, open /Applications/Utilities/Console.app and turn on crash reporting in the prefs. Run your application, and copy the text from the Console window that appears when it crashes.
Quote this message in a reply
Wheatie
Unregistered
 
Post: #6
Here is the output from Console.app:

Date/Time: 2002-08-02 11:09:27 -0700
Quote this message in a reply
Wheatie
Unregistered
 
Post: #7
I believe my last post was too long since only the first two lines of it showed up...I'll try emailing it to OneSadCookie and Jeff Binder...

David Blyth
Wheatie000@aol.com
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
I got the email, the stack trace doesn't seem very helpful. I'd guess that this isn't in fact related to OpenGL at all, though, since it wasn't an OpenGL call that crashed.

If you run the program in the debugger, it should hilight the line that's crashed in red for you, and you should be able to look at the values of your variables. Look for a pointer that's NULL where it shouldn't be.
Quote this message in a reply
Wheatie
Unregistered
 
Post: #9
I've tried running it in the debugger, but what happens is that the screen stays dark and I can't get back to Project Builder. OneSadCookie, I'll send you the project as soon as I get a chance. Thanks...

David Blyth
Wheatie000@aol.com
Quote this message in a reply
Wheatie
Unregistered
 
Post: #10
In an attempt to breath life back into this thread and to say that I still haven't solved the problem, anyone who has thinks that they can solve this problem is welcome to email me and I will attach the latest version of the crashing application (that now runs in a window so that debugging is possible) and source code. Thanks.

David Blyth
Wheatie000@aol.com
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Help tracking down SIGBUS/SIGSEGV errors, please? Jones 16 5,390 Jul 29, 2006 07:18 PM
Last Post: Jones