Re: [Plib-users] Re: flightgear problem
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2001-09-01 11:22:59
|
Stephen Lewis wrote: > > Gentlemen, > I have joined this list because I have the "flightgear" problem. > I have just read a weeks worth of discussion concerning the > "ssgInit called without a valid OpenGL context". I tried to compile > FlighGear 0.7.8 on a PowerPC running YellowDogLinux 2.0. > Although based on RH 7 there is no MMX and the compiler is 2.95.3 That's interesting new information. Which OpenGL version do you have? > There has been much speculation and not much science in this discussion. Well, there has been science to the extent that I personally can provide science. The facts I have to date are: * glXGetCurrentContext is returning NULL * ...which is *SUPPOSED* to mean that there isn't a valid OpenGL rendering context. * But we demonstrably *DO* have a rendering context at that point because we can comment out the glXGetCurrentContext and the program runs correctly. * The exact same sequence of instructions when run on other OpenGL implementations (eg nVidia's) and/or other windowing systems (eg Windoze) and/or different C++ compilers (eg 2.95.2) *DOES* result in a valid result from glXGetCurrentContext. * This same problem shows up in other OpenGL programs that test glXGetCurrentContext...not just PLIB programs. * Up until today, every instance of the problem had been on systems running Mesa under RH 7.x or Mandrake 8.x. I've never heard of such a system that worked - or of any other system that didn't work. So, what are we to deduce from these facts? I'm inclined to believe therefore that this is some kind of an underlying bug in the windowing system or OpenGL implementation...probably the latter... caused by *something* unique to RH implementations (and other systems that share something with it). I'm currently working under the presumption that the "known-to-be-dubious" C++ compiler (GCC 2.96/2.97) is mis-compiling Mesa in some subtle manner that causes glXGetCurrentContext to fail. That theory seems to fit the facts better than anything else that's been suggested - but it's certainly not proven. The scientific method says that the next thing to do is a controlled experiment to test predictions made by this theory. But since I run SuSE and have only an nVidia graphics card, I don't see the problem, I can't easily/cheaply do that. Since this is plainly not a problem with anything I've written, it's really not my problem to solve. The issue belongs (IMHO) in the Mesa mailing list... however, I'm subscribed to that list and so far I don't recollect anyone complaining there. In the realm of OpenSource software, if you don't tell the right person the right problem, it won't ever get fixed. (Although it may just "go away" of it's own accord - as I suspect this will). So - that was before seeing your email. Now we see another RedHat 7 derivitive with the problem - but NOT with the 2.96/2.97 compiler. That's interesting - and probably deflates my "broken compiler" theory...although not entirely since most non-RH x86 users are on 2.95.2 and you are using 2.95.3 - and on a different CPU architecture. What other things might be common between these broken systems? What Xfree version are you all running? Is anyone else running that version with the same version of Mesa and NOT seeing the problem? > I compiled the plib_examples and get the same message from > examples/src/ssg/tux/tux_example and examples/src/ssg/viewer/viewer > Further investigation indicates that *after* calling 'glutCreateWindow' > there is no valid OpenGL context according to 'ssgInit'. How does > ssgInit > determine this? It calls 'glXGetCurrentContext' which returns NULL even > though 'glutCreateWindow' thinks it has created a valid context.. > Thus the root of the problem is an incompatibility between: > 'glutCreateWindow' and 'glXGetCurrentContext'. Actually, you can get the same bug using 'freeglut' and in PPE which doesn't use GLUT at all. Hence it's not glutCreateWindow itself but whatever underlying X11 call is common to FLTK and GLUT/freeglut... XCreateWindow being the most likely candidate. > 'ssgInit' doesn't > have much to do with it except that it generates the error message. Indeed. Which is why this is the wrong mailing list to report the problem to. > It is easier to debug a small program with these two calls than > to begin with FlightGear... Yes - something like that would be useful. Unfortunately, I can't write that program because I don't have a system that exhibits the bug. > Now my question, to which groups should this information be directed? I suggest the Mesa mailing list. You can find info on how to subscribe on www.mesa3d.org. I'd greatly appreciate it if you would first write that 10 line test program so that the problem can be expressed in a manner that won't result in it being immediately reflected back onto this list as a PLIB problem. > Platform Macintosh G4 Cube and YellowDogLinux 2.0 > OpenGL 1.2, Mesa 3.4 and GLUT 3.7 What 3D hardware do you have? ----------------------------- Steve Baker ------------------------------- HomeMail : <sjb...@ai...> WorkMail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sf.net http://tuxaqfh.sf.net http://prettypoly.sf.net http://tuxkart.sf.net http://freeglut.sf.net http://toobular.sf.net |