xcb problem when starting new build of freecad

Having trouble installing or compiling FreeCAD? Get help here.
axk
Posts: 31
Joined: Fri Jan 24, 2014 9:29 am

xcb problem when starting new build of freecad

Postby axk » Thu Apr 12, 2018 5:37 pm

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: 49
Joined: Tue May 23, 2017 9:03 am

Re: xcb problem when starting new build of freecad

Postby gntech » Thu Apr 12, 2018 6:04 pm

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: 31
Joined: Fri Jan 24, 2014 9:29 am

Re: xcb problem when starting new build of freecad

Postby axk » Thu Apr 12, 2018 6:48 pm

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

Re: xcb problem when starting new build of freecad

Postby axk » Thu Apr 12, 2018 7:07 pm

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
Posts: 1034
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: xcb problem when starting new build of freecad

Postby Chris_G » Thu Apr 12, 2018 8:03 pm

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
Posts: 5526
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: xcb problem when starting new build of freecad

Postby freecad-heini-1 » Wed May 23, 2018 7:59 am

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
Posts: 16346
Joined: Tue Mar 17, 2015 9:14 am

Re: xcb problem when starting new build of freecad

Postby chrisb » Wed May 23, 2018 8:35 am

You can try to start your browser with this environment variable set.
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: xcb problem when starting new build of freecad

Postby triplus » Wed May 23, 2018 9:51 am

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: 49
Joined: Tue May 23, 2017 9:03 am

Re: xcb problem when starting new build of freecad

Postby gntech » Fri May 25, 2018 5:47 pm

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: 342
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: xcb problem when starting new build of freecad

Postby nemesis » Mon Jul 09, 2018 2:49 pm

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