You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large type tooltips cause visual artifacting on hover. #832
#lang typed/racket
(define zz
(hash ;; hover here
'+ +
'* *
'- -
'/ /))
zz ;; or hover here
Sufficiently large tooltips cause visual artifacts on hover. The easiest way I have found to reproduce this is a hash with values that have a huge union type capturing a large number of case->'s (as is the type for mapping to multiple arithmetic operators as seen above). The visual artifacts depend on the drracket font size. Hovering over the hash itself or the variable binding it (in this case zz) and using Ctrl+- or Ctrl+= to change the font size will cause stretching, blurring, or other artifacts of the tooltip text.
Regular hovering with no font size changing can also recreate the artifacts, but with a large enough tooltip, sometimes hovering will cease to draw the yellow canvas box at all (although do note that there is some visual warping at the bottom of the window).
When reproducing this issue from a drracket instance launched from the command line, each attempt at hovering will cause the following warning to be thrown to the console:
$ drracket bug.rkt
(drracket:5582): Gdk-WARNING **: 17:34:24.589: Native Windows wider or taller than 32767 pixels are not supported
Environment
Version: Racket 9.3
OS: Debian 12
Desktop Environment: KDE Plasma
I've pushed a change to drracket that just drops the data when there are more than 100 lines or when any line is more than 100 characters wide. I think this should solve the problem, although I was not able to reproduce the exact bad behavior (I did get "cairo_t->C: argument is not non-null `cairo_t' pointer" errors under linux but not the strange artifacts), so I didn't close the PR. I would be curious to see if this helps your machine @Ryan-Ficklin. (If you don't build drracket from source, there will be a snapshot available tomorrow with this change, hopefully.)
@greghendershott, the change I made was on the UI side, not the part that's reused by the racket mode. I tried this example out in racket-hash-lang-mode with racket-xp-mode turned on and I didn't see any problems; the type filled the visible portion of the buffer on my laptop screen but it didn't seem to cause any problems. Not sure I tried all the relevant things, however.
@rfindler Thanks for the heads up! And, thanks for making this change only in the UI.
Although I don't want to jinx myself, I believe eldoc and eye candy like eldoc-box are fine with very large amounts of text.
In fact one value for the Racket Mode customization variable racket-xp-eldoc-level is 'complete, which shows not just a bluebox but the full section of documentation including prose.
When testing that I've seen quite a few overflows, and even crazy big examples (like the docs for match) just get clipped with no ill effects AFAICT.
@rfindler This fix seemed to work very nicely for every text size I tried. I could no longer reproduce the artifacts on hover, including hover during font size change. I have attached a few examples for sake of completion.
Okay! Maybe the giant string was somehow turning into memory corruption somehow. Probably there is still some checks that need to be done at some lower level to guard against that.
Activity
adjust tooltip code so that it discards excess data
rfindler commentedon Oct 23, 2026
I've pushed a change to drracket that just drops the data when there are more than 100 lines or when any line is more than 100 characters wide. I think this should solve the problem, although I was not able to reproduce the exact bad behavior (I did get "cairo_t->C: argument is not non-null `cairo_t' pointer" errors under linux but not the strange artifacts), so I didn't close the PR. I would be curious to see if this helps your machine @Ryan-Ficklin. (If you don't build drracket from source, there will be a snapshot available tomorrow with this change, hopefully.)
@greghendershott, the change I made was on the UI side, not the part that's reused by the racket mode. I tried this example out in racket-hash-lang-mode with racket-xp-mode turned on and I didn't see any problems; the type filled the visible portion of the buffer on my laptop screen but it didn't seem to cause any problems. Not sure I tried all the relevant things, however.
greghendershott commentedon Oct 23, 2026
@rfindler Thanks for the heads up! And, thanks for making this change only in the UI.
Although I don't want to jinx myself, I believe
eldocand eye candy likeeldoc-boxare fine with very large amounts of text.In fact one value for the Racket Mode customization variable
racket-xp-eldoc-levelis'complete, which shows not just a bluebox but the full section of documentation including prose.When testing that I've seen quite a few overflows, and even crazy big examples (like the docs for
match) just get clipped with no ill effects AFAICT.Ryan-Ficklin commentedon Oct 25, 2026
@rfindler This fix seemed to work very nicely for every text size I tried. I could no longer reproduce the artifacts on hover, including hover during font size change. I have attached a few examples for sake of completion.
Very Small Text

Regular Text

Somewhat Zoomed Text

rfindler commentedon Oct 25, 2026
Okay! Maybe the giant string was somehow turning into memory corruption somehow. Probably there is still some checks that need to be done at some lower level to guard against that.