[xcrysden] XCrySDen: Build for openSUSE / crash under x86-64 due to a missing rendering context
Tone Kokalj
tone.kokalj at ijs.si
Mon Jan 25 18:31:22 CET 2010
On Tue, 2010-01-19 at 17:28 +0100, Tobias Burnus wrote:
> Hello,
>
> I have build XCrySDen for openSUSE/SLES; feel free to use/link to
> See:
> http://software.opensuse.org/search?baseproject=ALL&p=1&q=xcrysden
>
> Those builds work like a charm under x86(-32, i686)
Excellent!
> but they crash under x86-64, which seems to be a bug in XCrySDen
> (which by chance works under i686): There seems to be no OpenGL
> rendering context when calling C/lightning.c's LoadLights. The crash
> happens for the first call to glLightfv, namely:
>
> /* take care of lights */
> for ( il=0; il<GLPAR_MAXLIGHT; il++) {
> if ( light[il].isenabled ) {
> glLightfv(_LIGHT[il], GL_AMBIENT, light[il].ambient);
>
> The issue can be reproduced when creating a program (cf. below) which
> just contains the call to glLightfv. If I use GLUT to create a
> rendering context before calling glLightfv, it works on x86-64 without
> crashing.
>
> I have been told that calling glLightfv without first creating a
> rendering context is a bug,
Absolutely perfect!
I was not able to get it fixed, because I couldn't figured what caused
the crash, although I knew it was in the first call to glLightfv
function. Hence I merely used various workarounds.
Now, I can make a proper fix to the code. I will also fix other things
that you reported.
Thank you very much !
Regards, Tone
--
Anton Kokalj
J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia
(tel: +386-1-477-3523 // fax:+386-1-477-3822)
Please, if possible, avoid sending me Word or PowerPoint attachments.
See: http://www.gnu.org/philosophy/no-word-attachments.html
More information about the XCrySDen
mailing list