Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#61128 - [atril] application/vnd.rar in atril.thumbnailer

Attached to Project: Community Packages
Opened by Bachsau (Bachsau) - Wednesday, 19 December 2018, 05:31 GMT
Last edited by Balló György (City-busz) - Friday, 04 October 2019, 14:49 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Brad Fanella (cesura)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The Atril thumbnailer suddenly seems to have "gained" the ability to handle RAR archives. Well I have several of them with a size of several gigabytes each and as soon as I open the directories containing them, unrar starts extracting them.
This task depends upon

Closed by  Balló György (City-busz)
Friday, 04 October 2019, 14:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  atril 1.20.3-2
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 05:47 GMT
Therefore what? Why is this a problem?
Comment by Bachsau (Bachsau) - Wednesday, 19 December 2018, 06:03 GMT
Are you kidding? When browsing through directories, who wants the file manager to freeze while some thumbnailer tries to extract 5+ GiB of data from any rar archive that might exist in that directory for nothing? Archive files aren't for thumbnailing!
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 15:39 GMT
People who don't want the thumbnailer to extract thumbnails from giant files, should disable the thumbnail view.

RAR archives are pretty often comic books in the ".cbr" format, and it is plenty realistic that a comic book is that size. And honestly I cannot imagine why one would want to have such a terrible format for any reason other than the requirement to put up with the restrictions of some document format.

My advice is to take advantage of your file browser's settings to disable thumbnail extraction for files over a certain size. I only have thumbnails for files that are less than 1MB in size.
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 15:41 GMT
I'm honestly clueless how you ever got this problem, since Atril has supported CBR comics since its very first commit in 2011 which imported the evince codebase.

You might want to investigate why your apparently-not-comic-book-archive RAR files are being detected as the freedesktop mimetype application/vnd.comicbook-rar or its deprecated alias application/x-cbr -- they're supposed to be bound to the .cbr file extension. I have no idea why that should suddenly change.
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 16:46 GMT
I've deleted your comment due to being incredibly rude to staff. Don't do that again or we'll happily ban you.

1) CBR comics are https://en.wikipedia.org/wiki/Comic_book_archive, which is a subcategory of https://en.wikipedia.org/wiki/E-book -- this is something trivial to google, so I suggest you try doing that first next time.

2) Okay, apparently atril's thumbnailer uses the generic "application/vnd.rar" instead of its subclass "application/vnd.comicbook-rar", so it is listing, and attempting to thumbnail, the wrong mimetype. This is a legitimate, and very recent, upstream bug.

3) Telling your file browser to not thumbnail files above a certain size is not a bad idea either way -- it is a workaround that will prevent faulty thumbnailer files from operating to excess ;) in addition to just prioritizing speed/responsiveness over thumbnails even for files which can be legitimately thumbnailed.
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 16:47 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages → Upstream Bugs)
  • Field changed: Severity (High → Medium)
  • Task assigned to Brad Fanella (cesura)
The issue comes from https://github.com/mate-desktop/atril/issues/341 which had an incorrect fix. I've commented there to point out the issue.

EDIT: Submitted https://github.com/mate-desktop/atril/pull/349
Comment by Bachsau (Bachsau) - Wednesday, 19 December 2018, 17:30 GMT
Caja is configured to not thumbnail anything above 10MiB, however it seems it didn't honor that setting in this case. I don't know why. As I said I didn't want to be rude. It was just that WTF moment of "Well, the plane crashed and the makers tell me it is expected behavior." How do you explain what should be obvious to everyone? – But ban me, happily if you want. It's not like I'm getting paid for contributing or reporting bugs here, devoting my free time to help the project. Of course I googled the comic book format after you mentioned it, but besides the fact that they also seem to be using rar compression for it, I couldn't see what made you think that this is in any way related to my report as I made it clear that this is about normal archives, even stated the affected mime type in the title of this report. You also said that RAR files are "pretty often comic books" which sounded like you were telling me, that atril's behavior is okay, because every other uses of that format are negligible, which would be ridiculous, since I never heard of those comic books and their use of the RAR format can just be a niche application at best.
Comment by Eli Schwartz (eschwartz) - Wednesday, 19 December 2018, 18:11 GMT
It is a pretty obvious connection to CBR -- all three applications are designed to read rar-compressed CBR files. (Also in the communities I associate with, CBR ebooks are extremely common. Whereas I've never met a Linux user that wanted to use .rar for anything if they could get away with .tar.* instead. Even Windows users prefer .7z)
You stated that it suddenly started doing this -- I didn't know offhand the method it used to detect CBR files, but I did know that it's been supported for a very long time. I assumed either it should have always opened .rar files, or that it should have always opened .cbr files only.

Since I don't have atril installed, I checked xreader and evince instead (evince being the original project, and xreader being the cinnamon fork of atril), and noticed there was a dedicated mimetype. Evince had both of the correct mimetypes, xreader only had "application/x-cbr". Seemed clear to me it was using mimetype detection properly and it wasn't obvious to me that the faulty mimetype was actually in atril's source code. Turns out even after being linked to the gnome commit which did this right, the atril team decided to do something completely different -- that's pretty odd, TBH.

I'm sure you can figure out how your last sentence was incompatible with your claim of "No offence meant", and why I took offense.
Comment by Bachsau (Bachsau) - Wednesday, 19 December 2018, 18:23 GMT
Okay, "suddenly" was a bit misleading... after the last update. It took me some time to find out about the reason why there were suddenly some unrar processes running and filling up my hard drive. If you or even me think that rar is a good format doesn't matter here. :) In fact I'm not using it very often today, but have lots of old files sitting around. It has pretty good compression though. Of course I also fixed the problem by removing the offending mime type from my thumbnailer configuration file. But I decided on reporting this anyway, as it will be overwritten with the next update and this simply couldn't be intentional.
Comment by Brad Fanella (cesura) - Thursday, 20 December 2018, 04:23 GMT
Thanks for the fix Eli. Until this is officially incorporated upstream, I've created a couple of patch files to build the current version with. The changes are reflected in package version atril-1.20.3-2.
Comment by Bachsau (Bachsau) - Thursday, 20 December 2018, 09:40 GMT
The update today still had "application/vnd.rar" in "/usr/share/thumbnailers/atril.thumbnailer". I've now added it to my NoExtract key in /etc/pacman.conf for the time beeing...
Comment by Brad Fanella (cesura) - Thursday, 20 December 2018, 10:07 GMT
>The update today still had "application/vnd.rar" in "/usr/share/thumbnailers/atril.thumbnailer".

I'm not really in the business of breaking from upstream, so I made patches according to the approved commit diff (https://github.com/mate-desktop/atril/commit/798757001016e5e02de545762fab0018f72ff086). If you are still having issues with atril, then I highly recommend opening an issue on the aforementioned Github page so that it can be handled appropriately by the developers themselves. Anything else is beyond the scope of what we do here.

>I've now added it to my NoExtract key in /etc/pacman.conf for the time beeing...

Good to know.
Comment by Eli Schwartz (eschwartz) - Thursday, 20 December 2018, 14:39 GMT
autotools is fun ;) you forgot to run autoreconf after patching configure.ac so the configure script never got updated with the fix.
Comment by Eli Schwartz (eschwartz) - Thursday, 20 December 2018, 14:42 GMT Comment by Brad Fanella (cesura) - Thursday, 20 December 2018, 14:47 GMT
>autotools is fun ;) you forgot to run autoreconf after patching configure.ac so the configure script never got updated with the fix.

AHHH damn, I even ran autoreconf locally when I was manually testing the fix, but it never found its way into the PKGBUILD. ;)

Loading...