Partial updates on GTK 3.24.31

14 views
Skip to first unread message

Neil Hodgson

unread,
Mar 27, 2022, 4:43:01 AM3/27/22
to Scintilla mailing list
On the latest release of Fedora 35 with GTK 3.24.31, Scintilla/SciTE doesn’t always update all of the text when switching files. This is bug #2322
https://sourceforge.net/p/scintilla/bugs/2322/

I’ve been seeing this for a while and thought it was a recent regression, possibly related to change set 9076 (Fix re-entrant painting to maintain update region). Finally had time to investigate and the bug occurs back to at least Scintilla 5.0.0 where I stopped digging. It doesn’t occur with Ubuntu 21.10 with GTK 3.24.30. So its most likely a problem with GTK 3.24.31 or the theme used by Fedora.

Since this appeared serious, I delayed making a new release of Scintilla but will now soon make new releases of Scintilla and SciTE. I’ll also go on vacation for a few weeks soon after although that is dependent on weather - La Niña has been causing a lot of rain around here.

Neil

Lex Trotman

unread,
Mar 27, 2022, 5:16:32 AM3/27/22
to scintilla...@googlegroups.com
Similar-ish random problems have been identified on Geany going back a
long way, we mostly blamed it on GTK, see
https://github.com/geany/geany/issues/807 and
https://github.com/geany/geany/issues/1787 where someone also got the
problem on Scite 3.7.5. Not sure if its much help, but maybe the
problem isn't just in recent code changes.

Regards
Lex

> Neil
>
> --
> You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-inter...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/807C2901-F5D9-4395-BB9D-723C4CF68396%40me.com.

Neil Hodgson

unread,
Mar 28, 2022, 12:51:05 AM3/28/22
to Scintilla mailing list
Lex Trotman:

Similar-ish random problems have been identified on Geany going back a
long way, we mostly blamed it on GTK, see
https://github.com/geany/geany/issues/807 and

   The tab widget not changing as well also occurs for me. I didn’t realize that the system showing this problem was running Xorg instead of Wayland. Switching to Wayland fixed the problem. Changing the previously working Ubuntu system to Xorg made the problem start there.

   So it looks like this is an issue with GTK on Xorg.

   Scintilla could try to work around the issue. Perhaps a timer detecting that only a partial update occurred after a document switch then performing a full refresh. Doesn’t fix the tab bar though.

   Neil

Lex Trotman

unread,
Mar 28, 2022, 6:44:17 PM3/28/22
to scintilla...@googlegroups.com
> So it looks like this is an issue with GTK on Xorg.
>
> Scintilla could try to work around the issue. Perhaps a timer detecting that only a partial update occurred after a document switch then performing a full refresh. Doesn’t fix the tab bar though.

Perhaps a workaround like that would be a suitable improvement for the
remaining life of X11.

Cheers
Lex

Neil Hodgson

unread,
Mar 29, 2022, 2:22:43 AM3/29/22
to Scintilla mailing list
Lex Trotman:

Perhaps a workaround like that would be a suitable improvement for the
remaining life of X11.

   That didn’t really work out but there was a change that made a difference - moving scroll bar modifications onto a *low priority* idle task. That is, an idle task that triggers after GTK’s resize and redraw idle tasks. Possibly that allows GTK’s internal state to stabilize before making more changes. The change is attached to
   It also helps with some of the other GTK problems such as when the vertical scroll bar stops moving.

   The change could cause problems with applications that examine the scroll state directly after making changes (like loading a file) as it takes some time for the idle task to get its turn to run. If this is a problem, then there could be a notification after the idle task to resume the application’s work. The priorities of Scintilla’s other idle tasks (wrapping, styling, notifying app of cursor moves, ...) may need to be arranged to give this task a chance to run reasonably quickly.

   It’s too late in the release cycle to commit this but it is worth trying by any GTK projects that have experienced drawing bugs.

   Neil

Lex Trotman

unread,
Mar 29, 2022, 2:44:38 AM3/29/22
to scintilla...@googlegroups.com
As I am away from home helping friends who were La Nina-ed I can't
personally try it, but I have linked the Geany issues to the
Sourceforge bug in case someone else can test it.

Cheers
Lex

>
> Neil
>
> --
> You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-inter...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/E3F3519D-CCD5-4BC1-BA07-27D2116E5F6A%40me.com.

Neil Hodgson

unread,
Apr 7, 2022, 6:51:45 AM4/7/22
to Scintilla mailing list
   A change has been committed that fixes the problem. There is a small performance cost and potential for visual flash so it may be possible to tune this further. The problem doesn’t currently occur on Wayland or is very rare there, so the change could be made Xorg-only. Please report any new bugs after applying this change.


   Neil

Reply all
Reply to author
Forward
0 new messages