Tk Source Code

View Ticket
Login
Ticket UUID: 40a9abb9db638d0186f9b0dc0b124255e6b2e582
Title: Mac OS X: revised_text: peered widgets display as black until clicked
Type: Bug Version: 8.6, revised_text
Submitter: bll Created on: 2017-06-13 03:07:02
Subsystem: 66. Aqua Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2017-11-07 20:58:22
Resolution: Fixed Closed By: fvogel
    Closed on: 2017-11-07 20:58:22
Description:
From the Tk widget demo, textpeer.tcl.
Using this script on Mac OS X and the second peer turns black.

text .t1 -height 5 -width 20
pack .t1
.t1 insert end {Four score and seven years ago I was not alive.}
update
.t1 peer create .t2 -height 5 -width 20
pack .t2
update
.t2 peer create .t3 -height 5 -width 20
pack .t3
User Comments: fvogel added on 2017-11-07 20:58:22:
Merged to core-8-6-branch and trunk. Many thanks to Marc Culler!

fvogel added on 2017-11-01 19:57:24:

Further work was done (better fix) by Marc Culler in branch OSX_redraw_artifacts.

I have checked that in the current state of that branch, i.e. at [2174f54d], the issue reported in the present ticket still does not happen (checked on OS X of course, but also on Win and Linux), which means that this further work did not inadvertently break the original fix.

I will merge the OSX_redraw_artifacts branch soon.


fvogel added on 2017-10-15 13:58:42:

Confirmed fixed (tested in OSX_redraw_artifacts).

Also, I have changed again the "subsystem" field of this ticket, since this was no "well known problem with the event loop issues under OS X", contrary to what was stated in the comments below.


bll added on 2017-10-13 21:44:55:
Confirmed fixed.

fvogel added on 2017-10-13 20:30:06:

Marc Culler has provided a patch that got committed to branch bug-fab5fed65e as well as core-8-6-branch and trunk.

Worth to be tested, it is believed this is fixed.


stevenaaus added on 2017-08-19 23:09:22:
Sorry, the relevant pics are attached to another thread
http://core.tcl.tk/tk/info/92e614e612b94686
I won't duplicate them here

stevenaaus added on 2017-08-19 22:16:17:
(Ok... I have gotten log-in to work. The web interface is not working very well for me, sorry)

Gregor wrote "Finally, there is nothing to do from the text widget point of view. It should be clear that the Mac interface (macosx/) needs some rework."

Yes, this sums it up nicely. There are absolutely zero rendering issues with the linux and windows versions. And there are multiple rendering issues with OS X Cocoa not related to the revised text widget, as the missing "comment editor" and misrendered "main board" screenshots clearly show.

bll added on 2017-08-19 15:58:03:
Acts identically with standard 8.6.7 (MacPorts).

With the 8.5.9 that comes with the mac, displays very nicely, no problems.

Two months ago, this was probably build with tcl 8.6.6.

bll added on 2017-08-19 15:54:17:
All of those nasty displays that I attached clear up when clicking in the text widget peer.  

After resizing, the display is a mess, and then clicking in each text peer individually cleans up that particular peer's display.

fvogel added on 2017-08-19 15:52:39:
Much worse? I don't understand how this is possible. You opened this ticket two months ago and I don't see what change (in the macosx folder, the only changed file in this timeframe is macosx/tkMacOSXDialog.c) could trigger this worsening. That's strange.

If it's really much worse now than at the time you opened this ticket, could you please try bisecting and identify the faulty commit?

I'm wondering: Did it ever work on OS X with Cocoa? Or did we always have such refresh problems with Cocoa?

We are told below that there is no such effects with Carbon on 8.5.9.

bll added on 2017-08-19 15:45:28:
I ran through all the widget demos, and they generally look fine.
I think I saw one artifact with one of the text widget demos.
And the peering demo still comes up with a black box once, but is otherwise usable.
The test code included in this ticket however has serious issues.

bll added on 2017-08-19 15:30:50:
Wow.
It is much worse now.
This simple demo is not usable at all, no matter how the window is resized.
Tested with 8.6.7 and the revised_text branch.

bll added on 2017-08-19 15:08:14:
I will re-test with 8.6.7 and see if anything changed.

fvogel added on 2017-08-19 08:44:18:
Thanks for the comments and snapshots. I change the category of this ticket accordingly. I find especially interesting the observation that with 8.5.9 there are no issues.

Regarding your comment:
> reported the problems (and ignored by the TCT as usual)

You have been explained already several times and in details that the TCT does not ignore anything. It's just that the TCT is a very small team with limited time, and regarding Tk in particular there are even less members of this TCT that maintain Tk. So I kindly ask you to stop propagating such grossly wrong statements.

gcramer added on 2017-08-19 08:02:19:

This is the well known problem with the event loop issues under OS X. The revised text widget has not changed this behavior, but it's clear that you can find different test cases for the revised version and the legacy version.

I'm referencing a comment from Steven Atkinson, the developer from Scid vs PC, he has some years experience with the text widget under Mac, and has sometimes reported the problems (and ignored by the TCT as usual), and he has not the privileges to post to the bug reports with his account:

These are just null bug reports. All artifacts have multiple rendering issues on OS X with Cocoa. It is why it is unusable for me. When the processor is busy, artifacts are more common, but the CPULoad<->renderingBugsNumber is not directly related. Bottom line is the event loop is badly broken. Attached (pic 1) is the latest artifacts i noticed (Main board is not properly displayed).
The peer widgets issue is related. Whole widgets inside SCID's paned windows are not drawn. Pic 2 shows a new comment editor window which should be drawn perfectly, but is totaly missing, simliar to one of the bug reports, but has many included widgets, including 10 buttons and a few frames, all of which are not shown.
Pic 3 shows how the comment editor should look, but it also shows a totally broken PGN window.The top half has not be redrawn since switching panes from the gamelist.
There does seem to be different rendering anomalies with the revised text widget installed, but IMO this is just a consequence of it running faster, and event loop flow changing. None of these abberations are with Carbon wish 8.5.9.
For example, with revised tktext installed, the buttons on the engine window render much better.

I have attached his screenshots (in bug report 92e614e612).

Finally, there is nothing to do from the text widget point of view. It should be clear that the Mac interface (macosx/) needs some rework.


Attachments: