FS#77807 - [calibre] 6.14 ebook-viewer crashes on launch
Attached to Project:
Community Packages
Opened by Tedd (tedd) - Friday, 10 March 2023, 11:35 GMT
Last edited by Caleb Maclennan (alerque) - Tuesday, 14 March 2023, 18:33 GMT
Opened by Tedd (tedd) - Friday, 10 March 2023, 11:35 GMT
Last edited by Caleb Maclennan (alerque) - Tuesday, 14 March 2023, 18:33 GMT
|
Details
Description:
Trying to read an ebook with the included ebook-viewer results in the following error message and fails to load any file. Downgrading to calibre 6.11.0-1 fixes the problem. $ ebook-viewer qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" Traceback (most recent call last): File "/usr/bin/ebook-viewer", line 21, in <module> sys.exit(ebook_viewer()) File "/usr/lib/calibre/calibre/gui_launch.py", line 102, in wrapper return func(*a, **kw) File "/usr/lib/calibre/calibre/gui_launch.py", line 118, in ebook_viewer main(args) File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 225, in main run_gui(app, opts, args, internal_book_data) File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 151, in run_gui main = EbookViewer( File "/usr/lib/calibre/calibre/gui2/viewer/ui.py", line 151, in __init__ self.lookup_widget = w = Lookup(self) File "/usr/lib/calibre/calibre/gui2/viewer/lookup.py", line 307, in __init__ self._page = Page(create_profile(), self.view) File "/usr/lib/calibre/calibre/gui2/viewer/lookup.py", line 223, in create_profile ans.setHttpUserAgent(random_user_agent(allow_ie=False)) File "/usr/lib/calibre/calibre/__init__.py", line 297, in random_user_agent ua_list = common_user_agents() File "/usr/lib/calibre/calibre/utils/random_ua.py", line 26, in common_user_agents return user_agent_data()['common_user_agents'] File "/usr/lib/calibre/calibre/utils/random_ua.py", line 14, in user_agent_data P('user-agent-data.json', data=True, allow_user_override=False)) File "/usr/lib/calibre/calibre/utils/resources.py", line 89, in get_path with open(fpath, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/calibre/user-agent-data.json' Additional info: * package version(s) Calibre 6.14.0-1 Steps to reproduce: run ebook-viewer |
This task depends upon
Closed by Caleb Maclennan (alerque)
Tuesday, 14 March 2023, 18:33 GMT
Reason for closing: Fixed
Additional comments about closing: calibre-6.14.0-2
Tuesday, 14 March 2023, 18:33 GMT
Reason for closing: Fixed
Additional comments about closing: calibre-6.14.0-2
It appears to be simply a missing file in the package, user-agent-data.json. I replaced it with https://github.com/eli-schwartz/pkgbuilds/blob/master/calibre-git/user-agent-data.json, and this error disappeared.
Now I simply have a "Segmentation fault" problem, which I have with Calibre itself and is likely an unrelated problem from using the ALHP x86_64-v3 repos, since it happens with the AUR calibre-git also.
3421a3422,3425
> calibre /usr/lib/calibre/calibre/gui2/tts/__pycache__/windows_sapi.cpython-310.opt-1.pyc
> calibre /usr/lib/calibre/calibre/gui2/tts/__pycache__/windows_sapi.cpython-310.pyc
> calibre /usr/lib/calibre/calibre/gui2/tts/__pycache__/windows_sapi_config.cpython-310.opt-1.pyc
> calibre /usr/lib/calibre/calibre/gui2/tts/__pycache__/windows_sapi_config.cpython-310.pyc
3431a3436,3437
> calibre /usr/lib/calibre/calibre/gui2/tts/windows_sapi.py
> calibre /usr/lib/calibre/calibre/gui2/tts/windows_sapi_config.py
4379a4386,4387
> calibre /usr/lib/calibre/calibre/utils/windows/__pycache__/winspeech.cpython-310.opt-1.pyc
> calibre /usr/lib/calibre/calibre/utils/windows/__pycache__/winspeech.cpython-310.pyc
4382a4391
> calibre /usr/lib/calibre/calibre/utils/windows/winspeech.py
5152d5160
< calibre /usr/share/calibre/user-agent-data.json
If anybody can figure out how to fix this I'm quite open to patches.
It uses user-agent-data.json from upstream's official build. An alternative would be to use
python setup.py recent_uas
Though that would involve pulling unversioned files from upstream at build time.
The diff also uses a specific commit for the hyphenation dictionaries to avoid master being used.
To be clear, the error 'qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""' also occurs in Calibre 6.11.0-1, and is not related to this issue. Not sure if it is a symptom of something else or just a warning.
@loqs
I have built the package with your patch and it seems to have resolved the issue.
I can confirm the issues also happened on both X11 and Wayland on my end.
I still had segmentation faults upon starting either Calibre or the ebook viewer, so I tried running the tests via "calibre-debug --run-tests all". They all ran correctly or were skipped due to being Windows-specific, until it reached test_qt.
"test_qt (calibre.test_build.BuildTest) ... Segmentation fault (core dumped)"
I followed up on my feeling re the unofficial repo being at fault, then, and replaced the extra-x86-64-v3/qt6-base package with the one from extra. This proved to be the solution to *that* problem, so we can rule it out being related here. I have neither the time nor the knowledge to poke about the qt6 codebase and figure out what's mangled there, sorry, so I'm not really sure I should file the bug when I can't follow up on it? Just wanted to clear up that my other issue isn't the same issue after all.
I found the file in btrfs snapshots.