xcb problem when starting new build of freecad

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
axk
Posts: 34
Joined: Fri Jan 24, 2014 9:29 am

xcb problem when starting new build of freecad

Post by axk »

Hi guys, I did a pull and managed to break my freecad with the following error:

Code: Select all

FreeCAD 0.18, Libs: 0.18R13522 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

failed to create drawable
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
freecad: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted
I'm able to build from my linux repo's AUR, but it lacks support for my 3d mouse, so I'm trying to fix my local copy again.
The repo's build runs without issue (other than lack of support for my mouse), so it gives me hope that this is not a catastrophic error.

Freecad.log shows:

Code: Select all

Log: X Error: BadValue (integer parameter out of range for operation) 2
  Major opcode: 53 (X_CreatePixmap)
  Resource id:  0x1e
Log: X Error: GLXBadPbuffer 179
  Extension:    155 (Uknown extension)
  Minor opcode: 28 (Unknown request)
  Resource id:  0x0
Log: This system does not support pbuffers
Any advice on how to resolve the xcb problem?
thanks in advance
gntech
Posts: 56
Joined: Tue May 23, 2017 9:03 am

Re: xcb problem when starting new build of freecad

Post by gntech »

I have the same problem on Ubuntu. This problem is somehow related to DRI3. See https://forums.opensuse.org/showthread. ... ost2861858

A workaround is to either disable DRI3 for all applications by adding the following line to /etc/environment

Code: Select all

LIBGL_DRI3_DISABLE=true
Or to disable DRI3 just for Freecad by launching freecad from the terminal with the following command.

Code: Select all

LIBGL_DRI3_DISABLE=true freecad
(I posted the same reply earlier today in this thread https://forum.freecadweb.org/viewtopic. ... 5&start=20)
axk
Posts: 34
Joined: Fri Jan 24, 2014 9:29 am

Re: xcb problem when starting new build of freecad

Post by axk »

Sincere thanks!! I did not see that earlier thread, sorry about duplication.
I will give the env setting a try.
axk
Posts: 34
Joined: Fri Jan 24, 2014 9:29 am

Re: xcb problem when starting new build of freecad

Post by axk »

While I'm not sure how much of a performance hit I'd take from disabling DRI3, I tried backstepping mesa from 18.0.0 to 17.3.7 and that resolved my issue without resorting to DRI disables.
Thanks for the pointer to the SUSE thread.
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: xcb problem when starting new build of freecad

Post by Chris_G »

Hi,
I had the same problem on Kubuntu 18.04
gntech wrote: Thu Apr 12, 2018 6:04 pm A workaround is to either disable DRI3 for all applications by adding the following line to /etc/environment
...
Or to disable DRI3 just for Freecad by launching freecad from the terminal with the following command.
Thanks for the workaround.
The other workaround that work for me, is to use a KDE plasma Wayland session.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: xcb problem when starting new build of freecad

Post by freecad-heini-1 »

I have the same problem with Xubuntu 18.04.

If I start Freecad with:
LIBGL_DRI3_DISABLE=true
It start, but then my terminal is open and I can't open Freecad from Thunderbird or Thunar.

Any better solution for to solve this problem?
chrisb
Veteran
Posts: 53928
Joined: Tue Mar 17, 2015 9:14 am

Re: xcb problem when starting new build of freecad

Post by chrisb »

You can try to start the program with this environment variable set.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: xcb problem when starting new build of freecad

Post by triplus »

freecad-heini-1 wrote: Wed May 23, 2018 7:59 am Any better solution for to solve this problem?
gntech wrote: Thu Apr 12, 2018 6:04 pm A workaround is to either disable DRI3 for all applications by adding the following line to /etc/environment:

Code: Select all

LIBGL_DRI3_DISABLE=true
That should apply it system wide. For local user you can set it in hidden .profile file inside your home folder.
gntech
Posts: 56
Joined: Tue May 23, 2017 9:03 am

Re: xcb problem when starting new build of freecad

Post by gntech »

freecad-heini-1 wrote: Wed May 23, 2018 7:59 am Any better solution for to solve this problem?
It should also be possible to modify the launcher as @triplus mentioned in another thread some time ago, see: https://forum.freecadweb.org/viewtopic. ... 20#p227288
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: xcb problem when starting new build of freecad

Post by nemesis »

Chris_G wrote: Thu Apr 12, 2018 8:03 pm Thanks for the workaround.
The other workaround that work for me, is to use a KDE plasma Wayland session.
Hi Chris,
How did you enable Wayland with KDE?
I don't find clear informations on wayland / X11 ... I'm on Debian 9.4
Post Reply