Tk Source Code

View Ticket
Login
Ticket UUID: a1802dc77b5101667291a6abaf2b309bddfa975e
Title: Lots of textDisp.test fail
Type: Bug Version: revised_text
Submitter: fvogel Created on: 2023-07-14 08:15:41
Subsystem: 18. [text] Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-07-15 07:36:18
Resolution: Fixed Closed By: fvogel
    Closed on: 2023-07-15 07:36:18
Description:

Since [4d7c841d31ee3678] (as revealed by bisection), in the revised_text branch 53 tests are failing in textDisp.test on macOS (not on Linux or Windows).

With the commit just before, only 3 textDisp.test were failing on macOS.

User Comments: fvogel added on 2023-07-15 07:36:18:
Tests now pass at GitHub actions . I'm closing this ticket now.

fvogel added on 2023-07-14 14:07:00:

Yeah. IMO what remains fundamentally broken is described in [this ticket]. The interest of the test suite on the mac is totally void since what gets logged and whats gets drawn are two different things...


marc_culler (claiming to be Marc Culler) added on 2023-07-14 14:02:19:
Wow.  That would make a big difference in what got logged.  It also might
give a hint about the difference between update and update idletasks --
perhaps update forces Tk into exposing everything and calling [NSView drawRect] in the middle of a test, even though nothing is damaged.  Of
course when that extra drawing also forces extra logging in the test
apparatus, test failures are to be expected.

fvogel added on 2023-07-14 13:42:56:

The problem seems to have more or less originated from [6ceb71854f951e78]. Merges are hard...


fvogel added on 2023-07-14 13:37:20:

Got it!

The fix is [11905189]. Now I get... zero!! failures in textDisp.test on macOS with the revised_text branch.


marc_culler (claiming to be Marc Culler) added on 2023-07-14 13:29:15:
That puzzles me too.  There must be some basic difference in how the display
is done, but I don't know what that is.

fvogel added on 2023-07-14 13:08:55:

Yes. I have confirmed this as well on my side.

Digging further in the history, this was originally done in [da12b404fad6427f] and then it propagated in core-8-6-branch, trunk, and revised_text through forward merges.

This commit made XSync a no-op on Aqua (again). This was correct I think.

What puzzles me right now is why trunk has no problem with using 'update' (not update idletasks) in textDisp.test, whereas in the same situation the revised text widget triggers lots of tests failures.


marc_culler (claiming to be Marc Culler) added on 2023-07-14 12:27:48:

My guess is that the cause was the removal of these calls to update idletasks from the delay procedure:

if {[tk windowingsystem] == "aqua"} { proc updateText {} { update idletasks } proc delay {} { update idletasks after 100 update idletasks

On macOS, update is very often not a substitute for update idletasks. (I know this is a difficult thing to accept, but true nonetheless.)