Bug 298561 - okular 0.14.2 on KDE 4.8.2 fails to open chm files: No plugin for mimetype '"application/octet-stream"'
Summary: okular 0.14.2 on KDE 4.8.2 fails to open chm files: No plugin for mimetype '"...
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: CHM backend (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-21 16:20 UTC by David Kredba
Modified: 2017-03-28 22:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Not re-compressed sample of chm file (932.78 KB, application/octet-stream)
2012-04-26 17:58 UTC, David Kredba
Details
Sample 2 (13.91 KB, application/octet-stream)
2012-04-27 16:05 UTC, David Kredba
Details
patch for opening chm files on openSUSE (955 bytes, patch)
2012-09-20 20:00 UTC, Bogdan Cristea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kredba 2012-04-21 16:20:24 UTC
valgrind okular /home/dave2/dokumenty/doc/chemie/tox.chm 
==6290== Memcheck, a memory error detector
==6290== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==6290== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==6290== Command: okular /home/dave2/dokumenty/doc/chemie/toxicology_1ed.chm
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FE3: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290==    by 0xBB9EFD5: FcInitLoadConfigAndFonts (fcinit.c:101)
==6290==    by 0xBB9F1F4: FcInit (fcinit.c:124)
==6290==    by 0x5E4755A: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (qapplication_x11.cpp:1709)
==6290==    by 0x5DD7657: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (qapplication.cpp:842)
==6290==    by 0x5DD7D99: QApplication::QApplication(int&, char**, bool, int) (qapplication.cpp:775)
==6290==    by 0x57BC956: KApplication::KApplication(bool) (kapplication.cpp:346)
==6290==    by 0x4088A0: main (main.cpp:53)
==6290==  Address 0x10535744 is 20 bytes inside a block of size 22 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290==    by 0xBB9EFD5: FcInitLoadConfigAndFonts (fcinit.c:101)
==6290==    by 0xBB9F1F4: FcInit (fcinit.c:124)
==6290==    by 0x5E4755A: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (qapplication_x11.cpp:1709)
==6290==    by 0x5DD7657: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (qapplication.cpp:842)
==6290==    by 0x5DD7D99: QApplication::QApplication(int&, char**, bool, int) (qapplication.cpp:775)
==6290==    by 0x57BC956: KApplication::KApplication(bool) (kapplication.cpp:346)
==6290==    by 0x4088A0: main (main.cpp:53)
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FF8: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290==    by 0xBB9EFD5: FcInitLoadConfigAndFonts (fcinit.c:101)
==6290==  Address 0x1053d760 is 16 bytes inside a block of size 18 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FF8: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290==    by 0xBB9EFD5: FcInitLoadConfigAndFonts (fcinit.c:101)
==6290==  Address 0x10558948 is 40 bytes inside a block of size 42 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FE3: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290==    by 0xBB9EFD5: FcInitLoadConfigAndFonts (fcinit.c:101)
==6290==  Address 0x10562bb4 is 36 bytes inside a block of size 39 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBB9EEE6: FcInitLoadConfig (fcinit.c:67)
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FF8: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==  Address 0x105887a8 is 24 bytes inside a block of size 27 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290== 
==6290== Invalid read of size 4
==6290==    at 0xBB93FE3: FcConfigFileExists (fccfg.c:1671)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==  Address 0x10598f64 is 20 bytes inside a block of size 22 alloc'd
==6290==    at 0x4C29F0D: malloc (vg_replace_malloc.c:263)
==6290==    by 0xBB93F3C: FcConfigFileExists (fccfg.c:1652)
==6290==    by 0xBB96374: FcConfigFilename (fccfg.c:1828)
==6290==    by 0xBBA9625: FcConfigParseAndLoad (fcxml.c:2459)
==6290==    by 0xBBA9CED: FcEndElement (fcxml.c:1624)
==6290==    by 0xE3F621B: doContent (xmlparse.c:2532)
==6290==    by 0xE3F7020: contentProcessor (xmlparse.c:2105)
==6290==    by 0xE3F3EB6: doProlog (xmlparse.c:4016)
==6290==    by 0xE3F586A: prologProcessor (xmlparse.c:3739)
==6290==    by 0xE3F8E2C: XML_ParseBuffer (xmlparse.c:1651)
==6290==    by 0xBBA9780: FcConfigParseAndLoad (fcxml.c:2541)
==6290==    by 0xBBA9A87: FcConfigParseAndLoad (fcxml.c:2427)
==6290== 
okular(6290)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(6290)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(6290)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(6290)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(6290)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(6290)/okular (app) Okular::Document::openDocument: No plugin for mimetype '"application/octet-stream"'.
okular(6290)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x1c77ee40 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes. 
==6290== 
==6290== HEAP SUMMARY:
==6290==     in use at exit: 678,439 bytes in 5,140 blocks
==6290==   total heap usage: 273,295 allocs, 268,155 frees, 78,646,728 bytes allocated
==6290== 
==6290== LEAK SUMMARY:
==6290==    definitely lost: 6,036 bytes in 36 blocks
==6290==    indirectly lost: 373,812 bytes in 1,216 blocks
==6290==      possibly lost: 2,448 bytes in 7 blocks
==6290==    still reachable: 296,143 bytes in 3,881 blocks
==6290==         suppressed: 0 bytes in 0 blocks
==6290== Rerun with --leak-check=full to see details of leaked memory
==6290== 
==6290== For counts of detected and suppressed errors, rerun with: -v
==6290== ERROR SUMMARY: 10 errors from 6 contexts (suppressed: 9 from 7)

Saw it reported for KDE 4.7.4 too.

Reproducible: Always

Steps to Reproduce:
1. Ask Okular to open any .chm file
2.
3.
Actual Results:  
Fails to open file with message: No plugin for mimetype '"application/octet-stream"'

Expected Results:  
Kchmviewer level of output.

sys-devel/gcc:            4.6.3
sys-libs/glibc:           2.14.1-r3

kde-base/okular-4.8.2 was built with the following:
USE="chm crypt djvu ebook handbook jpeg (multilib) pdf ps tiff (-aqua) -debug"

Should I try a debug build? I am using -ggdb already.
Comment 1 Albert Astals Cid 2012-04-21 16:40:16 UTC
Are you sure it's a chm file? Feels like a broken setup here to me. Are you sure do you have the okular plugin for chm compiled?
Comment 2 Christoph Feck 2012-04-21 21:04:39 UTC
(NB: the valgrind issues are bugs in fontconfig, not Qt or KDE)
Comment 3 David Kredba 2012-04-24 18:07:30 UTC
It is really .chm file, kchmviewer is showing the content. I tested small and very big ones too.

Before recompiling it again with USE=chm for Okular where have I check the setup/configuration of it please?

I relogged into KDE session after I removed kchmviewer and recompiled okular to be chm file viewer.

There is the link to other bug report I saw:
https://qa.mandriva.com/show_bug.cgi?id=64679

Thank you.
Comment 4 Albert Astals Cid 2012-04-24 18:24:18 UTC
Part of the bug is that your chm file is identified as application/octet-stream, can you verify if doing
kmimetypefinder myfile.chm
does return application/vnd.ms-htmlhelp
?
Comment 5 David Kredba 2012-04-25 16:19:23 UTC
Thank you.

It returns:
application/vnd.ms-htmlhelp
(accuracy 20)

And it still fails to open it.

/usr/share/kde4/services/okularChm.desktop, /usr/share/applications/kde4/okularApplication_chm.desktop,
/usr/lib64/kde4/okularGenerator_chmlib.so files exists

What more information do you need please?
Comment 6 Albert Astals Cid 2012-04-25 16:55:50 UTC
Can i have the .chm file? It is weird that kmimetypefinder says it is application/vnd.ms-htmlhelp and we do think its an octet-stream.
Comment 7 David Kredba 2012-04-26 17:55:09 UTC
I found smaller one showing the problem. Gzipping, will attach.
When I asked Okular to offer me only chm files in file open dialog it saw the .wine/.../windows/help folder empty when 4 chm files are in. For all is kmimetypinder returning correct mime type and number 20.

Thank you.
Comment 8 David Kredba 2012-04-26 17:58:57 UTC
Created attachment 70675 [details]
Not re-compressed sample of chm file
Comment 9 Albert Astals Cid 2012-04-26 18:23:10 UTC
That's not a chm file, that's a webpage. 

Do you have any other chm file that fails to open that is really a chm file? You can distinguish chm files beucase if you open them with a text editor they look like total garbage.
Comment 10 David Kredba 2012-04-27 16:04:24 UTC
Found one very small demonstrating the problem. Attached.

file ./wul.chm 
./wul.chm: MS Windows HtmlHelp Data

application/vnd.ms-htmlhelp
(accuracy 20)

Thank you.
Comment 11 David Kredba 2012-04-27 16:05:13 UTC
Created attachment 70709 [details]
Sample 2
Comment 12 Albert Astals Cid 2012-04-27 22:09:46 UTC
I can open it without any problem here.
Comment 13 David Kredba 2012-04-28 06:19:29 UTC
OK, so what next I have to test please?
Okular not offers for me .chm files in fie open dialog and it not opens them.
I can easily revert to kchmviewer but I like to have full fuetured Okular/Dolphin instead.
Thank you.
Comment 14 Albert Astals Cid 2012-04-28 13:11:06 UTC
Attach the output of 
ktraderclient --servicetype okular/Generator
Comment 15 David Kredba 2012-04-30 15:13:19 UTC
Thank you.
I deleted practically all from .confg, .local, .cache and .kde4 to get fresh config files before calling it. And rebooted machine.
Here it is:

servicetype is : okular/Generator
got 16 offers.
---- Offer 0 ----
X-KDE-Priority : '2'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'chmlib'
Comment : 'Implementace HTML nápovědy Windows pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-chm'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_chmlib'
DesktopEntryPath : 'libokularGenerator_chmlib.desktop'
DesktopEntryName : 'libokulargenerator_chmlib'
Keywords : ''
Categories : ''
---- Offer 1 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Plucker dokument'
Comment : 'Implementace Plucker pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/prs.plucker'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_plucker'
DesktopEntryPath : 'libokularGenerator_plucker.desktop'
DesktopEntryName : 'libokulargenerator_plucker'
Keywords : ''
Categories : ''
---- Offer 2 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Mobipocket dokument'
Comment : ' Implementace Mobipocket pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-mobipocket-ebook'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_mobi'
DesktopEntryPath : 'libokularGenerator_mobi.desktop'
DesktopEntryName : 'libokulargenerator_mobi'
Keywords : ''
Categories : ''
---- Offer 3 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'OpenDocument Presentation Document'
Comment : 'Odp pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/vnd.oasis.opendocument.presentation - application/vnd.ms-powerpoint - application/vnd.openxmlformats-officedocument.presentationml.presentation'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_odp'
DesktopEntryPath : 'libokularGenerator_odp.desktop'
DesktopEntryName : 'libokulargenerator_odp'
Keywords : ''
Categories : ''
---- Offer 4 ----
X-KDE-Priority : '4'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Knihovna TIFF pro Okular'
Comment : ' Implementace TIFF pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - image/tiff'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_tiff'
DesktopEntryPath : 'libokularGenerator_tiff.desktop'
DesktopEntryName : 'libokulargenerator_tiff'
Keywords : ''
Categories : ''
---- Offer 5 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Faxové dokumenty'
Comment : 'Implementace G3/G4 Fax pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - image/fax-g3 - image/g3fax'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_fax'
DesktopEntryPath : 'libokularGenerator_fax.desktop'
DesktopEntryName : 'libokulargenerator_fax'
Keywords : ''
Categories : ''
---- Offer 6 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Poppler'
Comment : 'Implementace PDF pro Okular používající poppler'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-pdf - application/pdf - application/x-wwf'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_poppler'
DesktopEntryPath : 'libokularGenerator_poppler.desktop'
DesktopEntryName : 'libokulargenerator_poppler'
Keywords : ''
Categories : ''
---- Offer 7 ----
X-KDE-Priority : '2'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'djvu'
Comment : 'Implementace DjVU pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - image/vnd.djvu'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_djvu'
DesktopEntryPath : 'libokularGenerator_djvu.desktop'
DesktopEntryName : 'libokulargenerator_djvu'
Keywords : ''
Categories : ''
---- Offer 8 ----
X-KDE-Priority : '4'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Modul XPS pro Okular'
Comment : 'Implementace XPS pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/oxps - application/vnd.ms-xpsdocument'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_xps'
DesktopEntryPath : 'libokularGenerator_xps.desktop'
DesktopEntryName : 'libokulargenerator_xps'
Keywords : ''
Categories : ''
---- Offer 9 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Kniha komiksů'
Comment : 'Implementace Knihy komiksů pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-cbz - application/x-cbr - application/x-cbt - inode/directory'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_comicbook'
DesktopEntryPath : 'libokularGenerator_comicbook.desktop'
DesktopEntryName : 'libokulargenerator_comicbook'
Keywords : ''
Categories : ''
---- Offer 10 ----
X-KDE-Priority : '2'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'dvi'
Comment : 'Implementace DVI pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-dvi'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_dvi'
DesktopEntryPath : 'libokularGenerator_dvi.desktop'
DesktopEntryName : 'libokulargenerator_dvi'
Keywords : ''
Categories : ''
---- Offer 11 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'EPub dokument'
Comment : 'Implementace Epub pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/epub+zip'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_epub'
DesktopEntryPath : 'libokularGenerator_epub.desktop'
DesktopEntryName : 'libokulargenerator_epub'
Keywords : ''
Categories : ''
---- Offer 12 ----
X-KDE-Priority : '2'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'TRUE'
Type : 'Service'
Name : 'Ghostscript'
Comment : 'Implementace Ghostscript PS/PDF pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/postscript - image/x-eps'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_ghostview'
DesktopEntryPath : 'libokularGenerator_ghostview.desktop'
DesktopEntryName : 'libokulargenerator_ghostview'
Keywords : ''
Categories : ''
---- Offer 13 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'FictionBook dokument'
Comment : 'Implementace FictionBook pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/x-fictionbook+xml'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_fb'
DesktopEntryPath : 'libokularGenerator_fb.desktop'
DesktopEntryName : 'libokulargenerator_fb'
Keywords : ''
Categories : ''
---- Offer 14 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'OpenDocument formát'
Comment : 'Implementace OpenDocument pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - application/vnd.oasis.opendocument.text'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_ooo'
DesktopEntryPath : 'libokularGenerator_ooo.desktop'
DesktopEntryName : 'libokulargenerator_ooo'
Keywords : ''
Categories : ''
---- Offer 15 ----
X-KDE-Priority : '1'
X-KDE-okularAPIVersion : '1'
X-KDE-okularHasInternalSettings : 'FALSE'
Type : 'Service'
Name : 'Knihovny obrázků KDE'
Comment : 'Implementace obrázků pro Okular'
Invalid property GenericName
Invalid property Icon
Invalid property Exec
Terminal : 'FALSE'
Invalid property TerminalOptions
Invalid property Path
ServiceTypes : 'okular/Generator - image/bmp - image/x-dds - image/x-eps - image/x-exr - image/gif - image/x-hdr - image/x-ico - image/jp2 - image/jpeg - video/x-mng - image/x-portable-bitmap - image/x-pcx - image/x-portable-graymap - image/png - image/x-portable-pixmap - image/x-psd - image/x-rgb - image/x-tga - image/tiff - image/x-xbitmap - image/x-xcf - image/x-xpixmap'
AllowAsDefault : 'TRUE'
InitialPreference : '1'
Library : 'okularGenerator_kimgio'
DesktopEntryPath : 'libokularGenerator_kimgio.desktop'
DesktopEntryName : 'libokulargenerator_kimgio'
Keywords : ''
Categories : ''
Comment 16 Albert Astals Cid 2012-04-30 16:52:09 UTC
Which shared-mime-info package do you have installed? Does /usr/share/mime/packages/freedesktop.org.xml contain
  <mime-type type="application/vnd.ms-htmlhelp">
with
    <glob pattern="*.chm"/>
    <alias type="application/x-chm"/>
inside it?
Comment 17 Max Lin 2012-05-03 03:30:58 UTC
I confirmed same behavior on openSUSE with KDE 4.8.2, my test result below
mlin@linux-l3xy:~ $ okular -v
Qt: 4.8.1
KDE Development Platform: 4.8.2 (4.8.2) "release 494"
Okular: 0.14.2
mlin@linux-l3xy:~ $ kmimetypefinder ~/Downloads/wul.chm 
application/vnd.ms-htmlhelp
(accuracy 20)

the interest part when I open the sample file with debug mode enable, 
mlin@linux-l3xy:~ $ okular ~/Downloads/wul.chm 
okular(11011)/kdecore (trader) KMimeTypeTrader::query: query for mimeType  "application/vnd.ms-htmlhelp" ,  "okular/Generator"  : returning  0  offers
okular(11011)/kdecore (trader) KMimeTypeTrader::query: query for mimeType  "application/octet-stream" ,  "okular/Generator"  : returning  0  offers
okular(11011)/okular (app) Okular::Document::openDocument: No plugin for mimetype '"application/octet-stream"'.

and I have 
    <mime-type type="application/vnd.ms-htmlhelp"> 
with
    <glob pattern="*.chm"/>
    <alias type="application/x-chm"/>
inside of freedesktop.org.xml
Comment 18 David Kredba 2012-05-05 12:45:35 UTC
Inthe meantime I compiled KDE 4.8.3. Okular 0.14.3 fails the same way.

I have x11-misc/shared-mime-info-1.0 installed.

There is:
<mime-type type="application/vnd.ms-htmlhelp">
    <comment>CHM document</comment>
    <comment xml:lang="cs">Dokument CHM</comment>
    <acronym>CHM</acronym>
    <expanded-acronym>Compiled Help Modules</expanded-acronym>
    <generic-icon name="x-office-document"/>
    <glob pattern="*.chm"/>
    <alias type="application/x-chm"/>

in the /usr/share/mime/packages/freedesktop.org.xml file.

Thank you.
Comment 19 Albert Astals Cid 2012-06-06 21:07:08 UTC
Can you please confirm which version of kdelibs you have installed?
Comment 20 David Kredba 2012-06-07 11:39:03 UTC
Now I have Gentoo's kdelibs-4.8.3 built with gcc-4.7.0.
Thank you.
Comment 21 Albert Astals Cid 2012-06-07 21:25:07 UTC
And you still have this problem?
Comment 22 David Kredba 2012-06-18 13:40:05 UTC
Yes, I have.

I started with completely fresh profile and it is still the same.

I am waiting for Gentoo KDE 4.8.4 release to see if it will start to work.
Comment 23 Albert Astals Cid 2012-06-18 20:54:56 UTC
Anyone else having this problem with a moderately "modern" distro/KDE versions that is not gentoo? To be honest i don't feel like installing gentoo with all the associated time this means to reproduce this bug.
Comment 24 Max Lin 2012-06-19 03:35:05 UTC
Yes, I can reproduced it on openSUSE 12.1 with KDE 4.8.4
Comment 25 Albert Astals Cid 2012-06-24 22:55:36 UTC
How do i get 4.8.4 on opensuse 12.1? Afer installing in a virtual machine + running yum update my okular is stuck at 0.13.2
Comment 26 Bogdan Cristea 2012-06-25 07:24:50 UTC
Tested on openSUSE 12.1, x86_64, with Qt 4.7.4 and KWin 4.7.2, release 5. Okular compiled from sources, master branch, chmlib and chmlib-devel installed. Able to open a pdf document, but not the attached chm file.
Comment 27 Max Lin 2012-06-25 07:44:25 UTC
@Albert
I am not sure how to use yum in openSUSE, but for using zypper, follow below
1) zypper ar -c http://download.opensuse.org/repositories/KDE:/Release:/48/openSUSE_12.1/  KR48
2) zypper ref
3) zypper dup --from KR48

then you can get the latest 4.8.x packages installed with okular 0.14.3
Comment 28 Bogdan Cristea 2012-09-20 17:19:19 UTC
I have been able to go one step further by changing in libokularGenerator_chm.desktop so that

MimeType=application/x-chm;application/vnd.ms-htmlhelp;

Now, when I open the attached chm file I get the error:

Could not start process Unable to create io-slave: klauncher said: 'Error loading kio_msits'

I am using openSUSE 12.1, x86_64, and okular is compiled from sources (master branch)
Comment 29 Bogdan Cristea 2012-09-20 19:54:08 UTC
In my previous comment I have forgotten to mention the the install path was in the home folder ${okular_srs}/bin and the env variable KDEDIRS has been set, then kbuildsyscoca4 has been run. In this configuration kio_msits.so is not found even if it is installed under ${okular_srs}/bin folder.

I have also compiled okular using CMAKE_INSTALL_PREFIX=/usr and this time I have been able to open the attached chm file. Not sure why with a local installation folder chm files are not opened.

I have attached a patch against the sources from master which seems to solve this issue on openSUSE 12.1 x86_64
Comment 30 Bogdan Cristea 2012-09-20 20:00:24 UTC
Created attachment 74056 [details]
patch for opening chm files on openSUSE
Comment 31 Albert Astals Cid 2012-09-21 16:11:19 UTC
This patch is wrong. application/x-chm and application/vnd.ms-htmlhelp are the same thing as described by freedesktop.org.xml shared mime package
Comment 32 Fabio D'Urso 2014-05-08 15:04:57 UTC
Any news about this bug? Can any of you guys that could reproduce this bug please test if it still happens with Okular >= 0.19.0 (KDE >= 4.13.0)?
Thanks for caring about Okular :)
Comment 33 Albert Astals Cid 2017-03-28 22:26:24 UTC
No answer for years