realthunder / FreeCAD

Link branch FreeCAD
Other
790 stars 45 forks source link

[Problem] FreeCAD crash opening a document in a wayland session #1031

Open wsteffe opened 2 months ago

wsteffe commented 2 months ago

Is there an existing issue for this?

Version

0.21 (Development)

Full version info

OS: Ubuntu 24.04.1 LTS (GNOME/gnome-wayland)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.41237 (Git)
Build type: Release
Branch: LinkMerge
Hash: b7598ee18e7718ac8e4390cd269f7295bddfb73a
Python 3.12.3, Qt 5.15.13, Coin 4.0.2, Vtk 9.1.0, OCC 7.7.0
Locale: English/United States (en_US)
Installed mods: 
  * asm3 0.12.0
  * Assembly4 0.50.2


### Subproject(s) affected?

None

### Problem description

Fllowing lines are written in the bash console ater having opened a FC document in a wayland session. The first lines are related to the other problem (Syntax error) reported in a previous post. Only last lines are relevant to the present issue:

/usr/local/Ext/freecad/fc_cadquery/selectors.py:178: SyntaxWarning: invalid escape sequence '\|'
  """
/usr/local/Ext/freecad/fc_cadquery/selectors.py:556: SyntaxWarning: invalid escape sequence '\|'
  """
/usr/local/Ext/freecad/fc_cadquery/selectors.py:608: SyntaxWarning: invalid escape sequence '\|'
  """
QSocketNotifier: Can only be used with threads started with QThread
QOpenGLFunctions created with non-current context
Loading Assembly workbench...
/usr/local/Mod/Start/StartPage/StartPage.py:189: SyntaxWarning: invalid escape sequence '\/'
  _Re_Pattern = "<Property name=\"{}\".*?String value=\"(.*?)\"\/>"

(qt.qpa.wayland) Wayland does not support QWindow::requestActivate()
FreeCAD: ./src/glue/gl.cpp:2234: 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.

### Anything else?

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
wsteffe commented 2 months ago

Thii crash affect only my last build I have done after upgrading my platform to ubuntu 24.04. The snap version:

OS: Ubuntu Core 22 (GNOME/gnome-wayland)
Word size of FreeCAD: 64-bit
Version: 2024.409.0.38991 (Git) Snap 132
Build type: Release
Branch: tag: 20240407stable
Hash: 973e4821bcd19a5a1af9ae3e1d2ed961aad0a8ab
Python 3.10.12, Qt 5.15.10, Coin 4.0.1rt, Vtk 7.1.1, OCC 7.7.2
Locale: English/United States (en_US)

works well also in a wayland session of ubuntu 24.04.

If I remeber well also my previous build done in ubuntu 22.04 worked in a wayland session. I can't understand what changed in the last build.

wsteffe commented 2 months ago

I have just seen that this problem was already dealt at https://github.com/void-linux/void-packages/issues/41425. The solution of executing "QT_QPA_PLATFORM=xcb FreeCAD" instead of simple "FreeCAD" worked also for me. But would it possible to insert this option inside the FreeCAD code instead of having to put it in the command line ?.