Bug 332746 - pdf documents not shown: page size = inf
Summary: pdf documents not shown: page size = inf
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Unclassified
Component: PDF backend (show other bugs)
Version: 0.18.95
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 18:16 UTC by Luis Silva
Modified: 2014-04-02 22:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0


Attachments
Screenshot illustrating the problem. (55.99 KB, image/png)
2014-03-28 18:17 UTC, Luis Silva
Details
Output of "kscreen-console bug" (8.22 KB, text/plain)
2014-04-02 02:14 UTC, Luis Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Silva 2014-03-28 18:16:42 UTC
Okular does not show pdf documents anymore. All other types of document are shown correctly.
When launched from a terminal in debug mode I have the following informations:

okular(20856): BEGIN: Loading backend
This backend is only for XRandR 1.1, your version is:  1 . 4 
okular(20856)   BackendLoader::init: Skipping "XRandR 1.1" backend
okular(20856)   BackendLoader::init: Loading "XRandR" backend
okular(20856): END__: Loading backend [Took: 0.038s]
okular(20856) Okular::Utils::realDpi: Found widget at output # 83
okular(20856) Okular::Utils::realDpi: Output DPI is  QSizeF(inf, inf)

followed by several lines like:
okular(20856)/okular (app) Okular::Document::requestPixmaps: request observer=0x29d62e8 832x-2147483648@0



Reproducible: Always

Steps to Reproduce:
1. Open a pdf document.
2.
3.
Actual Results:  
The document is not displayed and the status bar shows the size to be a NaN. I attach a screenshot illustarting the problem.
Comment 1 Luis Silva 2014-03-28 18:17:28 UTC
Created attachment 85814 [details]
Screenshot illustrating the problem.
Comment 2 Albert Astals Cid 2014-03-30 23:59:40 UTC
Do you know how to recompile okular? Would you able to compile it adding 
kDebug() << "Output size is " << szMM;
after the line
QSize szMM = selectedOutput->sizeMm();
in core/utils.cpp ?
Comment 3 Luis Silva 2014-04-01 01:59:50 UTC
I just recompiled master () which has the patch you asked me to apply. Here is the output on the command line:

okular(14783): BEGIN: Loading backend
This backend is only for XRandR 1.1, your version is:  1 . 4 
okular(14783)   BackendLoader::init: Skipping "XRandR 1.1" backend
okular(14783)   BackendLoader::init: Loading "XRandR" backend
okular(14783): END__: Loading backend [Took: 0.038s]
okular(14783) Okular::Utils::realDpi: Found widget at output # 83
okular(14783) Okular::Utils::realDpi: Output size is  QSize(0, 0)
okular(14783) Okular::Utils::realDpi: Output DPI is  QSizeF(inf, inf)
Comment 4 Luis Silva 2014-04-01 02:01:35 UTC
I'm compiling from master (8ee72f).
Comment 5 Albert Astals Cid 2014-04-01 07:44:20 UTC
Thanks this is useful :)
Comment 6 Albert Astals Cid 2014-04-01 23:33:52 UTC
One more thing, can you please run
kscreen-console bug
on a terminal and attach the output?
Comment 7 Luis Silva 2014-04-02 02:14:43 UTC
Created attachment 85895 [details]
Output of "kscreen-console bug"
Comment 8 Luis Silva 2014-04-02 02:17:47 UTC
I just added the output you requested.
Something else that might help and that I had not noticed before: the file preview widget in kile (okular based) is working perfectly fine. The document preview in kbibtex (also okular based), however, simply does not work.
I hope this information helps.
Comment 9 Albert Astals Cid 2014-04-02 22:43:46 UTC
Git commit a7f3a1ac37af94af5078051ceb5b310fb93194ed by Albert Astals Cid.
Committed on 02/04/2014 at 22:42.
Pushed by aacid into branch 'KDE/4.13'.

Protect us against broken drivers/screens

Some drivers screens return 0x0 as their screen size so we can't use it
to calculate the dpi
Related: bug 332494
FIXED-IN: 4.13.0

M  +17   -9    core/utils.cpp

http://commits.kde.org/okular/a7f3a1ac37af94af5078051ceb5b310fb93194ed