void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.16k forks source link

FreeCAD 0.18.3 crashing on wayland #14626

Closed no2spam closed 1 year ago

no2spam commented 5 years ago

System

kwayland-5.62.0_1
kwayland-integration-5.16.5_1
qt5-wayland-5.13.0_4
wayland-1.17.0_1
xorg-server-xwayland-1.20.5_2

Expected behavior

Start FreeCAD -> Create new document (File->New) ->start sketching as it works on X server

Actual behavior

Start FreeCAD -> Create new document (File->New) -> app crashes with the following error:

FreeCAD 0.18.3, Libs: 0.18.3R1_voidlinux

FreeCAD: gl.cpp:2344: const cc_glglue* cc_glglue_instance(int): Assertion `current_ctx && "Must have a current GL context when instantiating cc_glglue!! (Note: if you are using an old Mesa GL version, set the environment variable COIN_GL_NO_CURRENT_CONTEXT_CHECK to get around what may be a Mesa bug.)"' failed.

Steps to reproduce the behavior

Run FreeCAD 0.18 on wayland

yopito commented 5 years ago

As a workaround, does forcing Qt5 to use X11 backend works within the wayland context ?

$ QT_QPA_PLATFORM=xcb /usr/bin/FreeCAD

Others indicate that Coin3D might be the problem. I need a deeper look: https://forum.freecadweb.org/viewtopic.php?t=33359

hobbes1069 commented 5 years ago

Seeing the same thing on Fedora... still searching for a fix.

https://bugzilla.redhat.com/show_bug.cgi?id=1768480

elliotclee commented 4 years ago

One helpful data point is that running as FreeCAD as root seems to make the symptoms disappear. Dunno if there is a permissions issue.

luzpaz commented 4 years ago

Looks like a patch for the issue: https://forum.freecadweb.org/viewtopic.php?t=33359#p354412

foopub commented 2 years ago

Any updates on this? Has anyone tried the patch? I can confirm the same behaviour - launching FreeCAD works fine until I try to create a new empty document or open an existing one. FreeCAD 0.19.2 Revision: 2_voidlinux Void 5.14.16_1 x86_64 AuthenticAMD uptodate rrFFF

foopub commented 2 years ago

I've tested the patch from that website on coin3 package and it seems to work so far. ./xbps-src pkg -j24 coin3 doas xbps-install -fR hostdir/binpkgs/ coin3

I'll be using FreeCAD the next few days and if something seemingly relevant breaks, I'll update. @yopito how do you recon this should be handled?

I don't know what this functionality that's being removed does, but if it's important in general, we can patch it only when a wayland option is passed. Otherwise patch it normally, and add back the functionality with a glx option.

yopito commented 2 years ago

sorry for late reply and thanks for your tests. I don't feel confident enough about it, especially the patch's impact on X11 based system. Let's discuss with upstream's first : see https://github.com/coin3d/coin/issues/451

luzpaz commented 2 years ago

v0.18.x is obsolete.
Ticket should probably be closed.

SammyTheSnake commented 2 years ago

Don't close the issue, the behaviour still continues with the latest versions.

As I understand it, the issue is with Wayland support in the Coin library used for 3d rendering. Coin can be hacked to just not link with GLX, but that's not a plan that works for most users of Coin so it hasn't been implemented.

reference: https://forum.freecadweb.org/viewtopic.php?t=33359

github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

gmelikov commented 1 year ago
OS: Debian GNU/Linux trixie/sid (X-Generic/plasmawayland)
Word size of FreeCAD: 64-bit
Version: 0.20.2.
Build type: Release
Python 3.11.5, Qt 5.15.10, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)

Still reproducible.

Edit: oops, sorry for the noise, I didn't use void-packages for that, so wrong repo to post.

sgn commented 1 year ago

41425