Tools > Save picture... returns a blank (white) PNG image

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Tools > Save picture... returns a blank (white) PNG image

Postby JiriVALASEK » Wed Oct 02, 2019 9:43 am

Hi,

I am having difficulties saving a picture using "Tools > Save picture.." utility. I did follow several threads trying to solve it, but nothing worked.

The threads I've already read: Trial 1: User parameter:BaseApp/Preferences/View/SavePicture ='' > blank image
Trial 2: User parameter:BaseApp/Preferences/View/SavePicture ='FramebufferObject' > blank image
Trial 3: User parameter:BaseApp/Preferences/View/SavePicture ='PixelBuffer' > blank image
Trial 4: User parameter:BaseApp/Preferences/View/SavePicture ='CoinOffscreenRenderer' >
[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: ../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)


Tested with:

OS: Ubuntu 18.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.3.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

*both versions installed using PPA and Apt-get.

GPU: Intel® HD Graphics 520 (Skylake GT2)

$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
Subsystem: Lenovo Skylake GT2 [HD Graphics 520]
Kernel driver in use: i915
Kernel modules: i915


Has anyone found a solution to this problem?

Thanks a lot.
wmayer
Site Admin
Posts: 15479
Joined: Thu Feb 19, 2009 10:32 am

Re: Tools > Save picture... returns a blank (white) PNG image

Postby wmayer » Wed Oct 02, 2019 10:16 am

I am running
OS: Ubuntu 18.04.3 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18357 (Git)
Build type: Unknown
Branch: master
Hash: 19ac3ecfc7ba4f76089b96b54dfae4bfb0667c5b
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

under VirtualBox with lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
Kernel driver in use: vboxvideo
Kernel modules: vboxvideo
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
And for me SavePicture ='', SavePicture ='FramebufferObject' and SavePicture ='PixelBuffer' works. Only using 'CoinOffscreenRenderer' raises an error.
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Re: Tools > Save picture... returns a blank (white) PNG image

Postby JiriVALASEK » Wed Oct 02, 2019 11:17 am

Now I tried

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Unknown
Branch: master
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: English/UnitedStates (en_US)

*installed using snap install freecad.

It started with a warning:
(process:2653): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.


and the results were:
Trial 1: User parameter:BaseApp/Preferences/View/SavePicture ='' >
Coin warning in SoGLLineWidthElement::updategl(): 10.000000 is outside the legal range of [1.000000, 7.375000] for this OpenGL implementation's glLineWidth() settings. It was now clamped.

See the documentation of SoGLLineWidthElement for information on how the application programmer should acquire the boundary values for the legal range.

Trial 2: User parameter:BaseApp/Preferences/View/SavePicture ='FramebufferObject' > correct image
Trial 3: User parameter:BaseApp/Preferences/View/SavePicture ='PixelBuffer' > correct image
Trial 4: User parameter:BaseApp/Preferences/View/SavePicture ='CoinOffscreenRenderer' >
[xcb] <unknown exception traceback><type 'exceptions.RuntimeError'>: Offscreen rendering failed

Problem is that I am unable to add my workbench and a necessary python module (pyPNG) into this installation.
  • The home dir for it is /snap/freecad/8/opt/local/FreeCAD-0.18/ and /snap/freecad/8/opt/local/FreeCAD-0.18/Mod is Read-only and so it won't allow me to copy a workbench folder into it.
  • Python modules installed using pip (pip install <module> or python -m pip install <module>) aren't present in this FreeCAD ( as they are in any FreeCAD from PPA).
Any ideas about those issues?

EDIT

I managed to add my workbench - I put it inside ~/snap/freecad/8/.FreeCAD/Mod and I found out that PySide2 is missing in this installation.
openBrain
Posts: 3402
Joined: Fri Nov 09, 2018 5:38 pm

Re: Tools > Save picture... returns a blank (white) PNG image

Postby openBrain » Wed Oct 02, 2019 1:00 pm

IMO just the known problem with Qt5 along with Intel GFX... ;)
Qt5.12.1 has solved the problem in most cases for Windows users.
You can find several threads in the forum about that.
Generally, this issue also affects the Print function.
User avatar
pl7i92LCNC
Posts: 209
Joined: Tue Mar 12, 2019 3:03 pm
Location: RLP DE

Re: Tools > Save picture... returns a blank (white) PNG image

Postby pl7i92LCNC » Wed Oct 02, 2019 1:45 pm

the freecad daily does have suport for qt5 and brings in the miissing
you shoudt update at 18.04 to the new 0,19
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Re: Tools > Save picture... returns a blank (white) PNG image

Postby JiriVALASEK » Wed Oct 02, 2019 7:22 pm

pl7i92LCNC wrote:
Wed Oct 02, 2019 1:45 pm
the freecad daily does have suport for qt5 and brings in the miissing
you shoudt update at 18.04 to the new 0,19
I have tried that, it did not work.
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Re: Tools > Save picture... returns a blank (white) PNG image

Postby JiriVALASEK » Wed Oct 02, 2019 7:29 pm

openBrain wrote:
Wed Oct 02, 2019 1:00 pm
IMO just the known problem with Qt5 along with Intel GFX... ;)
Qt5.12.1 has solved the problem in most cases for Windows users.
You can find several threads in the forum about that.
Generally, this issue also affects the Print function.
Hi, I know that it's a problem with Qt5 and Intel GPU.
I don't have any problems on a Windows PC, but I need to use Ubuntu.
I found those multiple threads but none of them yielded a solution, that's why I asked if anyone found a solution...