Le 17/12/2024 à 23:07, Jean-Marc Lasgouttes a écrit :
Le 17/12/2024 à 23:01, Pavel Sanda a écrit :
On Tue, Dec 17, 2024 at 10:38:08PM +0100, Pavel Sanda wrote:
Hi,

this happened couple times today in the particular document, which loads ton of pdf images, somewhere in the middle of initial loading and scrolling (at the same time).

I'll try to come up with some recipe, but it seems very hard to reproduce on demand, I need to load it like 20x to get it again with some lucky random scrolling pattern.

Combination of page up/downs seems to be enough to triggers this. And cache needs to be clean before running so the convertor mechanisms take time to load.

Thanks for the backtrace. So is it only a thing in branch? Note that the assertion in ParagraphMetrics::position() is new, so this might be an old problem that we detect only now.

The patch below should fix the symptom, and I think there is no other cause to cure. I am not sure, though, since I do not understand this beforeDisplayPosX stuff.

Pavel, could you try it out?

Could you also confirm whether this is branch-only ? This would be surprising and point to a missing update somewhere, requiring a different approach.

JMarc

diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index fa844b2946..58647f7c49 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -772,7 +772,8 @@ bool Cursor::getStatus(FuncRequest const & cmd, FuncStatus & status) const
 
 void Cursor::saveBeforeDispatchPosXY()
 {
-	getPos(beforeDispatchPosX_, beforeDispatchPosY_);
+	if (bv().paragraphVisible(*this))
+		getPos(beforeDispatchPosX_, beforeDispatchPosY_);
 }
 
 
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to