Problems with GLUT application
- Subject: Problems with GLUT application
- From: Hannes Krueger <email@hidden>
- Date: Thu, 4 Nov 2004 09:39:27 +0100
- Delivered-to: email@hidden
- Delivered-to: email@hidden
- User-agent: KMail/1.6.2
Hi,
I am recently trying to port an application using GLUT from linux/windows to
Mac OS X. (The applications runs fine on many linux and windows platforms)
For Mac OS X I changed the opengl-related includes to
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
compiling works fine, linking is done with
-framework OpenGL -framework GLUT -framework Foundation
otool -L openGL-test
openGL-test:
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/GLUT.framework/Versions/A/GLUT
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version 300.0.0, current version 462.8.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 63.0.0)
the trace of functions called is like:
glutInit(&argc, argv)
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH)
glutInitWindowSize
glutInitWindowPos
glutCreateWindow
glutDisplayFunc
glutReshapeFunc
... after this the first "real" gl functions are called:
glPixelStorei(GL_PACK_ALIGNMENT,1)
glDepthFunc(GL_LESS)
When running the program it crashes at the first gl-call.
(glPixelStorei, or when commented out glPixelStorei at glDepthFunc....)
Does anybody have an idea what the problem could be?
best regards
Hannes
The crash-log:
Date/Time: 2004-11-03 16:51:05 -0700
OS Version: 10.3.5 (Build 7M34)
Report Version: 2
Command: opengligcexplorer-test1
Path: ./opengligcexplorer-test1
Version: ??? (???)
PID: 328
Thread: 0
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000a40
Thread 0 Crashed:
0 libGL.dylib 0x90c371d8 glPixelStorei + 0x30
1 opengligcexplorer-test1 0x00008ce4 InitGL(int, int) + 0xf0
(GLexplorer.cpp:1991)
2 opengligcexplorer-test1 0x0000f204 setinitpos() + 0x143c
(GLexplorer.cpp:3563)
3 opengligcexplorer-test1 0x00011b08 main + 0x28e8
(GLexplorer.cpp:4381)
4 opengligcexplorer-test1 0x00002a30 _start + 0x17c (crt.c:267)
5 opengligcexplorer-test1 0x000028b0 start + 0x30
PPC Thread State:
srr0: 0x90c371d8 srr1: 0x0000f030 vrsave: 0x00000000
cr: 0x84000222 xer: 0x00000000 lr: 0x90c371b0 ctr: 0x90c371a8
r0: 0x00008ce4 r1: 0xbffff9e0 r2: 0x00000000 r3: 0x00000d05
r4: 0x00000001 r5: 0xbffffa28 r6: 0x9012070c r7: 0x9012070c
r8: 0x9011e9b0 r9: 0xbffff9c0 r10: 0x9005070c r11: 0x000b7dac
r12: 0x90c371a8 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
r24: 0x00000000 r25: 0x00000000 r26: 0xbffffe00 r27: 0xa0c30004
r28: 0x00000d05 r29: 0x00000001 r30: 0xbffff9e0 r31: 0x90c371b0
Binary Images Description:
0x1000 - 0xb5fff opengligcexplorer-test1
./opengligcexplorer-test1
0x2de000 - 0x2eefff com.apple.iokit.IOHIDLib
1.3.4 /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/
IOHIDLib.plugin/Contents/MacOS/IOHIDLib
0x87520000 - 0x87560fff com.apple.glut 3.2.7
(GLUT-3.2.7) /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT
0x8fe00000 - 0x8fe4ffff dyld /usr/lib/dyld
0x90000000 - 0x90122fff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x90190000 - 0x9023dfff com.apple.CoreFoundation 6.3.5
(299.32) /System/Library/Frameworks/CoreFoundation.framework/Versions/
A/CoreFoundation
0x90280000 - 0x904f9fff com.apple.CoreServices.CarbonCore
10.3.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90570000 - 0x905dffff com.apple.framework.IOKit 1.3.5
(???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90610000 - 0x9069afff com.apple.CoreServices.OSServices
3.0.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/OSServices.framework/Versions/A/OSServices
0x90700000 - 0x90700fff com.apple.CoreServices 10.3
(???) /System/Library/Frameworks/CoreServices.framework/Versions/A/
CoreServices
0x90720000 - 0x90787fff com.apple.audio.CoreAudio
2.1.2 /System/Library/Frameworks/CoreAudio.framework/Versions/A/
CoreAudio
0x907f0000 - 0x907f9fff com.apple.DiskArbitration
2.0.3 /System/Library/PrivateFrameworks/DiskArbitration.framework/
Versions/A/DiskArbitration
0x90810000 - 0x90810fff com.apple.ApplicationServices 1.0
(???) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/ApplicationServices
0x90830000 - 0x9089ffff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90910000 - 0x90983fff com.apple.DesktopServices
1.2.2 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/
Versions/A/DesktopServicesPriv
0x909f0000 - 0x90b4bfff com.apple.Foundation 6.3.5
(500.56) /System/Library/Frameworks/Foundation.framework/Versions/C/
Foundation
0x90c30000 - 0x90c4afff libGL.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGL.dylib
0x90c60000 - 0x90cc2fff libGLU.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGLU.dylib
0x90d00000 - 0x90d1bfff com.apple.SystemConfiguration 1.7.1
(???) /System/Library/Frameworks/SystemConfiguration.framework/
Versions/A/SystemConfiguration
0x90d60000 - 0x90d6bfff com.apple.opengl
1.3.3 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x90ec0000 - 0x90ec0fff com.apple.Cocoa 6.3
(???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x910b0000 - 0x91101fff com.apple.bom 1.2.5
(63.2) /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x912a0000 - 0x912bdfff com.apple.audio.SoundManager
3.8 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/
CarbonSound.framework/Versions/A/CarbonSound
0x912e0000 - 0x912f7fff com.apple.LangAnalysis
1.5.4 /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x91320000 - 0x913defff ColorSync
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/ColorSync.framework/Versions/A/ColorSync
0x91460000 - 0x91473fff com.apple.speech.synthesis.framework
3.2 /System/Library/Frameworks/ApplicationServices.framework/Versions/
A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x91560000 - 0x91619fff com.apple.QD 3.4.65
(???) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91670000 - 0x916a8fff com.apple.AE
1.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/
A/Frameworks/AE.framework/Versions/A/AE
0x916e0000 - 0x91773fff com.apple.print.framework.PrintCore
3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/
A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x917e0000 - 0x917f0fff com.apple.speech.recognition.framework
3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/
SpeechRecognition.framework/Versions/A/SpeechRecognition
0x91a90000 - 0x91a90fff com.apple.audio.units.AudioUnit
1.3.2 /System/Library/Frameworks/AudioUnit.framework/Versions/A/
AudioUnit
0x91ab0000 - 0x91ac4fff libCGATS.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x91ae0000 - 0x91aebfff libCSync.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x91b10000 - 0x91b2afff libPDFRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/CoreGraphics.framework/Versions/A/Resources/
libPDFRIP.A.dylib
0x91b50000 - 0x91b5ffff libPSRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/CoreGraphics.framework/Versions/A/Resources/libPSRIP.A.dylib
0x91b80000 - 0x91b93fff libRIP.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x92070000 - 0x92096fff com.apple.FindByContent 1.4
(1.2) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x920c0000 - 0x922a7fff com.apple.security 2.3
(176) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x92430000 - 0x92468fff com.apple.LaunchServices 10.3.5
(98.4) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/LaunchServices.framework/Versions/A/
LaunchServices
0x92740000 - 0x92777fff com.apple.CFNetwork 1.2.1
(7) /System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x927d0000 - 0x92b54fff com.apple.HIToolbox 1.3.4
(???) /System/Library/Frameworks/Carbon.framework/Versions/A/
Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x92d30000 - 0x92d80fff com.apple.HIServices 1.4.1
(0.0.1d1) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x92dc0000 - 0x932befff com.apple.AppKit 6.3.4
(743.24) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x935d0000 - 0x938a8fff com.apple.CoreGraphics 1.203.26
(???) /System/Library/Frameworks/ApplicationServices.framework/
Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x939a0000 - 0x939b4fff libcups.2.dylib /usr/lib/libcups.2.dylib
0x939d0000 - 0x939d4fff libmathCommon.A.dylib
/usr/lib/system/libmathCommon.A.dylib
0x93b50000 - 0x93bf3fff com.apple.audio.toolbox.AudioToolbox
1.3.2 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/
AudioToolbox
0x94060000 - 0x94078fff com.apple.WebServices 1.1.1
(1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x945b0000 - 0x945b9fff libz.1.dylib /usr/lib/libz.1.dylib
0x94610000 - 0x9462afff libresolv.9.dylib /usr/lib/libresolv.9.dylib
0x94650000 - 0x946affff com.apple.SearchKit
1.0.2 /System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/SearchKit.framework/Versions/A/SearchKit
0x94a30000 - 0x94af5fff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x968d0000 - 0x969b2fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x96a20000 - 0x96ae2fff libcrypto.0.9.7.dylib
/usr/lib/libcrypto.0.9.7.dylib
0x96b40000 - 0x96b6efff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
0x96bf0000 - 0x96c7ffff ATS
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/ATS.framework/Versions/A/ATS
0x96cb0000 - 0x96d9efff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x97510000 - 0x97518fff libbsm.dylib /usr/lib/libbsm.dylib
_______________________________________________
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
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.