Url image preview plugin crashes Gajim with long filenames
This is a duplicate of gajim#9452 (closed) as I'm unsure if it's a problem of the plugin or Gajim itself.
Versions
- OS:
xUbuntu 18.10
with updates as of 2018-11-18 - Gajim version:
1.1.0-2
(from official PPA / ftp.gajim.org) - GTK version:
2.24.32-3ubuntu1
and3.24.1-1ubuntu2
- Python-nbxmpp version:
0.6.8-1
Steps to reproduce the problem
- Start Gajim
- Open a chat window with HTTP uploaded image with long filename in history
- Watch Gajim crashing
Expected behavior
Gajim keeps running, maybe shows an error popup.
Actual behavior
Gajim crashes completely with "Fatal IO error 11 (Resource temporarily unavailable)". (Previous version 1.1.0-beta2
of Gajim gave "BadImplementation (server does not implement operation)".)
It seems to be caused by a HTTP uploaded image with a very long filename.
The URL of the image it tries to show is something like https://xmpp.myserver.com/upload/7cdbe36276846214d3ea1062732aa5b1e47f164d/VfqaZYeJ3CSz4JHDnkAhdgZRE7cqKfZHY1RPGNSO/2018-11-19_17_31_41-Neue_Nachricht___Geben_Sie_den_Devs_ihr_Ops.__-_my1234_email.com_-_Email_-_Vival.png
.
Log shows:
19.11.2018 21:51:07 (I) gajim.plugin_system.preview Writing '/home/mbirth/.local/share/gajim/downloads/2018-11-19_17_31_41-Neue_Nachricht___Geben_Sie_den_Devs_ihr_Ops.__-_my1234_email.com_-_Email_-_Vival_3ecffd74c100528e5d3f3da7bf5a75e813c66919.png' of size 35505...
19.11.2018 21:51:07 (E) gajim.plugin_system.preview Failed to write file '/home/mbirth/.local/share/gajim/downloads/2018-11-19_17_31_41-Neue_Nachricht___Geben_Sie_den_Devs_ihr_Ops.__-_my1234_email.com_-_Email_-_Vival_3ecffd74c100528e5d3f3da7bf5a75e813c66919.png'!
19.11.2018 21:51:07 (E) gajim.plugin_system.preview [Errno 36] File name too long: '/home/mbirth/.local/share/gajim/downloads/2018-11-19_17_31_41-Neue_Nachricht___Geben_Sie_den_Devs_ihr_Ops.__-_my1234_email.com_-_Email_-_Vival_3ecffd74c100528e5d3f3da7bf5a75e813c66919.png'
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python3: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Gdk-Message: 21:51:07.610: gajim: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.