flathub / org.fritzing.Fritzing

https://flathub.org/apps/details/org.fritzing.Fritzing
1 stars 4 forks source link

Fritzing 0.9.4b can not place parts from the library on Fedora 31 #8

Closed mMerlin closed 4 years ago

mMerlin commented 4 years ago

Fritzing 0.9.4b is not working in flatpak on Fedora 31 and some other distro versions. I have the same symptoms with 3 different physical machines running Fedora 31, plus Virtual Box VMs for Fedora 30, Fedora 29, Debian 10. It works properly on Ubuntu 18.04, both physical and virtual machines.

The symptom on the failing cases, is that the application starts just fine. It can open existing sketches and view them. However, when a part is dragged from the library to a view, when it is dropped, it just vanishes instead of being placed. The application is also now unable to be fully closed. After attempting to place a part, closing the application "looks" like it worked, but after a bit, a notification pops up that "Fritzing is running in the background". The flatpak run command never exits in the terminal window the application was started. Using a separate terminal window…

% ps aux | grep -i "fritz"
phil       10507  0.0  0.0   3456   932 pts/0    S+   19:51   0:00 bwrap --args 38 Fritzing
phil       10522  0.0  0.0   3720  1184 pts/0    S+   19:51   0:00 bwrap --args 38 Fritzing
phil       10528  1.5  1.6 2176380 262896 pts/0  Sl+  19:51   0:05 Fritzing
phil       10696  0.0  0.0 215984   832 pts/2    S+   19:57   0:00 grep --color=auto -i fritz

Force closing the terminal window kills the processes.

So far the thing I see common for the failing environments is Wayland. As soon as the mouse pointer is moved over the breadboard view, QWaylandShmBuffer: mmap failed (Invalid argument) messages start repeating in the terminal window. The same lack of placement, and unable to close occurs if the part placement is done in the schematic or pcb views as well, but the wayland message to does not get generated that way.

I haven't yet worked backward far enough to get a Fedora (or Debian) environment that is not using Wayland by default.

% cat /etc/os-release
NAME=Fedora
VERSION="31 (Workstation Edition)"
ID=fedora
VERSION_ID=31
VERSION_CODENAME=""
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora 31 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=31
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=31
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

% flatpak --version
Flatpak 1.4.3

% flatpak info org.fritzing.Fritzing

Fritzing - Electronic Design Tool

          ID: org.fritzing.Fritzing
         Ref: app/org.fritzing.Fritzing/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 0.9.4b
     License: GPL-3.0+
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 186.2 MB
     Runtime: org.kde.Platform/x86_64/5.13
         Sdk: org.kde.Sdk/x86_64/5.13

      Commit: c595162a1d06f01eab9b66092c7ca68518974b9887295cd59950c439bfba3a72
      Parent: 39bbd0e2b1e2740293803fd4dc550fb0b1827dc5ddccff56a07f7aedad9c2aa5
     Subject: Add OARS info (7dec8699)
        Date: 2019-12-18 19:56:11 +0000

% flatpak info org.kde.Platform//5.13

KDE Application Platform - Shared libraries used by KDE applications

          ID: org.kde.Platform
         Ref: runtime/org.kde.Platform/x86_64/5.13
        Arch: x86_64
      Branch: 5.13
     License: GPL-2.0+
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 919.1 MB

      Commit: 43d14ed8d5d449ac3140cfb894633e0ee7bff66e0f506ebbc57ee5a2f893c779
      Parent: b1061ddc93f87193b8fa8005c8615f573477108f90331a7f6f1015f3d85617a8
     Subject: build of org.kde.Sdk, Sat Feb  1 09:38:12 UTC 2020 (31f46bd7846518463c24ed71d3e2928994971c27)
        Date: 2020-02-01 17:57:10 +0000

% flatpak run org.fritzing.Fritzing
QSocketNotifier: Can only be used with threads started with QThread
libpng warning: iCCP: known incorrect sRGB profile
QWaylandShmBuffer: mmap failed (Invalid argument)

This works with Ubuntu 18.04

% cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

% flatpak --version
Flatpak 1.0.9
% flatpak list
Ref                                              Options
org.fritzing.Fritzing/x86_64/stable              user,current
org.freedesktop.Platform.GL.default/x86_64/19.08 user,runtime
org.freedesktop.Platform.openh264/x86_64/19.08   user,runtime
org.freedesktop.Platform/x86_64/19.08            user,runtime
org.kde.KStyle.Adwaita/x86_64/5.13               user,runtime
org.kde.Platform/x86_64/5.13                     user,runtime

% flatpak info org.fritzing.Fritzing
Ref: app/org.fritzing.Fritzing/x86_64/stable
ID: org.fritzing.Fritzing
Arch: x86_64
Branch: stable
Origin: flathub
Collection ID: org.flathub.Stable
Date: 2019-12-18 19:56:11 +0000
Subject: Add OARS info (7dec8699)
Commit: c595162a1d06f01eab9b66092c7ca68518974b9887295cd59950c439bfba3a72
Parent: 39bbd0e2b1e2740293803fd4dc550fb0b1827dc5ddccff56a07f7aedad9c2aa5
Location: /home/phil/.local/share/flatpak/app/org.fritzing.Fritzing/x86_64/stable/c595162a1d06f01eab9b66092c7ca68518974b9887295cd59950c439bfba3a72
Installed size: 186.2 MB
Runtime: org.kde.Platform/x86_64/5.13
Sdk: org.kde.Sdk/x86_64/5.13

% flatpak info org.kde.Platform
Ref: runtime/org.kde.Platform/x86_64/5.13
ID: org.kde.Platform
Arch: x86_64
Branch: 5.13
Origin: flathub
Collection ID: org.flathub.Stable
Date: 2020-02-01 17:57:10 +0000
Subject: build of org.kde.Sdk, Sat Feb  1 09:38:12 UTC 2020 (31f46bd7846518463c24ed71d3e2928994971c27)
Commit: 43d14ed8d5d449ac3140cfb894633e0ee7bff66e0f506ebbc57ee5a2f893c779
Parent: b1061ddc93f87193b8fa8005c8615f573477108f90331a7f6f1015f3d85617a8
Location: /home/phil/.local/share/flatpak/runtime/org.kde.Platform/x86_64/5.13/43d14ed8d5d449ac3140cfb894633e0ee7bff66e0f506ebbc57ee5a2f893c779
Installed size: 919.1 MB

% flatpak run org.fritzing.Fritzing
Gtk-Message: 11:47:55.532: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:47:55.533: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
gasinvein commented 4 years ago

Does it work fine with X11 display? Try running it via flatpak run --env=QT_QPA_PLATFORM=xcb org.fritzing.Fritzing

mMerlin commented 4 years ago

YES!!

Thanks. That gets around the immediate issue. Should probably support Wayland at some point?

gasinvein commented 4 years ago

Better ask upstream about it. I'm not sure what's wrong in this case, but Qt on Wayland bugs are not uncommon.

gasinvein commented 4 years ago

@grulja Can this be something similar to flathub/org.telegram.desktop#133?

grulja commented 4 years ago

This looks like a bug in drag and drop, maybe this one [1], but I have no idea why the application cannot be closed.

[1] - https://gitlab.gnome.org/GNOME/mutter/issues/965

KjellMorgenstern commented 4 years ago

We had an issue reported in connection with wayland, but I closed it because it seemed to not happen anymore, and the user did not follow up: https://github.com/fritzing/fritzing-app/issues/3264

mMerlin commented 4 years ago

This looks like a bug in drag and drop, maybe this one [1], but I have no idea why the application cannot be closed.

[1] - https://gitlab.gnome.org/GNOME/mutter/issues/965

This case is not all drag and drop that fails (visibly). If I open an existing sketch, I can drag existing parts around in the views. It is only new parts from the library that vanish. And something was registered on mouse up, because the image of the part being dragged was deleted from the screen. Though if this is related, not being able to close could be because something is waiting for either a drop or a cancel event.

We had an issue reported in connection with wayland, but I closed it because it seemed to not happen anymore, and the user did not follow up: fritzing/fritzing-app#3264

The referenced issue seems to be fixed. I can use open and save dialogs. In my environment. Although, after opening, dragging, saving, the application did not fully close again. Also, dragging an existing part, then close did the same thing, and did not pop up the requester to save changes. Opening the saved after drag sketch did show the part in the new location, so the drag was registered. Could still be that the move events were seen, but not the drop, which causes an outstanding pending event, which prevents application shutdown.

mMerlin commented 4 years ago

closing this, as having a usable work around. The underlying QT/Wayland issues that apparently caused the problem can be dealt with some place else.

gasinvein commented 4 years ago

@mMerlin Maybe we should enable this workaround bu default for all users?

mMerlin commented 4 years ago

That would prevent some issues. What detection is available to decide when to invoke the environment override? What I know is a problem, is Fedora 31, with a strong case for Fedora 29 and 30, plus Debian 10. What I suspect is anything using Wayland. The downside being figuring out when to turn that default off again. Supposedly, Qt will start being (more) compatible with Wayland at some point. When it works, using the system default would be the preferred way to go. Now, if there is specific feature test that can detect when the problem will occur, that would be the way to dynamically fix the problem. Like some feature detection and monkey patching down in javascript for browser compatibility.