This forum has been archived. All content is frozen. Please use KDE Discuss instead.

*.DjVu thumbnails / previews not being generated.

Tags: None
(comma "," separated)
metzman
Registered Member
Posts
171
Karma
3
OS
Hi Folks,

Yet again I find myself seeking advice...

I have no thumbnails/previews being generated for (any) *.djvu files, either in the directory listing or the Information Panel. Unfortunately I don't know if this is a new problem that has arisen, or it it was present when I first migrated to openSUSE approx 5-6 weeks ago.

Image

A search on the KDE bug tracker didn't reveal anything...
https://bugs.kde.org/buglist.cgi?quicks ... humbnailer
https://bugs.kde.org/buglist.cgi?quicksearch=djvu

Checked:
Dolphin => Config => General => Previews - has 'DjVu Files' selected.
View Properties for the directories in question have 'Preview of files and folders selected'.
This affects a (new) new user also.

Following suggestions from this topic (similar problem, different file type) viewtopic.php?f=224&t=107909 - together with a few things I had already checked - I'm unable to solve this...

1) Purposely renamed a test file to remove the .djvu extension - mime type is correctly identified:
Code: Select all
paul@Orion-1:~$ file -i /home/paul/Temporary/Industrial-Chemistry--Njenger-Dr-Helen
/home/paul/Temporary/Industrial-Chemistry--Njenger-Dr-Helen: image/vnd.djvu; charset=binary

2) Dolphin seems to be aware of .djvu files. I noticed here that "ServiceTypes :" only lists one mime type, is that correct? It seems at odds with the other entries that have multiple mime types.
Code: Select all
paul@Orion-1:~$ ktraderclient --servicetype 'ThumbCreator'
---- Offer 13 ----
CacheThumbnail : 'TRUE'
IgnoreMaximumSize : 'TRUE'
Type : 'Service'
Name : 'DjVu Files'
Invalid property Comment
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'ThumbCreator - image/x.djvu'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'djvuthumbnail'
DesktopEntryPath : 'djvuthumbnail.desktop'
DesktopEntryName : 'djvuthumbnail'
Keywords : ''
Categories : ''

3) Desktop entry file is present and correct:
Code: Select all
[Desktop Entry]
Type=Service
Name=DjVu Files
X-KDE-ServiceTypes=ThumbCreator
MimeType=image/vnd.djvu;image/x.djvu;image/vnd.djvu;
X-KDE-Library=djvuthumbnail
CacheThumbnail=true
IgnoreMaximumSize=true

4) Unsure if the thumbnailer uses djvulibre - these are the installed packages:
Code: Select all
paul@Orion-1:~$ rpm -qa | grep -i djvu
python-djvulibre-0.3.9-5.1.1.x86_64
libdjvulibre21-3.5.25-5.1.1.x86_64
djvulibre-3.5.25-5.1.1.x86_64
djvulibre-doc-3.5.25-5.1.1.x86_64

5) Let's try make a thumbnail. Baffled! - 'djvuthumb.png' is created perfectly OK... ???
Code: Select all
paul@Orion-1:~$ kioclient copy thumbnail:/home/paul/Temporary/Industrial-Chemistry--Njenger-Dr-Helen.djvu ~/Temporary/djvuthumb.png

6) Starting Dolphin from Konsole I changed directory to 'Temporary', selected 'Industrial-Chemistry--Njenger-Dr-Helen.djvu', waited a few seconds, and then closed Dolphin. I don't know if there is anything of significance in the output.
Code: Select all
paul@Orion-1:~$ dolphin
QPixmap::scaled: Pixmap is a null pixmap
libpng warning: Unknown iTXt compression type or method
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied
QFileSystemWatcher: failed to add paths: /home/lost+found

7) Repeat (6) but this time starting normally from the GUI. Having selected the djvu file, left Dolphin open and from konsole listed it's open files:
Code: Select all
paul@Orion-1:~$ lsof -p `pidof dolphin`

lsof output http://paste.kde.org/p82c1b0b1/

Thanks...

KDE: 4.11.1
Qt: 4.8.5
kdegraphics-thumbnailers: 4.11.1-78.1
dolphin: 4.11.1-357.1
openSUSE 12.3 x64
freininghaus
Moderator
Posts
224
Karma
1
OS
Do you see thumbnails for these files in the "File open" dialog of other applications?

(Just to find out if this is a Dolphin-specific issue or a problem with the thumbnailer itself.)
metzman
Registered Member
Posts
171
Karma
3
OS
freininghaus wrote:Do you see thumbnails for these files in the "File open" dialog of other applications?

No, they're not shown... In fact on the open file dialogue, neither are *.pdf *.txt or *.epub showing previews. (Did they ever? I'm not sure...)

Dolphin directory listing:
Image

Okular open file dialogue:
Image
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The lack of previews for other files are likely due to their respective thumbnailers either not being enabled, or not being installed. Can you check whether this is the case?

Also, make sure ~/.thumbnails is read-write by the user, and try emptying it out to eliminate any potential corruption. Also, can you verify that the "Show Previews" function is enabled in Dolphin / the file picker? This is usually represented by an icon in the toolbar.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
The lack of previews for other files are likely due to their respective thumbnailers either not being enabled, or not being installed. Can you check whether this is the case?

Dolphin => Config => General => Previews -- The file types in question are enabled.
These are the additional thumbnailer packages installed:
Code: Select all
paul@Orion-1:~$ rpm -qa | grep thumbnail
kde-thumbnailer-epub-0.3.1-5.1.x86_64
kde-odf-thumbnail-1.0.0-3.2.x86_64
kdegraphics-thumbnailers-4.11.1-78.1.x86_64

Here is the full output of ktraderclient --servicetype 'ThumbCreator' : http://paste.kde.org/pd0bed9dc

Also, make sure ~/.thumbnails is read-write by the user, and try emptying it out to eliminate any potential corruption.

Permissions: ~/.thumbnails (also ../normal and ../large) is drwx------
Deleting ~/.thumbnails makes no difference, neither does deleting /var/tmp/kdecache-${USERNAME}

Also, can you verify that the "Show Previews" function is enabled in Dolphin / the file picker? This is usually represented by an icon in the toolbar.

View Properties for the directories in question have "Preview of files and folders" enabled. The file picker has "Show Previews" enabled.

This problem is also replicated on a completely new user.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you tail ~/.xsession-errors when opening a directory with previewable images, is anything output which might be of relevance?
Please make sure you enable all debug areas in "kdebugdialog" prior to starting Dolphin.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
Start Dolphin, initial display is icon view of home directory; navigated to ~/Temporary (contains files that are not being previewed); waited a few seconds then closed Dolphin.

After ~$ tail -n50 ~/.xsession-errors I gave up, copied the file and opened it in kate... These are lines I thought :-\ may be relevant... I don't see anything that jumps out and screams 'Big Error'. The whole file is here: http://paste.kde.org/p9ded25cc

"Trying to open ksycoca" - does that indicate it can't, or is it just a notification that it's trying? - But this is system config?? - Reading .desktop files I suppose...???
Code: Select all
dolphin(1213)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-paul/ksycoca4"

OK, so far so good, now we have kio_thumbnail
Code: Select all
klauncher(900)/kio (KLauncher) KLauncher::processRequestReturn: "kio_thumbnail" (pid 1228) up and running.

But, that is immediately followed by 5 identical lines of:
Code: Select all
kio_thumbnail(1228)/KSharedDataCache KSharedDataCache::insert: Overwriting existing cached entry due to collision.

"Trying to open ksycoca" - is now repeated once more. Probably a red herring, just for notification I guess...
Code: Select all
kio_thumbnail(1228)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-paul/ksycoca4"

Now, it looks to me, as if all of the *.txt files get new thumbnails generated - but nowhere do I see any indication of *.DjVu thumbs being created.
Code: Select all
kio_thumbnail(1228) ThumbnailProtocol::get: Wanting MIME Type: "text/plain"
kio_thumbnail(1228) ThumbnailProtocol::get: Guess plugin:  "textthumbnail"
kio_thumbnail(1228)/kio (kioslave) KIO::SlaveBase::mimeType: "application/octet-stream"
dolphin(1213)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/paul/Temporary/lsof-p.dolphin.txt")


I checked the permissions on /var/tmp/kdecache-$USERNAME and they are OK -- What I did notice though, and I've proved this by logging in/out several times; is that the two *.kcache files are being (re)created on every login. Doesn't that somewhat defeat the object of caching... Knowing very little about the inner workings of KDE, I'm prone to confusing myself, and hence others.

I appreciate your help...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The Sycoca is a cache of a large portion of the *.desktop files on your system, used by KDE to increase performance. The message you got about opening it is routine and normal - and does not indicate failure.

As for one of the DjVu files - what is the mimetype of these as seen by KDE?

You can use the "file --mime-type" command against each file in turn to determine this. The result of this should match one of the semi-colon seperated values of the MimeType entry in the *.desktop file of the DjVu thumbnailer.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
As for one of the DjVu files - what is the mimetype of these as seen by KDE?

The files used when testing were mimetype "image/vnd.djvu". Randomly checking a few other *.djvu files it appears they are probably all of that mimetype.

The result of this should match one of the semi-colon seperated values of the MimeType entry in the *.desktop file of the DjVu thumbnailer.

It does: (I notice in the MimeType= that "image/vnd.djvu" is repeated)
Code: Select all
[Desktop Entry]
Type=Service
Name=DjVu Files
X-KDE-ServiceTypes=ThumbCreator
MimeType=image/vnd.djvu;image/x.djvu;image/vnd.djvu;
X-KDE-Library=djvuthumbnail
CacheThumbnail=true
IgnoreMaximumSize=true

Here also is the relevant section of "~$ ktraderclient --servicetype 'ThumbCreator'" output.
Code: Select all
---- Offer 13 ----
CacheThumbnail : 'TRUE'
IgnoreMaximumSize : 'TRUE'
Type : 'Service'
Name : 'DjVu Files'
Invalid property Comment
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'ThumbCreator - image/x.djvu'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'djvuthumbnail'
DesktopEntryPath : 'djvuthumbnail.desktop'
DesktopEntryName : 'djvuthumbnail'
Keywords : ''
Categories : ''

Also, as I said in the initial post, this successfully generates a thumbnail...
Code: Select all
~$ kioclient copy thumbnail:/home/paul/Temporary/testfile.djvu ~/Temporary/djvuthumb.png


Edit: 2013-Oct-02 update to 4.12 didn't solve this... Is this an "only me" bug :'(
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
To eliminate user configurations as the cause of this, is this reproducible under a new user?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
bcooksley wrote:To eliminate user configurations as the cause of this, is this reproducible under a new user?

Yes...
I had tried that previously. To be doubly sure I created another new user... Also, as the new user I downloaded a fresh copy of one of the *.djvu files.
Ensured that (Dolphin) Preferences > General > Previews > DjVu Files, and "Show preview of files and folders" were enabled; and that the new user had read permission on the files I had been testing with.
Every one of these *.djvu files opens perfectly OK in okular, all have a front cover image.

Split view of Dolphin as the new user. No previews displayed...
Left pane: New user and New file. Right pane: New user and Existing files.

Image
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, what size are these DjVu files? I was fairly sure the local folders size limit restriction was removed in recent versions of KDE though...


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
metzman
Registered Member
Posts
171
Karma
3
OS
File sizes are between approx 700kB - 20MB
The setting for local file maximum size has certainly been removed from the configure previews tab in Dolphin.
I had already tried changing the setting in kdeglobals to allow a MaximumSize of 32MB.
Code: Select all
[PreviewSettings]
MaximumRemoteSize=0
MaximumSize=33554432
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, guess we'll need to debug why Dolphin might not be requesting thumbnails.
freininghaus: any ideas here?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
freininghaus
Moderator
Posts
224
Karma
1
OS
bcooksley wrote:Okay, guess we'll need to debug why Dolphin might not be requesting thumbnails.
freininghaus: any ideas here?


Dolphin does ask KIO::PreviewJob for previews of all items in the current folder (if the number is < 500) and includes a list of the supported preview plugins and the size limit for remote files. So it looks to me like the problem might be in KIO::PreviewJob, which I'm not familiar with. Sorry about that.

The point of my "file dialog" question was to exclude the possibility that I'm wrong, and that this is a Dolphin problem after all. Another way to check this would be to try if FolderView is able to show previews of these files. I would be surprised if it is, but in that case, please file a bug report for Dolphin and provide a *.djvu file or tell me where to get one. Thanks for your help.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed