From: Francois V. <fvo...@fr...> - 2024-09-06 22:31:21
|
Le 06/09/2024 à 22:15, Francois Vogel a écrit : > > However the assert triggers on macOS when configuring Tk with > --enable-symbols=mem --disable-aqua and running textIndex.test _under > xvfb_. > Some news: - This is not always reproducible. Sometimes the assert triggers sometimes not. But it's easy to get (happens ~50% of the runs). - When the assert triggers during textIndex-19.12.2, string values of indexPtr1 and indexPtr2 in TkTextIndexCountBytes() are 3.40 and 3.39 respectively. This is indeed not supposed to happen (one should have TkTextIndexCompare(indexPtr1, indexPtr2) <= 0, i.e. ordered indices). - The call to TkTextIndexCountBytes() that leads to the assert triggering is in TkrTextIndexForwBytes() (tkTextIndex.c:3085). This line reads: assert(!rc || (int) TkTextIndexCountBytes(&index, dstPtr) == byteCount); - At this point, the string values are index = 3.40 and dstPtr = 3.39. dstPtr is computed the line just before by: rc = TkBTreeMoveForward(dstPtr, byteCount); At this point, byteCount is... -1 !! This is not supposed to happen. Never. Because the case byteCount < 0 is ruled out a bit before in that same function TkrTextIndexForwBytes() as follows: if (byteCount < 0) { TkrTextIndexBackBytes(textPtr, srcPtr, -byteCount, dstPtr); return 0; } This is very mysterious to me. Any idea? Regards, Francois |