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: Where is the Mac OS X glut lib dir?



This crash is most likely simply because the application is trying to use the system OpenGL and system GLUT when in fact it should be using X11 dylibs. When Greg originally asked about linking to the OpenGL and GLUT libraries, the info we listed was how to link to the system frameworks – not how to go through X11's server. Really, I think the best solution is to avoid X11 altogether cause it would make it easier for all end users to use the software, and the code in question already supports a non-X11 GLUT path. That's my 2 cents at least.

Chris

On Apr 29, 2005, at 4:08 PM, E. Wing wrote:


Sorry, I still don't know how to make much sense out of these crash
reports. Somebody else might be able to decipher it for you. (And I
would be interesting in hearing the translation process.)

I do have a couple of comments based on what you are saying though.
First, I probably should mention that GLUT is written on top of Cocoa
in OS X. So your compilation line might look like
gcc testprog.c -framework GLUT -framework OpenGL -framework Cocoa

The -lobjc is implicitly added by Cocoa for you. But since you managed
to get it to compile, this is probably not the issue. (Though you
might try it just to rule it out.)

Second, Cocoa accesses OS X's native windowing system, not X11. You
can launch a Cocoa application from the X11 terminal window, but it
will not necessarily be an X11 app.

If your code base has native X11 drawing functions, it probably will
not mix well with Cocoa. But the reason to use GLUT is so you don't
have to use any native windowing system calls (be it X11 or Cocoa).
But I don't know what's in your code base.

Finally, I would recommend you try running your program through a
debugger and see where the crash is occuring. Many times these crashes
are bugs in your application. Sometimes other platforms don't catch
bugs. I've had many instances where code worked fine on 2 or 3
platforms, but crashes on others because of subtle memory bugs in my
own code which didn't seem to bother certain systems.  Or it could be
a branched code path within your library that just wasn't supposed to
be hit on OS X (like an X11 call).

Once you identify the offending block of code, people might be able to
help you better.

-Eric


On 4/29/05, Greg Coats <email@hidden> wrote:


Thanks for your message. Here is the entire crash report. It says
"Backtrace not available". Why not? This GeoJasPer open source code
works fine under several versions of Unix, and Microsoft Windows.
Unfortunately, it produces a segmentation fault under Mac OS X. Any
comments would be greatly appreciated. The program is simply trying to
display a TIFF or JPEG2000 image in an X11 window.
Greg Coats


Date/Time:      2005-04-29 12:08:04 -0400
OS Version:     10.3.7 (Build 7S215)
Report Version: 2

Command: jiv
Path:    ./jiv
Version: ??? (???)
PID:     722
Thread:  Unknown

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x432fff94

Backtrace not available

PPC Thread State:
srr0: 0x00005da8 srr1: 0x0200f030 vrsave: 0x00000000
cr: 0x82008242 xer: 0x00000000 lr: 0x00005d64 ctr: 0x90008840
r0: 0x00000000 r1: 0x43300000 r2: 0x02892700 r3: 0x00000000
r4: 0x00000000 r5: 0x00000008 r6: 0x00000047 r7: 0x9011884c
r8: 0x00000003 r9: 0x028926fc r10: 0x00000003 r11: 0x800000ff
r12: 0x90008840 r13: 0x00000001 r14: 0x00008040 r15: 0x00000140
r16: 0x00000140 r17: 0xbffffba0 r18: 0xbffffb90 r19: 0x00000000
r20: 0x00601e70 r21: 0x0000003c r22: 0x006606d0 r23: 0xbfff7a90
r24: 0x00000000 r25: 0xc0007a50 r26: 0x00000140 r27: 0x00000003
r28: 0x00000140 r29: 0xbfff98a0 r30: 0x0065b5c8 r31: 0x0000595c



_______________________________________________ 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: 
 >Re: Where is the Mac OS X glut include dir, and the glut lib dir? (From: "E. Wing" <email@hidden>)
 >Where is the Mac OS X glut lib dir? (From: Greg Coats <email@hidden>)
 >Re: Where is the Mac OS X glut lib dir? (From: "E. Wing" <email@hidden>)
 >Re: Where is the Mac OS X glut lib dir? (From: Greg Coats <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.