flathub / net.ankiweb.Anki

https://flathub.org/apps/details/net.ankiweb.Anki
20 stars 13 forks source link

Symbol lookup error in libfcitx5platforminputcontextplugin.so after upgrading #99

Closed taoky closed 1 year ago

taoky commented 1 year ago

After upgrading to 1bc99dd90590d281c3c637f1adb7f12384086ab3107b74f06a8185d825b38be9 (Add release notes for 2.1.62 (8e7a93cc), 2023/05/02), I find that Anki seems not quite working correctly under my GNOME wayland session (xwayland). The mouse cursor is changed to a old-fashioned one (will submit another issue about this if it still exists after this crash has been resolved), and Anki crashes when typing anything into an inputbox.

How to reproduce:

  1. Install and use fcitx5 as your input method (IM). It seems that this triggers even when no IM (aka, Keyboard - English (US)) is set as current one in fcitx5.
  2. I'm using GNOME wayland and I'm not sure if this triggers under pure X11 session.
  3. Open Flatpak Anki, open "Browse" and type anything into "Search cards/notes".

Console log:

Anki starting...
Initial setup...
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Preparing to run...
Wayland support is disabled by default due to bugs:
https://github.com/ankitects/anki/issues/1767
You can force it on with an env var: ANKI_WAYLAND=1
Gtk-Message: 14:37:13.930: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:37:13.931: Failed to load module "canberra-gtk-module"
Qt warning: QApplication: invalid style override 'adwaita' passed, ignoring it.
    Available styles: Windows, Fusion 
Starting main loop...

** (anki:2): WARNING **: 14:37:39.152: atk-bridge: get_device_events_reply: unknown signature
JS warning /_anki/js/browser_editor.js:4 No version information available for component [tex]/noerrors
JS warning /_anki/js/browser_editor.js:4 No version information available for component [tex]/mathtools
JS warning /_anki/js/browser_editor.js:4 No version information available for component [tex]/mhchem
JS warning /_anki/js/browser_editor.js:97 The specified value "#00f" does not conform to the required format.  The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
JS warning /_anki/js/browser_editor.js:97 The specified value "#00f" does not conform to the required format.  The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
anki: symbol lookup error: /app/share/anki/lib/PyQt6/Qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so: undefined symbol: _ZN22QWindowSystemInterface22handleExtendedKeyEventEP7QWindowmN6QEvent4TypeEi6QFlagsIN2Qt16KeyboardModifierEEjjjRK7QStringbtb, version Qt_6_PRIVATE_API

It seems that they are some incompatibility between PyQt6 plugins and Qt6 within Anki -- Maybe these plugins should be rebuilt under the new Qt6 library binaries?

This issue does not exist in 5089f63b4c9fdf3e48a7ca2f81aba02c974fba1995728fe2711bed437ae4ecf2 (Add release notes for 2.1.61; fix indenting (1368d3a8), 2023/04/11).

taoky commented 1 year ago

Found https://github.com/ankitects/anki/issues/2487, guess an update is needed to fix this in Flathub?

rayes0 commented 1 year ago

@taoky The app has been updated to 2.1.63, so fcitx5 should be working now. Could you try the updated app and see if the issue persists?

taoky commented 1 year ago

The FlatHub version of Anki hasn't been updated to 2.1.63 yet. Should I just wait for that, or there are other methods to get the latest 2.1.63 ahead?

rayes0 commented 1 year ago

https://github.com/flathub/net.ankiweb.Anki/pull/100#issuecomment-1548991044

@taoky Try the build from this branch, it should still be available.

taoky commented 1 year ago

#100 (comment)

@taoky Try the build from this branch, it should still be available.

Thanks! I have tested this and I believe that this crash has been resolved in this ⁨2.1.63 build (though the mouse cursor is still very weird but it is another bug).

taoky commented 1 year ago

BTW, for anyone finding that their mouse cursor in latest flatpak Anki very weird, I have found a related bug report in freedesktop-sdk and it seems that a fix is in progress.

Setting the env XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons can also workaround the cursor bug.