Reply to topic  [ 7 posts ] 
opengl and mac osx 10.7 (lion) 
Author Message

Joined: Fri Sep 02, 2005 6:42 am
Posts: 15
Location: Institut d'Astrophysique, Paris
Post opengl and mac osx 10.7 (lion)
Hello,
I would like to know if anyone is using yorick's successfully opengl capabilities on mac os 10.7?

For me the following
eve:(~/soft/yorick-gl-1.1)> yorick
Sat Jul 21 22:38:43 CEST 2012
Yeti 6.2.4 ready. Copyright (c) 1996-2007, Eric THIEBAUT.
Copyright (c) 2005. The Regents of the University of California.
All rights reserved. Yorick 2.1.04x ready. For help type 'help'
> include,"testgl.i"

freezes (a problem I did not have on osx 10.6)

Regards

Christophe


Sat Jul 21, 2012 12:44 pm
Profile
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: opengl and mac osx 10.7 (lion)
I confirm this problem. I haven't had a chance to debug it. :et me know if you make any progress.

The was an OpenGL problem on 10.4 or maybe early 10.5, which caused to enitre Mac OS X to crash (or its desktop to freeze, which is the same thing) whenever yorickgl created an OpenGL window. We tracked that into the innards of the apple opengl library, some kind of bug, but I can't remember if there was a workaround, or if it just began to work again in a later version of MacOS. The question is, does *any* GLX program work on 10.7? If so, what does it do differently than yorick to create a window.


Sat Jul 21, 2012 6:53 pm
Profile

Joined: Fri Sep 02, 2005 6:42 am
Posts: 15
Location: Institut d'Astrophysique, Paris
Post Re: opengl and mac osx 10.7 (lion)
I have tried installing xquartz 2.7.2 and recompiling yorick-gl: no success.
glxgear works though and so do other opengl programs.

I have written quite a few lines of code which rely on yorick-gl (which I like very much) :cry:


Tue Jul 24, 2012 1:00 pm
Profile
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: opengl and mac osx 10.7 (lion)
I attach a very old yorick source, which includes an OpenGL test program in opengl/test3d.c. This program strips out all the yorick baggage and simply creates an OpenGL window using exactly the same calls to X11 and GLX that yorick uses. (Actually, the startup has evolved slightly, but not too much.) Hopefully, test3d.c will crash in the same way yorick-gl does, but give you something much easier to debug. You can compare the test3d.c source code to the source code for glxgears. If you can build glxgears from source and make it work, but you can't build test3d.c from source and make it work, you ought to be able to step through line by line (really X11/GLX call by call) to see what glxgears does differently than test3d.c.

If you can find out what makes test3d.c fail, and find a workaround, we will have a starting place to make yorick work. If you can't make test3d.c work, you certainly aren't going to make yorick-gl work. If test3d does work, then we can concentrate on the slight changes between that and the modern yorick opengl piece. i still suspect this is a bug in the mac OpenGL, but maybe there is an acceptable workaround...


Attachments:
File comment: Pre-sourceforge yorick source
yorick-2.1.01.tgz [1.92 MiB]
Downloaded 234 times
Tue Jul 24, 2012 2:15 pm
Profile

Joined: Fri Sep 02, 2005 6:42 am
Posts: 15
Location: Institut d'Astrophysique, Paris
Post Re: opengl and mac osx 10.7 (lion)
It seems the problem has disappeared in os-x 10.7.5.


Sun Mar 17, 2013 12:26 pm
Profile
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: opengl and mac osx 10.7 (lion)
yorick-gl still crashes the Xserver on 10.7.5 for me.

I did make a major source change to yorick-gl (24/Sep/2012) which fixed similar problems on Mac OS X. The problem was that a bug in the Mac libGL causes a zero divide when you issued the "clear buffer" GL command (!?). Since yorick is the only program (at least the only one in Debian or FreeBSD) which unmasks SIGFPE, it is the only program which crashes as a result of this bug. The OpenGL standard explicitly permits this behavior (that is, OpenGL is permitted to generate SIGFPE whenever it chooses), so it isn't likely to ever be fixed. Therefore, I changed the yorick-gl source to re-mask SIGFPE before every GL call, then unmask it when the GL call returns. This did fix the problem on the Mac OS X 10.7 at the time I did the work. Perhaps that is why it began working for you.

However, another problem has randomly appeared, presumably as a side effect of some system update. The problem is not a zero divide now. I haven't been able to figure out what happens, but the Xserver crashes when the X window that is the GL drawing surface is exposed. All X programs lock up, but you can still force quit the Xserver.


Fri Mar 22, 2013 4:26 pm
Profile
Yorick Master

Joined: Tue Mar 07, 2006 10:31 pm
Posts: 125
Location: Meudon, France
Post Re: opengl and mac osx 10.7 (lion)
By the way, I also had to remask SIGFPE to be able to open a GTK 3 window from a yorick plug-in...


Mon Apr 08, 2013 11:45 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.