Hi all,
i've run into some issues after package upgrade on my arch linux distribution. My pc is equiped with ati card and i use xf86-video-ati drivers. Output from test.sh with working drivers setup is here http://pastebin.com/rhitZuyT. Now to the problem: recent upgrade caused, that there were no profiles available at all. Here is output from test.sh http://pastebin.com/77wYhfKF and output from java project with all reccomended jogl debug flags http://pastebin.com/Ug8KAViY for wrong configuration. After a little bit of experimenting i found, that this error was caused by upgrade of these packages: ati-dri libgl libglapi to version 8.0.1-2. As i reverted them back to version 7.11-4, everything was back again working as expected. This issue may be probably related to other linux distributions as well. So i hope this will help others with similar errors. In case you will need outputs from other test, i will provide them gladly. Zeno |
Administrator
|
Hi
Someone else wrote a bug report about this problem: https://jogamp.org/bugzilla/show_bug.cgi?id=564 Please add all your logs into this report and thank you very much for your precise investigation. All these details are really useful.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by zeno
On 03/16/2012 04:19 PM, zeno [via jogamp] wrote:
> > > Hi all, > i've run into some issues after package upgrade on my arch linux > distribution. My pc is equiped with ati card and i use xf86-video-ati > drivers. Output from test.sh with working drivers setup is here > http://pastebin.com/rhitZuyT. Now to the problem: recent upgrade caused, > that there were no profiles available at all. Here is output from test.sh > http://pastebin.com/77wYhfKF and output from java project with all > reccomended jogl debug flags http://pastebin.com/Ug8KAViY for wrong > configuration. After a little bit of experimenting i found, that this error > was caused by upgrade of these packages: > *ati-dri * > *libgl * > *libglapi* > to version *8.0.1-2*. > As i reverted them back to version *7.11-4*, everything was back again > working as expected. This issue may be probably related to other linux > distributions as well. So i hope this will help others with similar errors. > In case you will need outputs from other test, i will provide them gladly. I am sorry, but the log file seems to be truncated, ie seems to be not complete. It stops at line 289 (testing GL context 3.2), so the interesting parts seems to be missing (GL profile 2.0,3.0). After you provided a full log, I can take a look at it later. Hopefully this is a generic bug just missing some of our expectations, otherwise I need to setup a machine w/ the drivers. ~Sven signature.asc (910 bytes) Download Attachment |
Hi Sven,
here is a new log http://pastebin.com/TWXfniQv with libgl-8 and its erroneous behaviour, which I believe is not truncated. I don't understand very well to that dumped code, but now it seems to me, that GL 2.0 and 3.0 parts are present. If I should use some different way to post these "bugs", please let me know - I am not very well experienced in such actions. Have a nice day. Zeno |
Administrator
|
On 03/19/2012 10:29 AM, zeno [via jogamp] wrote:
> > > Hi Sven, > here is a new log http://pastebin.com/TWXfniQv with *libgl-8* and its > erroneous behaviour, which I believe is not truncated. I don't understand > very well to that dumped code, but now it seems to me, that GL 2.0 and 3.0 > parts are present. If I should use some different way to post these "bugs", > please let me know - I am not very well experienced in such actions. > Have a nice day. > Zeno > <http://jogamp.org/git/?p=jogl.git;a=commit;h=7a40768455342ab2d1d43bf435baa42a8ccaf917> <https://jogamp.org/bugzilla/show_bug.cgi?id=564> ~Sven signature.asc (910 bytes) Download Attachment |
Hi Sven,
i've tried new builds from repository (namely jogl b705), still the same error. No more test outputs this time, just pathway to solution. Lets start what jogl behaviour is different between mesa versions 7 and 8. While you have mesa 7xx, following lines (from newest sources, added in latest commit) in X11GLXContext.java (lines 342+) results in false: final boolean isProcCreateContextAttribsARBAvailable = isFunctionAvailable("glXCreateContextAttribsARB"); final boolean isExtARBCreateContextAvailable = isExtensionAvailable("GLX_ARB_create_context"); if ( isProcCreateContextAttribsARBAvailable && isExtARBCreateContextAvailable ) contextHandle = createContextARB(share, direct); ... so this if condition is not met. Ok, contextHandle was and still is 0, nothing changed... after a while code continues with old temporary context (line 380 +). From now on, everything is OK with mesa 7xx. Now the difference - after switching to mesa 8xx, the ARB functions are available and (lines 342, 343) results in true, but still (line 346): contextHandle = createContextARB(share, direct); returns 0 and this behaviour leads to both parts of my problem. In GLContextImpl class on line 664 (body of previously mentioned method createContextARB(...)) is a method call: mapGLVersions(device); inside of this method are several calls of createContextARBMapVersionsAvailable(...) functions. Each call of this method resets context states (GLContextImpl.java line 776) so that gl property of X11GLXContext instance becomes null. Ok, some code runs until we are back to X11GLXContext, boolean flag createContextARBTried is set to true and contextHandle is still 0. Code continues as usually with old temporary context. Seems ok, code runs well until makeCurrent is called. Precisely line 470 in class GLContextImpl. There is verification of profiles: getGLDrawable().getGLProfile().verifyEquality(gl.getGLProfile()); where, as I described, gl property is now null -> throws naturally nullpointerexception... This is only one part of my problem. At start, I tried restoring gl property with setGLFunctionAvailability(..) method only, but i found that last internal part of mapGLVersions() method modifies deviceVersionsAvailableSet property of our context instance and this finally causes my mismatch in profiles. So, that's all to the description of my problems, I've continued my research in code and found a solution: Insert following code after line number 370 in X11GLXContext.java, so that gl property null state is prohibited and deviceVersionsAvailableSet are regenerated... But I don't know if this is the best solution... if(this.gl == null) { //clear deviceVersionsAvailableSet, which was set in createContextARB(...) shutdown(); //set back temp context as current if (!glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), temp_ctx)) { throw new GLException("Error making temp context(1) current: display "+toHexString(display)+", context "+toHexString(temp_ctx)+", drawable "+drawable); } //refresh functions etc. setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT); // use GL_VERSION } From this point, everything works on my machine with mesa 8. Please let me know what you think about it. I am really sorry for posting such a long message in this place, I swear I will not do this next time... :) I bet bugzilla is designed for this problems... If you can point me in the right direction, I can offcourse produce some kind of patch or whatever - but i am beginner in this, so please be patient... Still I hope this helps. Zeno |
Administrator
|
On 03/19/2012 11:34 PM, zeno [via jogamp] wrote:
> > > Hi Sven, > i've tried new builds from repository (namely jogl b705), still the same > error. No more test outputs this time, just > pathway to solution. Lets start what jogl behaviour is different between > mesa versions 7 and 8. While you have > *mesa 7xx*, following lines (from newest sources, added in latest commit) in > X11GLXContext.java (lines 342+) > results in false: > > final boolean isProcCreateContextAttribsARBAvailable = > isFunctionAvailable("glXCreateContextAttribsARB"); > final boolean isExtARBCreateContextAvailable = > isExtensionAvailable("GLX_ARB_create_context"); > if ( isProcCreateContextAttribsARBAvailable && > isExtARBCreateContextAvailable ) > contextHandle = createContextARB(share, direct); > ... > so this if condition is not met. Ok, contextHandle was and still is 0, > nothing changed... after a while code > continues with old temporary context (line 380 +). From now on, everything > is *OK* with *mesa 7xx*. > > Now the difference - after switching to *mesa 8xx*, the ARB functions are > available and (lines 342, 343) > results in true, but still (line 346): > > contextHandle = createContextARB(share, direct); > > *returns 0* and this behaviour leads to both parts of my problem. does not have the ARB creation avail, hence it works. (Ubuntu + xorgedgers ppa, 8.0.1+git20120317+8.0.d982036c-0ubuntu0sarvatt~oneiric). The Mesa8* version you use has the method available, but it's buggy (always returns NULL). > In > GLContextImpl class on line 664 (body of > previously mentioned method createContextARB(...)) is a method call: > > mapGLVersions(device); > > inside of this method are several calls of > createContextARBMapVersionsAvailable(...) functions. Each call of > this method* resets context states* (GLContextImpl.java line 776) so that > *gl* property of > X11GLXContext instance becomes null. > Ok, some code runs until we are back to > X11GLXContext, boolean flag > createContextARBTried is set to true and contextHandle is still 0. Code > continues as usually with old temporary > context. Seems ok, code runs well until makeCurrent is called. Precisely > line 470 in class GLContextImpl. > There is verification of profiles: > > getGLDrawable().getGLProfile().verifyEquality(gl.getGLProfile()); > > where, as I described, *gl* property is now null -> throws naturally > nullpointerexception... > This is only one part of my problem. At start, I tried restoring *gl* > property with setGLFunctionAvailability(..) > method only, but i found that last internal part of mapGLVersions() method > modifies *deviceVersionsAvailableSet* property of our context instance and > this *finally* causes my > mismatch in profiles. > > So, that's all to the description of my problems, I've continued my research > in code and found a solution: > Insert following code after line number 370 in X11GLXContext.java, so that > *gl* property null state is > prohibited and deviceVersionsAvailableSet are regenerated... But I don't > know if this is the best solution... > > if(this.gl == null) > { > //clear deviceVersionsAvailableSet, which was set in createContextARB(...) > shutdown(); > > //set back temp context as current > if (!glXMakeContextCurrent(display, drawable.getHandle(), > drawableRead.getHandle(), temp_ctx)) { > throw new GLException("Error making temp context(1) current: display > "+toHexString(display)+", context "+toHexString(temp_ctx)+", drawable > "+drawable); > } > > //refresh functions etc. > setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT); // use > GL_VERSION > } > >>From this point, everything works on my machine with mesa 8. Please let me > know what you think about it. as it was ment to, i.e. only reset the GLContext state and set availability flag if ARB create context actually did find anything. > I am really sorry for posting such a long message in this place, I swear I > will not do this next time... :) I bet bugzilla > is designed for this problems... If you can point me in the right direction, > I can offcourse produce some kind of > patch or whatever - but i am beginner in this, so please be patient... > Still I hope this helps. Of course it helps and don't be sorry, be yourself :) Thanks to this Mesa8* bug, we actually found one bug in our code - good stuff. ~Sven > Zeno signature.asc (910 bytes) Download Attachment |
Administrator
|
In reply to this post by zeno
>
> Lets try to tolerate the buggy ARB createContext behavior > as it was ment to, i.e. only reset the GLContext state and > set availability flag if ARB create context actually did find anything. > <https://jogamp.org/bugzilla/show_bug.cgi?id=564> <http://jogamp.org/git/?p=jogl.git;a=commit;h=42c461a157bbcf9e7268b171a7593c2b3ae6a173> I have tested this while temporarily mimick the broken behavior and it works well here. This patch is less intrusive (not shutdown, ..) and brings stability. Let me know whether this works for you - thx. Jenkins build is on the way <https://jogamp.org/chuck/job/jogl/706/> however, it behaves a bit erratic (networking, etc) lately, so I don't know yet if it will succeed. ~Sven signature.asc (910 bytes) Download Attachment |
Hi,
everything is now OK on my machine (mesa 8 with jogl autobuild 707). Have a nice day. Zeno |
Administrator
|
I'm very happy to learn that it works fine as I have an old machine using Mesa and I feared to switch to Ubuntu 11.10 or Debian. Thank you so much for your precious help, your precise indications and your patience.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |