Bug 112405 - embedded kghostview part shows pages out of order (standalone kghostview works)
Summary: embedded kghostview part shows pages out of order (standalone kghostview works)
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-11 06:34 UTC by mathpup
Modified: 2014-05-08 08:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (52.34 KB, image/png)
2006-05-09 22:01 UTC, mathpup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mathpup 2005-09-11 06:34:30 UTC
Version:           1.8.1 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 3.3.5 
OS:                Linux

When I use QuickBuild to invoke LaTeX, DVItoPS, and then ViewPS, sometimes the pages numbers are out of order. For example, I have just used QuickBuild to build and view an eight-page document. Kile says that it is looking at page 1, but it is actually page 8 of the document. If I move to what Kile claims is page 2, it is actually page 1 of the document.

This does not occur every time, but it occurs often enough to be annoying. Also, invoking QuickBuild again seems to produce a view of the document with the pages in the correct order.

I first started noticing this about a month ago when I upgraded my machine. I am wondering if there is some kind of race condition or similar issue that is causing the problem.
Comment 1 R (Chandra) Chandrasekhar 2006-01-16 09:04:11 UTC
I have experienced the same problem.  Quickbuild results in a kdvi display of the pages.  The first page shows up as is, the second and third pages are in "continuous-facing" mode, even if the View Mode is "continuous" by default.  After clicking "continuous-facing" and then clicking back to "continuous" under View Mode, this problem disappears and the pages appear in ordinal sequence when I scroll down.  This bug is annoying, and because it affects productivity, should be fixed soon.  Thanks.
Comment 2 Thomas Braun 2006-05-05 17:33:20 UTC
Hi,

I can't reproduce the pages out of order bug here (KDE 3.5.2 and kile 1.9).
Also the second bug, although in kdvi and not in kile, is not reproducible here.

Thanks for your report

Thomas Braun
Comment 3 mathpup 2006-05-06 06:45:33 UTC
I am not sure what to say. I still run into the problem with KDE (3.5 branch) 
and Kile from recent SVN (early May 2006). I do not know how to provide any 
additional information. I just know that the pages are still annoyingly out 
of order much of the time. I wonder if this is a race condition? Also, I did 
not notice this problem until I moved from an Athlon 1100 to an Athlon64 
3500+.

> ------- Additional Comments From braun physik fu-berlin de  2006-05-05
> 17:33 ------- Hi,
>
> I can't reproduce the pages out of order bug here (KDE 3.5.2 and kile 1.9).
> Also the second bug, although in kdvi and not in kile, is not reproducible
> here.

Comment 4 Thomas Braun 2006-05-06 10:08:11 UTC
There is a bug in the BTS 69427, which seems to be to the same than you describe.
Is it possible to attach an example ps file ?

At the submitter of the first comment (R Chandrasekhar).
If your problem is present also now please open a new bug report against kdvi, because this is a different bug.

Thanks
Thomas
Comment 5 mathpup 2006-05-08 07:45:35 UTC
The pages of the postscript file do display in the correct order in 
kghostview, gv, gs, etc. They just display in the wrong order inside Kile.

To reiterate, I am looking at Kile's window right now. The left side of the 
window show thumbnail views of the various pages, and the main part of the 
window has the current page. The preview shows all the pages in the correct 
order, but the main part of the window shows page 14 instead of page 1. If I 
move to the second page, I see page 14. On the third page, I see page 2. This 
really looks like an off-by-one bug that's caused by some kind of race 
condition. If I hit ALT+1 to rebuild and preview the document several times, 
eventually, it does show the pages in the correct order. 

The bug 69427 is about kghostview.

> ------- Additional Comments From braun physik fu-berlin de  2006-05-06
> 10:08 ------- There is a bug in the BTS 69427, which seems to be to the
> same than you describe. Is it possible to attach an example ps file ?
>
> At the submitter of the first comment (R Chandrasekhar).
> If your problem is present also now please open a new bug report against
> kdvi, because this is a different bug.

Comment 6 Thomas Braun 2006-05-08 18:21:20 UTC
I think I got confused,

about what embedded viewer are we talking ?
kghostiew ? Are there other viewer able to embed in kile ?

Thanks
Thomas

PS: A screenshot would be nice :)
Comment 7 mathpup 2006-05-09 22:01:59 UTC
Created attachment 15993 [details]
Screenshot

Notice that the thumbnail view on the left shows the first page of the
document, but the full-size view in the main part of the window is clearly a
different page (page 5, actually).

The embedded viewer is kghostview. Again, if I redo the QuickBuild (LaTeX,
DVItoPS, ViewPS) a few times, the pages eventually come out consistent in the
kghostview embedded part.
Comment 8 Thomas Braun 2006-05-09 22:56:44 UTC
What you see in the header in your document is the page number latex assignes to the page. Because this can change latex needs depending on the situations a few runs to get the correct page number.

Try e.g.:
\documentclass[a4paper,10pt]{article}
\setcounter{page}{13}
\begin{document}

Hello


\end{document}

You now get always in the footer the page number 13, because the command \setcounter sets the page number to 13.
And this will be always the first page in any viewer.

I can only suggest to have a look in something like "Latex Companion".

Regards,
Thomas
Comment 9 mathpup 2006-05-11 14:01:51 UTC
I am not talking about page numbers being shown incorrectly. The pages are 
actually rendered in the wrong order in Kile's preview main view but not in 
the thumbnail view.
Comment 10 mathpup 2006-05-11 14:01:51 UTC
But the externally generated PS file is always correct. Kile (via the 
kghostview part) just displayed it in the wrong order sometimes. If I look at 
the DVI and the PS file, they are always correct.


> ------- Additional Comments From braun physik fu-berlin de  2006-05-09
> 22:56 ------- What you see in the header in your document is the page
> number latex assignes to the page. Because this can change latex needs
> depending on the situations a few runs to get the correct page number.
>
> Try e.g.:
> \documentclass[a4paper,10pt]{article}
> \setcounter{page}{13}
> \begin{document}
>
> Hello
>
>
> \end{document}
>
> You now get always in the footer the page number 13, because the command
> \setcounter sets the page number to 13. And this will be always the first
> page in any viewer.
>
> I can only suggest to have a look in something like "Latex Companion".

Comment 11 Thomas Braun 2006-05-30 15:20:53 UTC
Reassigning this bug to the kghostview maintainer.

Thanks for your information so far :)
Comment 12 Adrián Chaves (Gallaecio) 2012-10-16 17:18:25 UTC
Does this affect Okular?
Comment 13 Albert Astals Cid 2014-05-08 08:31:30 UTC
No answer for years.