Summary: | Crash when zooming 400% on PDF | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Christoph Feck <cfeck> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aacid, fabiodurso, mailson |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/okular/466e402d9ee320f41ba85b39f2a5d43615860c5c | Version Fixed In: | |
Attachments: |
PDF that causes crash
Naïve patch |
Description
Christoph Feck
2012-12-06 03:19:03 UTC
Created attachment 75648 [details]
PDF that causes crash
@Christoph: I can't reproduce it here. Are you doing something special (e.g. scrolling/zooming in a particular sequence)? @Mailson: Can you have a look? Seems it's Q_ASSERT( !r->normalizedRect().isNull() ); from commit ce7d96d firing I just open it with default "Fit to Width" zoom, then change it to "400%" in toolbar. What might be unusual in my setup is the rotated screen. Okular window is 768x1024, not 1024x768. Actually, I see that practically all PDF crash when zooming in at 400%. A single-page PDF, however, can be zoomed in to 1600% without a crash, so I doubt it is a memory issue. When disabling mentioned assert, Okular works as expected. Christoph sorry, my fault, I had assertions disabled. It couldn't happen :D Mailson: I've made some tests and it seems that the failed assertion is triggered by preload requests issued by PageView.cpp lines 4172-4185 and 4204-4217. If I read the code correctly we're setting a null request rectangle if (intersectionRect.isEmpty() && !pageHasTilesManager), do we? Fabio, Yes you're right. The thing is, we shouldn't have that Q_ASSERT since there may be requests for non-visible pages. In that case we end up with a null normalized rect. I remember discussing about that assert and you guys agreed we needed it, if we don't, please remove it, though i am usunsure why a non-visible page should have the normalized rect empty, can you clarify on that? Created attachment 75806 [details]
Naïve patch
I'm not sure i fully understand the intent of those rects over there, but isn't this enough? If we don't have an interesection because we are just preloading a page that is not in the viewport, then well, assume we just want to preload it all and give a 0,0,1,1 normalized rect, no?
Comments? Mailson? Fabio?
Git commit 466e402d9ee320f41ba85b39f2a5d43615860c5c by Fabio D'Urso, on behalf of Mailson Menezes. Committed on 08/12/2012 at 20:02. Pushed by fabiod into branch 'master'. Remove assertion of request normalized rect normalizedRect is null if the requested page is not visible M +6 -3 core/document.cpp http://commits.kde.org/okular/466e402d9ee320f41ba85b39f2a5d43615860c5c |