bugGnome Chemistry Utils - Bugs: bug #47169, gchem3d 0.14.10 BadValue error in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #47169: gchem3d 0.14.10 BadValue error in glXCreateContext()

Submitted by:  Toni Andjelkovic <andjelkovic>
Submitted on:  Tue 16 Feb 2016 01:27:38 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Jean Bréfort <jean_brefort>
Open/Closed: Closed

Wed 17 Feb 2016 08:45:31 AM UTC, comment #3:

Fixed both branches. I'll release as soon as possible (need to finish support for reaction export to .cdx first).

Jean Bréfort <jean_brefort>
Project AdministratorIn charge of this item.
Wed 17 Feb 2016 08:23:35 AM UTC, comment #2:

This patch should fix your issue, but might make gcrystal and gchem3d crash for people using older libraries.

(file #36359)

Jean Bréfort <jean_brefort>
Project AdministratorIn charge of this item.
Tue 16 Feb 2016 04:15:41 PM UTC, comment #1:

Known issue, fixed in trunk (see revision 1940). For some obscure reason, the patch was not applied to stable. Will be in next release (as soon as possible).
The issue is that the documentation says that direct rendering to in memory buffers is not possible, but it seems that with recent libraries, it does work while indirect does not work anymore. I added a gconf entry so that the property can be tweaked when needed.

Jean Bréfort <jean_brefort>
Project AdministratorIn charge of this item.
Tue 16 Feb 2016 01:27:38 PM UTC, original submission:

The latest RPM version of gchem3d on Fedora 23 (gchem3d-0.14.10-11) fails on "Print Preview" and "Save As Image".

How to reproduce: start gchem3d, Tools → Import molecule → C=CCS(=O)SCC=C (the molecule appears); File → Print Preview (the error appears):

(gchem3d-0.14:2974): Gdk-ERROR **: The program 'gchem3d-0.14' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 9346 error_code 2 request_code 153 (GLX) minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

You may skip importing a molecule (just print preview the empty GL window).

I don't know if the problem is with gchem3d or mesa (intel i915 graphics driver), but the wrong GL visual gets chosen, resulting in a BadValue error in glXCreateContext(). The following patch seems to fix it:

--- libs/gcugtk/glview.cc.bak 2016-02-14 15:11:30.367131600 +0100
+++ libs/gcugtk/glview.cc 2016-02-14 15:11:36.749116017 +0100
@@ -317,7 +317,7 @@
GdkWindow *window = (m_Window)? m_Window: gdk_get_default_root_window ();
XVisualInfo xvi = glXChooseVisual (GDK_WINDOW_XDISPLAY (window), gdk_screen_get_number (gdk_window_get_screen (window)), const_cast < int > (attr_list));
Pixmap pixmap = XCreatePixmap (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window), width, height, xvi->depth);
- GLXContext ctxt = glXCreateContext (GDK_WINDOW_XDISPLAY (window), xvi, NULL, false);
+ GLXContext ctxt = glXCreateContext (GDK_WINDOW_XDISPLAY (window), xvi, NULL, true);
GLXPixmap glxp = glXCreateGLXPixmap (GDK_WINDOW_XDISPLAY (window), xvi, pixmap);
// draw
if (glXMakeCurrent (GDK_WINDOW_XDISPLAY (window), glxp, ctxt)) {

Toni Andjelkovic <andjelkovic>

 

Attached Files
file #36359:  47169.patch added by jean_brefort (889B - text/x-patch - Quck patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by andjelkovic (Submitted the item)
  • -unavailable- added by andjelkovic
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 Mar 2016 09:11:26 AM UTCjean_brefortOpen/ClosedOpen=>Closed
    Wed 17 Feb 2016 08:45:31 AM UTCjean_brefortStatusNone=>Fixed
      Assigned toNone=>jean_brefort
    Wed 17 Feb 2016 08:23:35 AM UTCjean_brefortAttached File-=>Added 47169.patch, #36359
    Tue 16 Feb 2016 01:27:38 PM UTCandjelkovicCarbon-Copy-=>Added julian sikorski

    Back to the top


    Powered by Savane 3.1-cleanup1