Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale windows and resolution for HiDPI displays #2544

Closed
wants to merge 6 commits into from

Conversation

jmert
Copy link

@jmert jmert commented Jan 2, 2023

Description

On my HiDPI monitors [*], GLMakie's windows appear with a small default size and very small font size compared to other UI elements. Overriding themes to enlarge font sizes, default window size, default line thicknesses, etc is possible, but that makes sharing plotting scripts across machines difficult.

The approach I've taken here is to distinguish between a logical pixel and physical pixel, based on the fact that GLFW can report the device scaling factor in use. Therefore, the default window size, font sizes, marker/line sizes, etc can all be left alone (i.e. 800x600 window with 16pt fonts), and all lengths are dynamically rescaled by the device scaling factor during rendering.

With what I've hacked together, I can view images in GLMakie that have similar scale to those I'd get from saving an image to disk and loading in Firefox (which does similar HiDPI scaling from nominal "1x" CSS pixels to actual screen pixels):

julia> using CairoMakie; CairoMakie.activate!()

julia> x = range(-2π, 2π, 5_000); lines(x, sin.(2.1x))
FigureAxisPlot()

julia> save("/tmp/test.svg", current_figure())
CairoMakie.Screen{SVG}


julia> using GLMakie; GLMakie.activate!()

julia> x = range(-2π, 2π, 5_000); lines(x, sin.(2.1x))

image

Important caveats

  • I removed the retina-specific code paths, since they seemed to do something very similar but in a way that doesn't work for my Linux desktop where window and framebuffer sizes are always equal. I don't have a way to test on Mac, so it was easier for me to rip out and just ignore it, but someone else will need to test on OSX.
  • I don't actually know GLSL, so the rendering modifications were a big exercise in pattern matching and guess-and-check. My stupidly-simple sample cases seem to now work, but I won't be surprised if there are still missing modifications for recipes I haven't tried.
    • I also don't really understand the SSAO, FXAA, etc, so I've probably not updated those rendering steps correctly either.
  • I've only tested the "on content scale change" on Windows, where it seemed to work moving a window from the laptop builtin display at 125% to an external display at 200% and back. (I haven't been able to test on Linux since (AFAIU) that requires GLFW using the Wayland backend, but it seems like GLFW_jll is going through XWayland instead.)

I've also discovered that #2529 now exists, which must have been created just after I'd starting working on this independently. I've borrowed the px_per_unit nomenclature and including that in the theme from that PR, but otherwise I think this has taken a different approach. That might be a clue as to differences between Linux and OSX...

[*] Machine details:

  • Arch Linux
  • Gnome v43 DE on Wayland
  • Dual 4K monitors (native resolution ~185dpi) with 200% scaling configured in Gnome's display settings

Type of change

Delete options that do not apply:

  • New feature (non-breaking change which adds functionality)

Checklist

  • Added an entry in NEWS.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@jkrumbiegel
Copy link
Member

Very cool effort! I have no idea if the approach you took (modifying every shader with a scale factor) is the "right" one (I had hoped there could be a simpler solution) but we'll sort that out with the others who are more knowledgeable about that code than me.

However, I could test with a Mac and it's not working correctly there, yet.

  • The default window has a size of 1600x1200 "virtual pixels" with a backing buffer of 3200x2400. This is because the window size you set on mac refers to the number of "virtual pixels" not the buffer (this seems to be the main difference to other systems).
  • Font and line sizes within that window are correct, so 16px font is 16 virtual pixels large (like 12pt font in Word, etc.)
  • Mouse interaction is buggy. If I draw a zoom rectangle in Axis, it appears at the wrong position and is half the correct size, so interactions need to be corrected for the scale factor as well.

@jkrumbiegel
Copy link
Member

I've made some additions which fix window size and mouse behavior on my mac. The Menu is buggy and the Slider line is missing, Axis, Axis3, Button and Textbox looked good and seemed to work as intended.

I still find the nomenclature quite confusing and am not sure if everything is correct. My problem is that window size and framebuffer size are not clearly separated (I made one attempt at separation by renaming windowsize to framebuffer_size). Am I correct that only on mac window size != framebuffer size while on windows and linux window size == framebuffer size? The problem is, what do we mean then with resolution for a Scene.

@jkrumbiegel
Copy link
Member

Also for discussion, check out what happens if the px_per_unit value is increased. First we have 2:

grafik

Then 3:

grafik

Then 4:

grafik

The way that @ffreyer 's PR worked, the resolution of the buffer that was drawn into did not change the real estate in the plot, but here it does. If the frame buffer size is changed with the same factor as the px_per_unit value then the real estate does not change. I wonder if that's the behavior we want to have. Ideally, I would want to be able to save a GLMakie figure with arbitrary px_per_unit but that should never alter the plot layout, it should just increase or decrease resolution, like in CairoMakie.

@jmert
Copy link
Author

jmert commented Jan 3, 2023

The way that @ffreyer 's PR worked, the resolution of the buffer that was drawn into did not change the real estate in the plot, but here it does. If the frame buffer size is changed with the same factor as the px_per_unit value then the real estate does not change. I wonder if that's the behavior we want to have. Ideally, I would want to be able to save a GLMakie figure with arbitrary px_per_unit but that should never alter the plot layout, it should just increase or decrease resolution, like in CairoMakie.

Right — I ended up at the place I did because GLFW handles resizing the window/frame buffer (when using the SCALE_TO_MONITOR hint) when moved across monitors with different scaling factors (tested on Windows, but I believe should be true of Wayland on Linux as well), so the scaling factor observable is changed independently (but in parallel) to control how elements are rendered within the frame buffer to match.

As far as I can tell on Linux, there's no way to have a frame buffer with different size than the window, so arbitrarily large scaling factors will cause/require the window to be potentially larger than the entire monitor. That also doesn't seem ideal, though.

@jmert
Copy link
Author

jmert commented Jan 3, 2023

I still find the nomenclature quite confusing and am not sure if everything is correct. My problem is that window size and framebuffer size are not clearly separated (I made one attempt at separation by renaming windowsize to framebuffer_size). Am I correct that only on mac window size != framebuffer size while on windows and linux window size == framebuffer size? The problem is, what do we mean then with resolution for a Scene.

I think that's true — on Linux and Windows, frame buffer and window sizes are the same.

I've been interpreting the scene resolution to be the logical window size — if you switch backends, you should get the same result, so that motivated my approach at not manipulating any of the stored window sizes and instead doing all of the scaling during interactions with GLFW/the rendering pipeline.

To help with cross-compatibility between OSX and others, though, it probably would make sense to better delineate between window and buffer sizes, and then there'd be different implementations based on OS to scale up/down sizes accordingly.

@jkrumbiegel
Copy link
Member

I think we need to separate between windows that are displayed on screens, and images that are saved directly from frame buffers.

As far as I understand (and this was also visible in the other PR by ffreyer), the frame buffer we draw everything into doesn't have to have the same resolution as the window it's being displayed on. At least, in my tests I could vary the same layout (shown in the same window size) from blurry to sharp by decreasing or increasing the frame buffer size. This would be the basis for saving out images with arbitrary resolution, we'd just increase the frame buffer size as high as we like (and the hardware allows). Maybe I can incorporate that part of @ffreyer's PR into this one.

On the other hand, we have the scaling aspect that has to do with monitor pixel densities and OS scaling settings. Here we have the slightly problematic difference between OSes in how window and frame buffer size differ. But I think we were already agreeing about the fact that resolution of our Figures should not map directly to a frame buffer size, but describe an as you said "logical window size". We want our default 800x600 Figure to be displayed in a similar usable size with neither huge or tiny, readable text.

Let's say we have the same screen on Windows/Linux and Mac which is 3456 × 2234 pixels in size (like my macbook).
The content scaling factor on the screen would be the same 2.0 on all three systems. However, the window size we'd request from GLFW would differ:

  • Windows/Linux: 1600x1200
  • Mac: 800x600

The pixel buffer underlying that window (not the frame buffer) would be the same size for both, 1600x1200. If we move the window to a different screen, the scale factor reported by GLFW might change and we should update to a new pixel buffer size. Therefore, I'd argue that the pixel buffer size should be fixed given the Figure resolution and the reported scale factor of the current monitor.

However, this is different than the size of the frame buffer which we draw into, and which is then shown as a bitmap scaled to the size of the pixel buffer. (At least that's my current understanding, please correct me if I'm wrong). There are two scenarios:

  • The frame buffer is shown through the pixel buffer of a window, in this scenario it's optimal if the two resolutions are exactly the same. We can still vary the frame buffer size in principle, but this only leads to blurry images if the frame buffer size is lower than that of the window's pixel buffer, and it doesn't gain anything if it's higher.
  • The frame buffer is written directly to a bitmap file, in this case no pixel buffer of a window matters, as none is displayed. In this case the frame buffer size should be allowed to vary freely.

So it seems to me that the scaling factor px_per_unit which we're talking about here should be

  • automatically set to the reported scaling factor of GLFW when a window is displayed
  • be set freely otherwise

The pixel buffer size of a window should always be set by multiplying the Figure resolution with the scaling factor reported by GLFW. This means setting the window size to two different values on Windows/Linux and Mac:

  • Windows/Linux: to the pixel buffer size
  • Mac: to the pixel buffer size divided by the window scale factor

The frame buffer size in which we draw should however be set by multiplying the Figure resolution with px_per_unit. There are two cases:

  • px_per_unit is equal to the GLFW scaling factor: This should be the automatic case to ensure best quality in displayed windows.
  • px_per_unit can vary freely: This would matter for saving bitmap files.

My main assumption in this text was that we're not directly drawing into the buffer that is underlying the window, and that there's a separation there which decouples px_per_unit and the window scaling factor. That's why I am talking about "pixel buffer" and "frame buffer". I have to find out if this is actually correct, but if it is that should make the implementation clear.

@jmert
Copy link
Author

jmert commented Jan 4, 2023

I've pushed a new change which separates the concept of the window scaling factor from the (rendering) frame buffer "px_per_unit".

For instance, by default I now get the simple scatter plot:

image

but if I manually change the scene's screen.px_per_unit to 1.0, the window and visible size of the elements do not change, but the resolution of the rasterized image is clearly lower:

image

@jkrumbiegel
Copy link
Member

Lovely! This seems to work really well for me on Mac as well when displaying the figure. (Minus the slider and menu bugs already noticed before).

The behavior when saving is a bit peculiar, I managed to write out a high-resolution image by setting both px_per_unit on an open screen as well as in the save call. If the two don't match, the figure takes too little or too much space in the output image. I think it should be possible to save an open figure that has px_per_unit = 2 or whatever and set a higher px_per_unit like 4 just for the save.

Also the px_per_unit value in the save call has to be Float32 or there's a method error, that requirement should be relaxed for convenience.

f, ax, l = lines(cumsum(randn(100)))
surface(f[1, 2], 0:0.1:10, 0:0.1:10, (x, y) -> sqrt(x) * sqrt(y), color = :red, axis = (type = Axis3,))
Label(f[0, :], "Super title", font = :bold)
# m = Menu(f[end+1, :], options = ["A", "B", "C"])
gl = GridLayout(f[end+1, :], tellwidth = false)
Button(gl[1, 1], label = "Click me")
Textbox(gl[1, 2], width = 200)
Slider(f[end+1, :], range = 1:100)
f

screen = display(f)

ppu = 4.0f0
screen.px_per_unit[] = ppu
save("test.png", f, px_per_unit = ppu)
run(`file test.png`) # check pixel size of output

With these settings I get a nice and sharp 3200 x 2400 png file:

test

@jkrumbiegel
Copy link
Member

Some more observations. The effective window size is the same, no matter if I have scalefactor = 1f0 or scalefactor = 2f0 set. I think if we fix effective window size to scalefactor it should be smaller with scalefactor = 1f0. Not sure if we can easily tie those two together?

Also, with scalefactor = 1f0, mouse interaction is again buggy for me, so the correction scaling isn't done quite right and depends on native screen scale.

@ffreyer ffreyer mentioned this pull request Jan 4, 2023
5 tasks
@@ -68,7 +68,7 @@ mutable struct ScreenConfig
vsync::Bool,
render_on_demand::Bool,
framerate::Number,
px_per_unit::Union{Makie.Automatic, Float32},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we type this concretely to just Float64/Float32?

We can also use Float64 if it helps ;) The conversion from automatic/number should happen in the constructor!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I'm misunderstanding something — isn't this the appropriate place to deal with automatic? This line is specifically in the function arguments to the constructor, which is converted within the function to nothing or a Float32. (I'm using nothing as a sentinel to indicate that automatic decisions should be made, with the idea that being overridden by the user will disable automatic updates.)

@jmert
Copy link
Author

jmert commented Jan 4, 2023

With the latest two commits:

Also the px_per_unit value in the save call has to be Float32 or there's a method error, that requirement should be relaxed for convenience.

That was an easy fix by just allowing all Numbers in the config struct and converting to Float32 (to match GL's content scale).

The behavior when saving is a bit peculiar, I managed to write out a high-resolution image by setting both px_per_unit on an open screen as well as in the save call. If the two don't match, the figure takes too little or too much space in the output image. I think it should be possible to save an open figure that has px_per_unit = 2 or whatever and set a higher px_per_unit like 4 just for the save.

In the second commit, I explicitly changed/ignored a comment saying not to change the framebuffer size, but that seems to be necessary to not crop/pad the output image when the save(; px_per_unit) is different from the screen's px_per_unit. I tested that on my computer (Linux), I can still save a 16x figure which is much larger than my monitors without problem, but that should probably be checked in different environments.

julia> f, ax, l = lines(cumsum(randn(100)))

julia> surface(f[1, 2], 0:0.1:10, 0:0.1:10, (x, y) -> sqrt(x) * sqrt(y), color = :red, axis = (type = Axis3,))
Makie.AxisPlot(Axis3(), Surface{Tuple{Vector{Float32}, Vector{Float32}, Matrix{Float32}}})

julia> Label(f[0, :], "Super title", font = :bold)
Label()

julia> # m = Menu(f[end+1, :], options = ["A", "B", "C"])
       gl = GridLayout(f[end+1, :], tellwidth = false)
GridLayout[1:1, 1:1] with 0 children


julia> Button(gl[1, 1], label = "Click me")
Button()

julia> Textbox(gl[1, 2], width = 200)
Textbox()

julia> Slider(f[end+1, :], range = 1:100)
Slider()

julia> f

julia> screen = display(f)
GLMakie.Screen(...)

julia> ppu = 4
4

julia> save("test.png", f, px_per_unit = ppu)

julia> run(`file test.png`) # check pixel size of output
test.png: PNG image data, 3200 x 2400, 8-bit/color RGB, non-interlaced
Process(`file test.png`, ProcessExited(0))

Some more observations. The effective window size is the same, no matter if I have scalefactor = 1f0 or scalefactor = 2f0 set. I think if we fix effective window size to scalefactor it should be smaller with scalefactor = 1f0. Not sure if we can easily tie those two together?

Yeah, I've noticed that but haven't yet gone through the work of hooking up the right observable action to resize the window. I think that should be possible, though. (I just have to think through how to manage both manually setting the scale factor and receiving callbacks from GL when moving across differently-scaled monitors.)

@jmert jmert force-pushed the jw/gl_linux_hidpi branch 2 times, most recently from 4f3e68c to 91e5509 Compare January 4, 2023 18:49
@jkrumbiegel
Copy link
Member

save("test.png", fig, px_per_unit = 3) works now in that it saves a high-res image, however it also changes the px_per_unit value for the window being displayed (it only seems to update with the next interaction for me). That should probably not happen?

@jmert
Copy link
Author

jmert commented Jan 5, 2023

save("test.png", fig, px_per_unit = 3) works now in that it saves a high-res image, however it also changes the px_per_unit value for the window being displayed (it only seems to update with the next interaction for me). That should probably not happen?

Good observation. I was wondering about that since I never saw any kind of push-pop state save, but I hadn't actually noticed an effect — I probably just didn't interact with the window, though.

I've also found another issue with high-res rendering and saving animations, so there are still some fundamental problems with conveying the size of the buffer that I need to sort out.

@pbouffard
Copy link
Contributor

pbouffard commented Jan 7, 2023

Has your testing of this included something like my setup? It consists of a hidpi (Mac Retina) main display, and external lower-res monitors, and I've noticed some odd stuff:

On the external monitor, sometimes a 3D axis will respond to mouse drags to rotate the scene, sometimes it won't at all, and sometimes it will do so but only when dragging in very specific locations in the 3D scene. I see this in a figure with a 1-column, 2 row layout where the 3D axis is the upper one. It seems to happen only if I include rowsize! calls with Relative and/or axislegend.

The axis in the 2nd row (a 2D scatterlines) seems unaffected, and everything works as expected whenever the window is dragged onto the main (hidpi) display.

This is GLMakie 0.8.1, Julia 1.8.4, MacOS Ventura, Intel.

If this isn't a known issue I can try to make a minimal example, but I wonder if it sounds like something that's already been seen.

Edit: I just noticed that it's possible to get similar behavior on the hidpi screen too, so I think that may be a red herring, and also without the rowsize! and axislegend calls. What seems to be happening is that only drags in the 3D scene that occur below a certain position in the window are responded to. Whether it happens also seems to depend on which monitor the GLMakie window was on when I re-draw the figure (I do this after calling empty!(Makie.current_figure()) which either clears the window while maintaining its current size and location, or creates a new window if one doesn't already exist -- this is the behavior I want).

Edit again: I just restarted my Julia session and can no longer reproduce the issue, so it must be something stateful.

@jmert
Copy link
Author

jmert commented Jan 8, 2023

Has your testing of this included something like my setup? It consists of a hidpi (Mac Retina) main display, and external lower-res monitors, and I've noticed some odd stuff:

No, I don't have access to OSX, so I assume things may be (probably are) broken until someone else figures out what needs to be changed. It seems Windows and Linux are relatively consistent in how screens/framebuffers are dealt with, and OSX is the oddball. (My computers are all Linux, so that's where I'm developing/testing everything.)

@jkrumbiegel
Copy link
Member

Just reporting that Menu and Slider work for me now on Mac with the recent fixes.

@jmert
Copy link
Author

jmert commented Jan 30, 2023

From my perspective, this is ready to go and be reviewed.

I haven't figured out how to write a reference image test that propagates a different px_per_unit (as far as I've found so far, CairoMakie doesn't test hi-res references either), so any help with that would be appreciated, if required.

I've been using this branch on my main Linux desktop, and I even tested briefly on a Windows machine at work and didn't see any problems. An OSX user should confirm.

@jmert
Copy link
Author

jmert commented Jan 31, 2023

Your suspicions are correct:

OK, I've added a new commit which adds more scaling factor logic to the event callbacks. I'm hoping this fixes possible problems that occur both under resizing the window (by dragging the corners) and with the mouse positioning.

On Linux, I can do the following and see sensible results:

  1. Open an empty figure: fig = Figure().
  2. Grab a window corner and resize a tiny amount.
  3. Position my mouse in the upper-right corner of the plot window draw area.
  4. Alt+Tab to my terminal and run GLMakie.Makie.events(fig). I then see the line for window_area to have a rectangle with size approximately [800, 600] and the mouseposition with value approximately (800, 600).

Actually when I move the window over to the external monitor the Makie window becomes unresponsive (the Mac "beachball"), and in the Julia terminal:
...

Gah, that's what I get for writing code that I can't test on Linux — Base.Fix1 only works with 2-argument functions. Fixed by just creating callback functions that curry the screen argument and return anonymous functions for the actual callbacks.

@pbouffard
Copy link
Contributor

Moving the window between screens works without hanging now. And changing scalefactor doesn't make any visual difference now, is that expected?

As far as the unit tests go, I started them and then switched desktops and got a failure. I again didn't time the switch deliberately so I'm not sure how it correlates to the failing test, but it definitely sounds like something isn't handling desktop switches properly.

(makiedev) pkg> test GLMakie
     Testing GLMakie
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_0bra3c/Project.toml`
  [5789e2e9] FileIO v1.16.0
  [e9467ef8] GLMakie v0.8.2 `~/dev/makiedev/dev/Makie/GLMakie`
  [5c1252a2] GeometryBasics v0.4.5
⌃ [6218d12a] ImageMagick v1.2.1
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [44cfe95a] Pkg v1.8.0 `@stdlib/Pkg`
  [9a3f8284] Random `@stdlib/Random`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_0bra3c/Manifest.toml`
  [621f4979] AbstractFFTs v1.2.1
  [1520ce14] AbstractTrees v0.4.4
  [79e6a3ab] Adapt v3.5.0
  [27a7e980] Animations v0.4.1
  [67c07d97] Automa v0.8.2
  [13072b0f] AxisAlgorithms v1.0.1
  [39de3d68] AxisArrays v0.4.6
  [fa961155] CEnum v0.4.2
  [49dc2e85] Calculus v0.5.1
  [d360d2e6] ChainRulesCore v1.15.7
  [9e997f8a] ChangesOfVariables v0.1.5
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.20.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.10
  [5ae59095] Colors v0.12.10
  [34da2185] Compat v4.5.0
  [187b0558] ConstructionBase v1.4.1
  [d38c429a] Contour v0.6.2
  [9a962f9c] DataAPI v1.14.0
  [864edb3b] DataStructures v0.18.13
  [e2d170a0] DataValueInterfaces v1.0.0
  [b429d917] DensityInterface v0.4.0
  [31c24e10] Distributions v0.25.80
  [ffbed154] DocStringExtensions v0.9.3
  [fa6b7ba4] DualNumbers v0.6.8
  [411431e0] Extents v0.1.1
  [c87230d0] FFMPEG v0.4.1
  [7a1cc6ca] FFTW v1.5.0
  [5789e2e9] FileIO v1.16.0
  [1a297f60] FillArrays v0.13.7
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [b38be410] FreeType v4.0.0
  [663a7486] FreeTypeAbstraction v0.10.0
  [f7f18e0c] GLFW v3.4.1
  [e9467ef8] GLMakie v0.8.2 `~/dev/makiedev/dev/Makie/GLMakie`
  [46192b85] GPUArraysCore v0.1.3
  [cf35fbd7] GeoInterface v1.2.1
  [5c1252a2] GeometryBasics v0.4.5
  [a2bd30eb] Graphics v1.1.2
  [3955a311] GridLayoutBase v0.9.1
  [42e2da0e] Grisu v1.0.2
  [34004b35] HypergeometricFunctions v0.3.11
  [2803e5a7] ImageAxes v0.6.10
  [c817782e] ImageBase v0.1.5
  [a09fc81d] ImageCore v0.9.4
  [82e4d734] ImageIO v0.6.6
⌃ [6218d12a] ImageMagick v1.2.1
  [bc367c6b] ImageMetadata v0.9.8
  [9b13fd28] IndirectArrays v1.0.0
  [d25df0c9] Inflate v0.1.3
  [a98d9a8b] Interpolations v0.14.7
  [8197267c] IntervalSets v0.7.4
  [3587e190] InverseFunctions v0.1.8
  [92d709cd] IrrationalConstants v0.1.1
  [f1662d9f] Isoband v0.1.1
  [c8e1da08] IterTools v1.4.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.4.1
  [682c06a0] JSON v0.21.3
  [b835a17e] JpegTurbo v0.1.1
  [5ab0869b] KernelDensity v0.6.5
  [b964fa9f] LaTeXStrings v1.3.0
  [8cdb02fc] LazyModules v0.3.1
  [2ab3a3ac] LogExpFunctions v0.3.20
  [1914dd2f] MacroTools v0.5.10
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [20f20a25] MakieCore v0.6.2 `~/dev/makiedev/dev/Makie/MakieCore`
  [dbb5928d] MappedArrays v0.4.1
  [7eb4fadd] Match v1.2.0
  [0a4f8689] MathTeXEngine v0.5.4
  [7269a6da] MeshIO v0.4.10
  [978d7f02] MiniQhull v0.4.0
  [e1d29d7a] Missings v1.1.0
  [66fc600b] ModernGL v1.1.6
  [e94cdb99] MosaicViews v0.3.4
  [77ba4419] NaNMath v1.0.1
  [f09324ee] Netpbm v1.1.0
  [510215fc] Observables v0.5.4
  [6fe1bfb0] OffsetArrays v1.12.9
  [52e1d378] OpenEXR v0.3.2
  [bac558e1] OrderedCollections v1.4.1
  [90014a1f] PDMats v0.11.16
  [f57f5aa1] PNGFiles v0.3.17
  [19eb6ba3] Packing v0.5.0
  [5432bcbf] PaddedViews v0.5.11
  [69de0a69] Parsers v2.5.3
  [eebad327] PkgVersion v0.3.2
  [995b91a9] PlotUtils v1.3.4
  [647866c9] PolygonOps v0.1.2
  [21216c6a] Preferences v1.3.0
  [92933f4c] ProgressMeter v1.7.2
  [4b34888f] QOI v1.0.0
  [1fd47b50] QuadGK v2.7.0
  [b3c3ace0] RangeArrays v0.3.2
  [c84ed2f1] Ratios v0.4.3
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.0
  [ae029012] Requires v1.3.0
  [79098fc4] Rmath v0.7.1
  [fdea26ae] SIMD v3.4.4
  [7b38b023] ScanByte v0.3.3
  [6c6a2e73] Scratch v1.1.1
  [efcf1570] Setfield v1.1.1
  [65257c39] ShaderAbstractions v0.3.0
  [992d4aef] Showoff v1.0.3
  [73760f76] SignedDistanceFields v0.4.0
  [699a6c99] SimpleTraits v0.9.4
  [45858cf5] Sixel v0.1.2
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.0
  [276daf66] SpecialFunctions v2.1.7
  [c5dd0088] StableHashTraits v0.3.1
  [cae243ae] StackViews v0.1.1
  [90137ffa] StaticArrays v1.5.12
  [1e83bf80] StaticArraysCore v1.4.0
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [4c63d2b9] StatsFuns v1.1.1
  [09ab397b] StructArrays v0.6.14
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.10.0
  [62fd8b95] TensorCore v0.1.1
  [731e570b] TiffImages v0.6.3
  [3bb67fe8] TranscodingStreams v0.9.11
  [981d1d27] TriplotBase v0.1.0
  [9d95972d] TupleTools v1.3.0
  [1cfade01] UnicodeFun v0.4.1
  [efce3f68] WoodburyMatrices v0.5.5
  [6e34b625] Bzip2_jll v1.0.8+0
  [83423d85] Cairo_jll v1.16.1+1
  [5ae413db] EarCut_jll v2.2.4+0
  [2e619515] Expat_jll v2.4.8+0
  [b22a6f82] FFMPEG_jll v4.4.2+2
  [f5851436] FFTW_jll v3.3.10+0
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.10.4+0
  [559328eb] FriBidi_jll v1.0.10+0
  [0656b61e] GLFW_jll v3.3.8+0
  [78b55507] Gettext_jll v0.21.0+0
  [61579ee1] Ghostscript_jll v9.55.0+0
  [7746bdde] Glib_jll v2.74.0+2
  [3b182d85] Graphite2_jll v1.3.14+0
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
  [c73af94c] ImageMagick_jll v6.9.12+3
  [905a6f67] Imath_jll v3.1.2+0
  [1d5cc7b8] IntelOpenMP_jll v2018.0.3+2
  [aacddb02] JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
  [dd4b983a] LZO_jll v2.10.1+0
⌅ [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7e76a0d4] Libglvnd_jll v1.6.0+0
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.16.1+2
  [4b2f31a3] Libmount_jll v2.35.0+0
  [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
  [856f044c] MKL_jll v2022.2.0+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [18a262bb] OpenEXR_jll v3.1.1+0
  [458c3c95] OpenSSL_jll v1.1.19+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
  [30392449] Pixman_jll v0.40.1+0
  [460c41e3] QhullMiniWrapper_jll v1.0.0+1
⌅ [784f63db] Qhull_jll v8.0.1001+0
  [f50d1b31] Rmath_jll v0.4.0+0
  [02c8fc9c] XML2_jll v2.10.3+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+4
  [935fb764] Xorg_libXcursor_jll v1.2.0+4
  [a3789734] Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] Xorg_libXi_jll v1.7.10+4
  [d1454406] Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+3
  [c5fb5394] Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] Zstd_jll v1.5.2+0
  [9a68df92] isoband_jll v0.2.3+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
  [b53b4c65] libpng_jll v1.6.38+0
  [075b6546] libsixel_jll v1.10.3+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [8bf52ea8] CRC32c `@stdlib/CRC32c`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [9fa8497b] Future `@stdlib/Future`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [4af54fe1] LazyArtifacts `@stdlib/LazyArtifacts`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.8.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [4607b0f0] SuiteSparse `@stdlib/SuiteSparse`
  [fa267f1f] TOML v1.0.0 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.1 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v1.0.1+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.84.0+0 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.10.2+0 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.28.0+0 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2022.2.1 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.20+0 `@stdlib/OpenBLAS_jll`
  [05823500] OpenLibm_jll v0.8.1+0 `@stdlib/OpenLibm_jll`
  [efcefdf7] PCRE2_jll v10.40.0+0 `@stdlib/PCRE2_jll`
  [83775a58] Zlib_jll v1.2.12+3 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v5.1.1+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.48.0+0 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v17.4.0+0 `@stdlib/p7zip_jll`
        Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading.
     Testing Running tests...
┌ Warning: TESTING WITHOUT OPENGL DEBUGGING
└ @ Main ~/dev/makiedev/dev/Makie/GLMakie/test/runtests.jl:12
   Resolving package versions...
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_0bra3c/Project.toml`
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_0bra3c/Manifest.toml`
  [ec485272] + ArnoldiMethod v0.2.0
  [aafaddc9] + CatIndices v0.2.2
  [324d7699] + CategoricalArrays v0.10.7
  [aaaa29a8] + Clustering v0.14.3
  [ed09eef8] + ComputationalResources v0.3.2
  [150eb455] + CoordinateTransformations v0.6.2
  [dc8bdbbb] + CustomUnitRanges v1.0.2
  [b4f34e82] + Distances v0.10.7
  [4f61f5a4] + FFTViews v0.3.2
  [86223c79] + Graphs v1.7.4
  [f332f351] + ImageContrastAdjustment v0.3.10
  [51556ac3] + ImageDistances v0.2.16
  [6a3955dd] + ImageFiltering v0.7.3
⌅ [787d08f9] + ImageMorphology v0.3.2
  [2996bd0c] + ImageQualityIndexes v0.3.4
  [80713f31] + ImageSegmentation v1.7.0
  [4e3cecfd] + ImageShow v0.3.6
  [02fcd773] + ImageTransformations v0.9.5
  [916415d5] + Images v0.25.2
  [1d092043] + IntegralArrays v0.1.5
  [033835bb] + JLD2 v0.4.30
  [626554b9] + MetaGraphs v0.7.2
  [b8a86587] + NearestNeighbors v0.4.13
  [d96e819e] + Parameters v0.12.3
  [94ee1d12] + Quaternions v0.7.4
  [c1ae055f] + RealDot v0.1.0
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
  [dee08c22] + RegionTrees v0.3.2
  [6038ab10] + Rotations v1.3.4
  [47aef6b3] + SimpleWeightedGraphs v1.2.2
  [860ef19b] + StableRNGs v1.0.0
⌅ [06e1c1a7] + TiledIteration v0.3.1
  [3a884ed6] + UnPack v1.0.2
  [8bb1440f] + DelimitedFiles
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Test Summary: | Pass  Total  Time
mimes         |    3      3  8.4s
Test Summary: | Pass  Total   Time
unit tests    |   30     30  11.6s
Test Summary: | Pass  Total  Time
emtpy!(fig)   |   47     47  1.9s
Test Summary: | Pass  Total  Time
empty!(ax)    |   56     56  1.0s
Test Summary: | Pass  Total  Time
closing       |    2      2  3.2s
Test Summary:               | Pass  Total  Time
destroying singleton screen |    1      1  3.0s
stresstest multi displays: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/GLMakie/test/unit_tests.jl:229
  Expression: all((x->begin
            x ≈ first(images)
        end), images)
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/GLMakie/test/unit_tests.jl:229 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
 [4] top-level scope
   @ ~/dev/makiedev/dev/Makie/GLMakie/test/unit_tests.jl:211
Test Summary:             | Pass  Fail  Total   Time
stresstest multi displays |  133     1    134  15.8s
ERROR: LoadError: Some tests did not pass: 133 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/GLMakie/test/unit_tests.jl:210
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/GLMakie/test/runtests.jl:30
ERROR: Package GLMakie errored during testing

@jmert
Copy link
Author

jmert commented Feb 3, 2023

Moving the window between screens works without hanging now. And changing scalefactor doesn't make any visual difference now, is that expected?

Good to hear on the moving across monitors, but no, I must have broken something with the scaling now. What I'm expecting to see is that the window changes sizes to accommodate different native resolution — i.e. on a 100% monitor, an 800×600 window uses 800×600 pixels, but you move it across to a 200% monitor and then the window resizes to be 1600×1200 (so that it's roughly the same apparent size).

As far as the unit tests go, I started them and then switched desktops and got a failure. I again didn't time the switch deliberately so I'm not sure how it correlates to the failing test, but it definitely sounds like something isn't handling desktop switches properly.

Hmmm, that failure in the test suite is less obvious. Not sure what to think about that one yet.

@jmert
Copy link
Author

jmert commented Feb 4, 2023

I think I've tracked down the problem with the window not resizing when screen.scalefactor is set, but I don't know how to fix it yet.

The fundamental problem is that there's a race condition between the Observable callback on scalefactor trying to resize the window and the WindowAreaUpdater which is being called 30 times per second by being notified on the render tick. If the latter queries the GLFW window size before the former can finish resizing the window, the scene size is changed to effectively keep the window the same size.

I can reliably reproduce the behavior by adding a "long" callback in the scalefactor callback chain:

julia> fig, _, _ = scatter([1, 2], [3, 4]);

julia> screen = display(fig, resolution = (800, 600), scalefactor = 2, framerate = 30)
GLMakie.Screen(...)

julia> size(screen.root_scene)
(800, 600)

julia> on(screen.scalefactor, priority=typemax(Int)) do _
           sleep(0.1)
       end
ObserverFunction defined at REPL[404]:2 operating on Observable(2.0)

julia> screen.scalefactor[] = 1
1

julia> size(screen.root_scene)
(1600, 1200)

Note that the figure size has been doubled after switching to half the scale factor, and the window did not change size on my screen (but the plot contents were shrunk as expected).

Now if we reduce the frame rate of the render loop, we can still have the long callback run before the area updater recalculates the scene size based on the actual window size and the declared scale factor.

julia> fig, _, _ = scatter([1, 2], [3, 4]);

julia> screen = display(fig, resolution = (800, 600), framerate = 1)
GLMakie.Screen(...)

julia> size(screen.root_scene)
(800, 600)

julia> on(screen.scalefactor, priority=typemax(Int)) do _
           sleep(0.1)
       end
ObserverFunction defined at REPL[412]:2 operating on Observable(2.0)

julia> screen.scalefactor[] = 1
1

julia> size(screen.root_scene)
(800, 600)

Now the window changes size as expected, and the scene size is not modified. (It of course does take a full second to redraw the contents to match the new size.)

@jmert
Copy link
Author

jmert commented Feb 5, 2023

The latest commit is my solution to the race described in #2544 (comment). Instead of constantly polling for the window size at every render tick, we can instead just use another GLFW callback to be notified when the size of the window is changed (so that the scene size can be updated to match).

(Is this also theoretically better for overall performance since there should be less work done on each render tick? The same kind of change should be possible for the mouse position polling as well...)

@asinghvi17
Copy link
Member

asinghvi17 commented Feb 5, 2023

On my mac (MBP M1), line widths and text sizes look substantially thinner at px_per_unit = 2 than they do at px_per_unit = 1. Not sure exactly why this is, but it could be that we're setting px_per_unit too high. I observed similar phenomena when building MakieTeX.

Also, the default scalefactor seems to be doubling the size of the window - setting scalefactor[] = 1f0 resizes it to the size I was previously used to. Is this expected? At least personally, I find the window size a bit too large.

I believe that you can dictate size using physical units in matplotlib; perhaps that is a solution we could explore for the display-based backends.

I uploaded a Youtube video of what I found here.

https://youtu.be/vDgDbgf1Ebo

Otherwise, I really love this PR! The px_per_unit setting is working as expected, and switching desktops doesn't cause any issues for me.

(Sidenote: the "stresstest multiple displays" issue crops up again in tests, as mentioned in @pbouffard's comment).

Test Summary:               | Pass  Total  Time
destroying singleton screen |    1      1  3.0s
stresstest multi displays: Test Failed at /Users/anshul/Documents/Business/India/XKDR/dev/Makie.jl/GLMakie/test/unit_tests.jl:229
  Expression: all((x->begin
            x  first(images)
        end), images)
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
 [2] macro expansion
   @ ~/Documents/Business/India/XKDR/dev/Makie.jl/GLMakie/test/unit_tests.jl:229 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
 [4] top-level scope
   @ ~/Documents/Business/India/XKDR/dev/Makie.jl/GLMakie/test/unit_tests.jl:211
Test Summary:             | Pass  Fail  Total   Time
stresstest multi displays |  133     1    134  17.3s
ERROR: LoadError: Some tests did not pass: 133 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/anshul/Documents/Business/India/XKDR/dev/Makie.jl/GLMakie/test/unit_tests.jl:210
in expression starting at /Users/anshul/Documents/Business/India/XKDR/dev/Makie.jl/GLMakie/test/runtests.jl:30
ERROR: Package GLMakie errored during testing

@ffreyer
Copy link
Collaborator

ffreyer commented Feb 5, 2023

The latest commit is my solution to the race described in #2544 (comment). Instead of constantly polling for the window size at every render tick, we can instead just use another GLFW callback to be notified when the size of the window is changed (so that the scene size can be updated to match).

(Is this also theoretically better for overall performance since there should be less work done on each render tick? The same kind of change should be possible for the mouse position polling as well...)

I thought this was a change I made but I guess not JuliaPlots/GLMakie.jl#122.

I made the same kind of change for mouse position before, because mouse position updates happen per pixel moved. I thought we changed window area for the same reason, but size updates seem to be batched. Moving the window triggers per pixel moved though, so we should try batching them to reduce the number of updates we trigger. (Or skip them entirely I guess)

@jmert
Copy link
Author

jmert commented Feb 5, 2023

On my mac (MBP M1), line widths and text sizes look substantially thinner at px_per_unit = 2 than they do at px_per_unit = 1. Not sure exactly why this is, but it could be that we're setting px_per_unit too high. I observed similar phenomena when building MakieTeX.

(Given my 200% scaled screen where scalefactor = 2 and px_per_unit = 2 allow the window to render to physical screen pixels 1:1) When I switch down to scalefactor = 1 but leave px_per_unit = 2, I too observe lines get visually thinner, but I'm not surprised by that since the rendered image is now being compressed into half of the area. If I change px_per_unit = 1 as well, the 1:1 pixel relationship is restored, and text/lines are crisp and a normal width again.

Also, the default scalefactor seems to be doubling the size of the window - setting scalefactor[] = 1f0 resizes it to the size I was previously used to. Is this expected? At least personally, I find the window size a bit too large.

On at least Windows and Linux, yes, the doubling is expected and part of the goal. On my screen, old figures are far too small because they're sized for a low-DPI screen rather than a HiDPI one. There was Apple-specific code prior to this PR that has now been completely replaced. I thought the change I've been making are mostly just generalizing that, but since I can't actually test anything I do on OSX, it's all kind of just guessing on my part based on feedback I'm getting here.

For example, if you repeat the test I did in the very first comment — saving a figure to SVG, opening in a browser, opening the same figure in GLMakie, and then comparing the two for relative size — are they roughly the same? (My experience is that Firefox has figured out the whole HiDPI mess on Linux, so I use it as a reference to say 800x600 logical pixels should be this size on a HiDPI screen.)

Alternatively, some simple math checks also confirm I'm getting the apparent size I expect.

  • My monitor is 3840×2160.
  • The figure I opened is logically 800×600, which is doubled to 1600×1200.
  • 1600 / 3840 ≈ 0.42, so I expect the window to be about 42% of my entire screen width, which it is.
    How does this kind of simple comparison work for you?

As for the overall size, I too think the defaults end up a bit too big, but that's just part of the theme. The default 16 (pt? px?) font size is just bigger than I'd normally use, but that's relatively easy to fix with the theme:

set_theme!(fontsize = 12, resolution = (600, 450))
fig, _, _ = scatter([1, 2], [3, 4])

@jmert
Copy link
Author

jmert commented Feb 5, 2023

(Sidenote: the "stresstest multiple displays" issue crops up again in tests, as mentioned in @pbouffard's comment).

I can't reproduce that error on my system, so it's hard for me to debug.

I thought this was a change I made but I guess not JuliaPlots/GLMakie.jl#122.

I made the same kind of change for mouse position before, because mouse position updates happen per pixel moved. I thought we changed window area for the same reason, but size updates seem to be batched. Moving the window triggers per pixel moved though, so we should try batching them to reduce the number of updates we trigger. (Or skip them entirely I guess)

Oh, that PR link is interesting, since I'm essentially reverting that completely. I should probably add a test for the race bug I was seeing to help justify why the change to the callback is necessary, but it'd also be good to fully understand the "async rendering" which was being fixed. For instance, if I rapidly resize the window back and forth, I do see the contents "lag" behind the actual size, and I can sometimes get a "wobbling" effect as the queued renders catch up.

@pbouffard
Copy link
Contributor

pbouffard commented Feb 16, 2023

In case it's helpful (I'd really like to see this PR merged), I ran the tests on this branch rebased on master (and with Julia 1.9.0-beta4). This are mostly passing but this one in the GLMakie tests errors for me:

mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
running 189: Miter Joints for line rendering
running 190: Sampler type
running 191: Dynamically adjusting number of particles in a meshscatter
running 192: Explicit frame rendering
running 193: Contour and isosurface with correct depth
::set-output name=n_missing_refimages::0
Test Summary:                    | Pass  Fail  Total     Time
Reference Tests                  |  427     2    429  2m39.5s
  refimages                      |  407     2    409  2m32.6s
    refimages                    |  198     2    200  2m19.0s
      primitives                 |   11           11     9.5s
      text.jl                    |   22           22    24.2s
      attributes.jl              |    7            7     2.9s
      examples2d.jl              |   60           60    53.6s
      examples3d.jl              |   39           39    24.6s
      short_tests.jl             |   39           39    11.6s
      figures_and_makielayout.jl |    6            6     6.5s
      updating_plots             |   14     2     16     5.9s
        updating 2d primitives   |    1            1     0.6s
        updating multiple meshes |    1            1     0.9s
        record test              |    1            1     0.4s
        record test formats      |   11     2     13     4.0s
          mp4                    |    2     2      4     1.7s
          mkv                    |    4            4     0.7s
          webm                   |    4            4     1.0s
    Comparison scores            |  209          209     0.0s
  glmakie_refimages              |   20           20     5.9s
ERROR: LoadError: Some tests did not pass: 427 passed, 2 failed, 0 errored, 0 broken.
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/GLMakie/test/runtests.jl:32
ERROR: Package GLMakie errored during testing
Full output
(makiedev) pkg> test GLMakie
     Testing GLMakie
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_pmiAGh/Project.toml`
  [5789e2e9] FileIO v1.16.0
  [e9467ef8] GLMakie v0.8.2 `~/dev/makiedev/dev/Makie/GLMakie`
  [5c1252a2] GeometryBasics v0.4.5
⌃ [6218d12a] ImageMagick v1.2.1
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [44cfe95a] Pkg v1.9.0 `@stdlib/Pkg`
  [9a3f8284] Random `@stdlib/Random`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_pmiAGh/Manifest.toml`
  [621f4979] AbstractFFTs v1.2.1
  [1520ce14] AbstractTrees v0.4.4
  [79e6a3ab] Adapt v3.5.0
  [27a7e980] Animations v0.4.1
  [67c07d97] Automa v0.8.2
  [13072b0f] AxisAlgorithms v1.0.1
  [39de3d68] AxisArrays v0.4.6
  [fa961155] CEnum v0.4.2
  [49dc2e85] Calculus v0.5.1
  [d360d2e6] ChainRulesCore v1.15.7
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.20.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.10
  [5ae59095] Colors v0.12.10
  [34da2185] Compat v4.6.0
  [187b0558] ConstructionBase v1.4.1
  [d38c429a] Contour v0.6.2
  [9a962f9c] DataAPI v1.14.0
  [864edb3b] DataStructures v0.18.13
  [e2d170a0] DataValueInterfaces v1.0.0
  [b429d917] DensityInterface v0.4.0
  [31c24e10] Distributions v0.25.80
  [ffbed154] DocStringExtensions v0.9.3
  [fa6b7ba4] DualNumbers v0.6.8
  [411431e0] Extents v0.1.1
  [c87230d0] FFMPEG v0.4.1
  [7a1cc6ca] FFTW v1.5.0
  [5789e2e9] FileIO v1.16.0
  [1a297f60] FillArrays v0.13.7
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [b38be410] FreeType v4.0.0
  [663a7486] FreeTypeAbstraction v0.10.0
  [f7f18e0c] GLFW v3.4.1
  [e9467ef8] GLMakie v0.8.2 `~/dev/makiedev/dev/Makie/GLMakie`
  [46192b85] GPUArraysCore v0.1.4
  [cf35fbd7] GeoInterface v1.2.1
  [5c1252a2] GeometryBasics v0.4.5
  [a2bd30eb] Graphics v1.1.2
  [3955a311] GridLayoutBase v0.9.1
  [42e2da0e] Grisu v1.0.2
  [34004b35] HypergeometricFunctions v0.3.11
  [2803e5a7] ImageAxes v0.6.10
  [c817782e] ImageBase v0.1.5
  [a09fc81d] ImageCore v0.9.4
  [82e4d734] ImageIO v0.6.6
⌃ [6218d12a] ImageMagick v1.2.1
  [bc367c6b] ImageMetadata v0.9.8
  [9b13fd28] IndirectArrays v1.0.0
  [d25df0c9] Inflate v0.1.3
  [a98d9a8b] Interpolations v0.14.7
  [8197267c] IntervalSets v0.7.4
  [3587e190] InverseFunctions v0.1.8
  [92d709cd] IrrationalConstants v0.1.1
  [f1662d9f] Isoband v0.1.1
  [c8e1da08] IterTools v1.4.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.4.1
  [682c06a0] JSON v0.21.3
  [b835a17e] JpegTurbo v0.1.2
  [5ab0869b] KernelDensity v0.6.5
  [b964fa9f] LaTeXStrings v1.3.0
  [8cdb02fc] LazyModules v0.3.1
  [2ab3a3ac] LogExpFunctions v0.3.21
  [1914dd2f] MacroTools v0.5.10
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [20f20a25] MakieCore v0.6.2 `~/dev/makiedev/dev/Makie/MakieCore`
  [dbb5928d] MappedArrays v0.4.1
  [7eb4fadd] Match v1.2.0
  [0a4f8689] MathTeXEngine v0.5.4
  [7269a6da] MeshIO v0.4.10
  [978d7f02] MiniQhull v0.4.0
  [e1d29d7a] Missings v1.1.0
  [66fc600b] ModernGL v1.1.6
  [e94cdb99] MosaicViews v0.3.4
  [77ba4419] NaNMath v1.0.2
  [f09324ee] Netpbm v1.1.0
  [510215fc] Observables v0.5.4
  [6fe1bfb0] OffsetArrays v1.12.9
  [52e1d378] OpenEXR v0.3.2
  [bac558e1] OrderedCollections v1.4.1
  [90014a1f] PDMats v0.11.16
  [f57f5aa1] PNGFiles v0.3.17
  [19eb6ba3] Packing v0.5.0
  [5432bcbf] PaddedViews v0.5.11
  [69de0a69] Parsers v2.5.7
  [eebad327] PkgVersion v0.3.2
  [995b91a9] PlotUtils v1.3.4
  [647866c9] PolygonOps v0.1.2
  [21216c6a] Preferences v1.3.0
  [92933f4c] ProgressMeter v1.7.2
  [4b34888f] QOI v1.0.0
  [1fd47b50] QuadGK v2.8.1
  [b3c3ace0] RangeArrays v0.3.2
  [c84ed2f1] Ratios v0.4.3
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.0
  [ae029012] Requires v1.3.0
  [79098fc4] Rmath v0.7.1
  [fdea26ae] SIMD v3.4.4
  [7b38b023] ScanByte v0.3.3
  [6c6a2e73] Scratch v1.1.1
  [efcf1570] Setfield v1.1.1
  [65257c39] ShaderAbstractions v0.3.0
  [992d4aef] Showoff v1.0.3
  [73760f76] SignedDistanceFields v0.4.0
  [699a6c99] SimpleTraits v0.9.4
  [45858cf5] Sixel v0.1.2
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.0
  [276daf66] SpecialFunctions v2.1.7
  [c5dd0088] StableHashTraits v0.3.1
  [cae243ae] StackViews v0.1.1
  [90137ffa] StaticArrays v1.5.15
  [1e83bf80] StaticArraysCore v1.4.0
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [4c63d2b9] StatsFuns v1.1.1
  [09ab397b] StructArrays v0.6.14
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.10.0
  [62fd8b95] TensorCore v0.1.1
  [731e570b] TiffImages v0.6.3
  [3bb67fe8] TranscodingStreams v0.9.11
  [981d1d27] TriplotBase v0.1.0
  [9d95972d] TupleTools v1.3.0
  [1cfade01] UnicodeFun v0.4.1
  [efce3f68] WoodburyMatrices v0.5.5
  [6e34b625] Bzip2_jll v1.0.8+0
  [83423d85] Cairo_jll v1.16.1+1
  [5ae413db] EarCut_jll v2.2.4+0
  [2e619515] Expat_jll v2.4.8+0
  [b22a6f82] FFMPEG_jll v4.4.2+2
  [f5851436] FFTW_jll v3.3.10+0
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.10.4+0
  [559328eb] FriBidi_jll v1.0.10+0
  [0656b61e] GLFW_jll v3.3.8+0
  [78b55507] Gettext_jll v0.21.0+0
  [61579ee1] Ghostscript_jll v9.55.0+4
  [7746bdde] Glib_jll v2.74.0+2
  [3b182d85] Graphite2_jll v1.3.14+0
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
⌅ [c73af94c] ImageMagick_jll v6.9.12+3
  [905a6f67] Imath_jll v3.1.2+0
  [1d5cc7b8] IntelOpenMP_jll v2018.0.3+2
  [aacddb02] JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
  [dd4b983a] LZO_jll v2.10.1+0
⌅ [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7e76a0d4] Libglvnd_jll v1.6.0+0
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.16.1+2
  [4b2f31a3] Libmount_jll v2.35.0+0
  [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
  [856f044c] MKL_jll v2022.2.0+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [18a262bb] OpenEXR_jll v3.1.1+0
  [458c3c95] OpenSSL_jll v1.1.20+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
  [30392449] Pixman_jll v0.40.1+0
  [460c41e3] QhullMiniWrapper_jll v1.0.0+1
⌅ [784f63db] Qhull_jll v8.0.1001+0
  [f50d1b31] Rmath_jll v0.4.0+0
  [02c8fc9c] XML2_jll v2.10.3+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+4
  [935fb764] Xorg_libXcursor_jll v1.2.0+4
  [a3789734] Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] Xorg_libXi_jll v1.7.10+4
  [d1454406] Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+3
  [c5fb5394] Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] Zstd_jll v1.5.4+0
  [9a68df92] isoband_jll v0.2.3+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
  [b53b4c65] libpng_jll v1.6.38+0
  [075b6546] libsixel_jll v1.10.3+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [8bf52ea8] CRC32c `@stdlib/CRC32c`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [9fa8497b] Future `@stdlib/Future`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [4af54fe1] LazyArtifacts `@stdlib/LazyArtifacts`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.9.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics v1.9.0 `@stdlib/Statistics`
  [4607b0f0] SuiteSparse `@stdlib/SuiteSparse`
  [fa267f1f] TOML v1.0.3 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.0 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v1.0.2+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.84.0+0 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.10.2+0 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.28.0+0 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2022.10.11 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.21+0 `@stdlib/OpenBLAS_jll`
  [05823500] OpenLibm_jll v0.8.1+0 `@stdlib/OpenLibm_jll`
  [efcefdf7] PCRE2_jll v10.42.0+0 `@stdlib/PCRE2_jll`
  [bea87d4a] SuiteSparse_jll v5.10.1+6 `@stdlib/SuiteSparse_jll`
  [83775a58] Zlib_jll v1.2.13+0 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v5.4.0+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.48.0+0 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v17.4.0+0 `@stdlib/p7zip_jll`
        Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading.
Precompiling environment...
  3 dependencies successfully precompiled in 45 seconds. 201 already precompiled.
  2 dependencies had warnings during precompilation:
┌ GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
│  WARNING: Makie.MakieLayout is deprecatedThe module `MakieLayout` has been removed and integrated into Makie, so simply replace all usage of `MakieLayout` with `Makie`.
│    likely near none:1
│  WARNING: importing deprecated binding Makie.MakieLayout into GLMakie.
└
┌ ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1]
│  WARNING: importing deprecated binding Colors.RGB1 into ImageCore.
│  WARNING: importing deprecated binding Colors.RGB4 into ImageCore.
└
     Testing Running tests...
┌ Warning: TESTING WITHOUT OPENGL DEBUGGING
└ @ Main ~/dev/makiedev/dev/Makie/GLMakie/test/runtests.jl:12
   Resolving package versions...
   Installed TiledIteration ────────── v0.3.1
   Installed ImageSegmentation ─────── v1.7.0
   Installed MetaGraphs ────────────── v0.7.2
   Installed Images ────────────────── v0.25.2
   Installed ArnoldiMethod ─────────── v0.2.0
   Installed RegionTrees ───────────── v0.3.2
   Installed CustomUnitRanges ──────── v1.0.2
   Installed ComputationalResources ── v0.3.2
   Installed CatIndices ────────────── v0.2.2
   Installed ImageShow ─────────────── v0.3.6
   Installed ImageQualityIndexes ───── v0.3.4
   Installed ImageTransformations ──── v0.9.5
   Installed Graphs ────────────────── v1.8.0
   Installed StableRNGs ────────────── v1.0.0
   Installed IntegralArrays ────────── v0.1.5
   Installed SimpleWeightedGraphs ──── v1.2.2
   Installed ImageDistances ────────── v0.2.16
   Installed FFTViews ──────────────── v0.3.2
   Installed ImageMorphology ───────── v0.3.2
   Installed ImageContrastAdjustment ─ v0.3.10
   Installed ImageFiltering ────────── v0.7.3
   Installed Clustering ────────────── v0.14.3
   Installed JLD2 ──────────────────── v0.4.30
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_pmiAGh/Project.toml`
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_pmiAGh/Manifest.toml`
  [ec485272] + ArnoldiMethod v0.2.0
  [aafaddc9] + CatIndices v0.2.2
  [324d7699] + CategoricalArrays v0.10.7
  [aaaa29a8] + Clustering v0.14.3
  [ed09eef8] + ComputationalResources v0.3.2
  [150eb455] + CoordinateTransformations v0.6.2
  [dc8bdbbb] + CustomUnitRanges v1.0.2
  [8bb1440f] + DelimitedFiles v1.9.1
  [b4f34e82] + Distances v0.10.7
  [4f61f5a4] + FFTViews v0.3.2
  [86223c79] + Graphs v1.8.0
  [f332f351] + ImageContrastAdjustment v0.3.10
  [51556ac3] + ImageDistances v0.2.16
  [6a3955dd] + ImageFiltering v0.7.3
⌅ [787d08f9] + ImageMorphology v0.3.2
  [2996bd0c] + ImageQualityIndexes v0.3.4
  [80713f31] + ImageSegmentation v1.7.0
  [4e3cecfd] + ImageShow v0.3.6
  [02fcd773] + ImageTransformations v0.9.5
  [916415d5] + Images v0.25.2
  [1d092043] + IntegralArrays v0.1.5
  [033835bb] + JLD2 v0.4.30
  [626554b9] + MetaGraphs v0.7.2
  [b8a86587] + NearestNeighbors v0.4.13
  [d96e819e] + Parameters v0.12.3
  [94ee1d12] + Quaternions v0.7.4
  [c1ae055f] + RealDot v0.1.0
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
  [dee08c22] + RegionTrees v0.3.2
  [6038ab10] + Rotations v1.3.4
  [47aef6b3] + SimpleWeightedGraphs v1.2.2
  [860ef19b] + StableRNGs v1.0.0
⌅ [06e1c1a7] + TiledIteration v0.3.1
  [3a884ed6] + UnPack v1.0.2
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
WARNING: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).
Test Summary: | Pass  Total  Time
mimes         |    3      3  2.1s
Test Summary: | Pass  Total  Time
unit tests    |   30     30  7.4s
Test Summary: | Pass  Total  Time
emtpy!(fig)   |    1      1  1.6s
Test Summary: | Pass  Total  Time
empty!(ax)    |   56     56  1.0s
Test Summary: | Pass  Total  Time
closing       |    2      2  3.3s
Test Summary:               | Pass  Total  Time
destroying singleton screen |    1      1  3.0s
Test Summary:             | Pass  Total   Time
stresstest multi displays |  134    134  13.7s
Test Summary:  | Pass  Broken  Total  Time
HiDPI displays |   14       2     16  1.1s
running   1: lines with gaps
running   2: scatters
running   3: scatter rotations
running   4: scatter with stroke
running   5: scatter with glow
running   6: scatter image markers
running   7: basic polygon shapes
running   8: BezierPath markers
running   9: complex_bezier_markers
running  10: polygon markers
running  11: marke glyph alignment
running  12: heatmap_with_labels
running  13: data space
running  14: single_strings_single_positions
running  15: multi_strings_multi_positions
running  16: single_strings_single_positions_justification
running  17: multi_boundingboxes
running  18: single_boundingboxes
running  19: text_in_3d_axis
running  20: empty_lines
running  21: 3D screenspace annotations
running  22: Text offset
running  23: Log10 text
running  24: latex strings
running  25: latex hlines in axis
running  26: latex simple
running  27: latex bb
running  28: latex updates
running  29: update annotation style
running  30: latex ticks
running  31: dynamic latex ticks
running  32: Word Wrapping
running  33: label type change
running  34: glowcolor, glowwidth
running  35: isorange, isovalue
running  36: levels
running  37: position
running  38: rotation
running  39: shading
running  40: visible
running  41: Test heatmap + image overlap
running  42: Test RGB heatmaps
running  43: heatmap_interpolation
running  44: poly and colormap
running  45: quiver
running  46: Arrows on hemisphere
running  47: image
running  48: FEM polygon 2D
running  49: FEM mesh 2D
running  50: colored triangle
running  51: colored triangle with poly
running  52: scale_plot
running  53: Polygons
running  54: Text Annotation
running  55: Text rotation
running  56: Standard deviation band
running  57: Streamplot animation
running  58: Line changing colour
running  59: streamplot
running  60: Transforming lines
running  61: Axes label rotations
running  62: Colorbar label rotations
running  63: Errorbars x y low high
running  64: Rangebars x y low high
running  65: Simple pie chart
running  66: Hollow pie chart
running  67: Open pie chart
running  68: intersecting polygon
running  69: Line Function
running  70: Grouped bar
running  71: space 2D
running  72: space 2D autolimits
running  73: Scatter & Text transformations
running  74: Array of Images Scatter
running  75: Image Scatter different sizes
running  76: 2D surface with explicit color
running  77: heatmap and image colormap interpolation
running  78: nonlinear colormap
running  79: colormap with specific values
running  80: multi rect with poly
running  81: minor grid & scales
running  82: Tooltip
running  83: tricontourf
running  84: tricontourf extendhigh extendlow
running  85: tricontourf relative mode
running  86: tricontourf manual vs delaunay
running  87: marker offset in data space
running  88: trimspine
running  89: hexbin bin int
running  90: hexbin bin tuple
running  91: hexbin two cellsizes
running  92: hexbin one cellsize
running  93: hexbin threshold
running  94: hexbin scale
running  95: Latex labels after the fact
running  96: Rich text
running  97: bracket scalar
running  98: bracket vector
running  99: Stephist
running 100: LaTeXStrings linesegment offsets
running 101: Image on Geometry (Moon)
running 102: Image on Geometry (Earth)
running 103: Orthographic Camera
running 104: Volume Function
running 105: Textured Mesh
running 106: Load Mesh
running 107: Colored Mesh
running 108: Wireframe of a Mesh
running 109: Wireframe of Sphere
running 110: Wireframe of a Surface
running 111: Surface with image
running 112: Meshscatter Function
running 113: scatter
running 114: Marker sizes
running 115: Record Video
running 116: 3D Contour with 2D contour slices
running 117: Contour3d
running 118: Arrows 3D
running 119: Image on Surface Sphere
running 120: Arrows on Sphere
running 121: surface + contour3d
running 122: FEM mesh 3D
running 123: OldAxis + Surface
running 124: Fluctuation 3D
running 125: Connected Sphere
running 126: image scatter
running 127: Simple meshscatter
running 128: Animated surface and wireframe
running 129: Normals of a Cat
running 130: Sphere Mesh
running 131: Unicode Marker
running 132: Merged color Mesh
running 133: Line GIF
running 134: Surface + wireframe + contour
running 135: Streamplot 3D
running 136: Volume on black background
running 137: Depth Shift
running 138: Order Independent Transparency
running 139: space 3D
running 140: thick arc
running 141: stroked rect poly
running 142: array of rects poly
running 143: char marker scenespace
running 144: lines number color
running 145: lines array of colors
running 146: scatter interval
running 147: scatter linrange
running 148: scatter rotation
running 149: heatmap transparent colormap
running 150: contour small x
running 151: contour small y
running 152: contour with levels
running 153: contour with levels array
running 154: contour with color per level
running 155: contour with colorrange
running 156: circle line
running 157: streamplot with func
running 158: lines with func
running 159: scatter with func
running 160: volume translated
running 161: meshscatter color numbers
running 162: meshscatter color array
running 163: transparent mesh texture
running 164: Unequal x and y sizes in surface
running 165: Matrices of data in surfaces
running 166: heatmaps & surface
running 167: log10 heatmap
running 168: reverse range heatmap
running 169: lines linesegments width test
running 170: multipoly with multi strokes
running 171: fast pixel marker
running 172: axsi3
running 173: pattern barplot
running 174: barplot lowclip highclip nan_color
running 175: Colorbar
running 176: scene visibility
running 177: redisplay after closing screen
running 178: space test in transformed axis
running 179: Figure and Subplots
running 180: Figure with Blocks
running 181: menus
running 182: Label with text wrapping
running 183: Axis titles and subtitles
running 184: Legend draw order
running 185: updating 2d primitives
running 186: updating multiple meshes
running 187: record test
running 188: record test formats
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
running 189: Miter Joints for line rendering
running 190: Sampler type
running 191: Dynamically adjusting number of particles in a meshscatter
running 192: Explicit frame rendering
running 193: Contour and isosurface with correct depth
::set-output name=n_missing_refimages::0
Test Summary:                    | Pass  Fail  Total     Time
Reference Tests                  |  427     2    429  2m39.5s
  refimages                      |  407     2    409  2m32.6s
    refimages                    |  198     2    200  2m19.0s
      primitives                 |   11           11     9.5s
      text.jl                    |   22           22    24.2s
      attributes.jl              |    7            7     2.9s
      examples2d.jl              |   60           60    53.6s
      examples3d.jl              |   39           39    24.6s
      short_tests.jl             |   39           39    11.6s
      figures_and_makielayout.jl |    6            6     6.5s
      updating_plots             |   14     2     16     5.9s
        updating 2d primitives   |    1            1     0.6s
        updating multiple meshes |    1            1     0.9s
        record test              |    1            1     0.4s
        record test formats      |   11     2     13     4.0s
          mp4                    |    2     2      4     1.7s
          mkv                    |    4            4     0.7s
          webm                   |    4            4     1.0s
    Comparison scores            |  209          209     0.0s
  glmakie_refimages              |   20           20     5.9s
ERROR: LoadError: Some tests did not pass: 427 passed, 2 failed, 0 errored, 0 broken.
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/GLMakie/test/runtests.jl:32
ERROR: Package GLMakie errored during testing

Similar error for CairoMakie tests:

mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
Test Summary:                  | Pass  Fail  Broken  Total     Time
refimages                      |  325     2      41    368  1m55.5s
  refimages                    |  157     2      41    200  1m45.3s
    primitives                 |    9             2     11     7.3s
    text.jl                    |   22                   22    16.3s
    attributes.jl              |    5             2      7     1.8s
    examples2d.jl              |   50            10     60    43.5s
    examples3d.jl              |   17            22     39    14.8s
    short_tests.jl             |   34             5     39    10.1s
    figures_and_makielayout.jl |    6                    6     6.0s
    updating_plots             |   14     2             16     5.5s
      updating 2d primitives   |    1                    1     0.3s
      updating multiple meshes |    1                    1     1.0s
      record test              |    1                    1     0.4s
      record test formats      |   11     2             13     3.7s
        mp4                    |    2     2              4     1.7s
        mkv                    |    4                    4     0.6s
        webm                   |    4                    4     1.0s
  Comparison scores            |  168                  168     0.0s
ERROR: LoadError: Some tests did not pass: 325 passed, 2 failed, 0 errored, 41 broken.
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/CairoMakie/test/runtests.jl:175
ERROR: Package CairoMakie errored during testing

Most WGLMakie tests pass but there were some failures:

]test WGLMakie output
(makiedev) pkg> test WGLMakie
     Testing WGLMakie
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_jDKbbp/Project.toml`
  [a1bb12fb] Electron v4.1.1
  [5789e2e9] FileIO v1.16.0
⌃ [6218d12a] ImageMagick v1.2.1
  [824d6782] JSServe v2.1.0
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [276b4fcb] WGLMakie v0.8.6 `~/dev/makiedev/dev/Makie/WGLMakie`
  [44cfe95a] Pkg v1.9.0 `@stdlib/Pkg`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_jDKbbp/Manifest.toml`
  [621f4979] AbstractFFTs v1.2.1
  [1520ce14] AbstractTrees v0.4.4
  [79e6a3ab] Adapt v3.5.0
  [27a7e980] Animations v0.4.1
  [67c07d97] Automa v0.8.2
  [13072b0f] AxisAlgorithms v1.0.1
  [39de3d68] AxisArrays v0.4.6
  [d1d4a3ce] BitFlags v0.1.7
  [fa961155] CEnum v0.4.2
  [49dc2e85] Calculus v0.5.1
  [d360d2e6] ChainRulesCore v1.15.7
  [944b1d66] CodecZlib v0.7.1
  [a2cac450] ColorBrewer v0.4.0
  [35d6a980] ColorSchemes v3.20.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.10
  [5ae59095] Colors v0.12.10
  [34da2185] Compat v4.6.0
  [187b0558] ConstructionBase v1.4.1
  [d38c429a] Contour v0.6.2
  [9a962f9c] DataAPI v1.14.0
  [864edb3b] DataStructures v0.18.13
  [e2d170a0] DataValueInterfaces v1.0.0
  [b429d917] DensityInterface v0.4.0
  [31c24e10] Distributions v0.25.80
  [ffbed154] DocStringExtensions v0.9.3
  [fa6b7ba4] DualNumbers v0.6.8
  [a1bb12fb] Electron v4.1.1
  [411431e0] Extents v0.1.1
  [c87230d0] FFMPEG v0.4.1
  [7a1cc6ca] FFTW v1.5.0
  [5789e2e9] FileIO v1.16.0
  [8fc22ac5] FilePaths v0.8.3
  [48062228] FilePathsBase v0.9.20
  [1a297f60] FillArrays v0.13.7
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [b38be410] FreeType v4.0.0
  [663a7486] FreeTypeAbstraction v0.10.0
  [46192b85] GPUArraysCore v0.1.4
  [cf35fbd7] GeoInterface v1.2.1
  [5c1252a2] GeometryBasics v0.4.5
  [a2bd30eb] Graphics v1.1.2
  [3955a311] GridLayoutBase v0.9.1
  [42e2da0e] Grisu v1.0.2
  [cd3eb016] HTTP v1.7.4
  [34004b35] HypergeometricFunctions v0.3.11
  [47d2ed2b] Hyperscript v0.0.4
  [2803e5a7] ImageAxes v0.6.10
  [c817782e] ImageBase v0.1.5
  [a09fc81d] ImageCore v0.9.4
  [82e4d734] ImageIO v0.6.6
⌃ [6218d12a] ImageMagick v1.2.1
  [bc367c6b] ImageMetadata v0.9.8
  [9b13fd28] IndirectArrays v1.0.0
  [d25df0c9] Inflate v0.1.3
  [83e8ac13] IniFile v0.5.1
  [a98d9a8b] Interpolations v0.14.7
  [8197267c] IntervalSets v0.7.4
  [3587e190] InverseFunctions v0.1.8
  [92d709cd] IrrationalConstants v0.1.1
  [f1662d9f] Isoband v0.1.1
  [c8e1da08] IterTools v1.4.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.4.1
  [682c06a0] JSON v0.21.3
  [824d6782] JSServe v2.1.0
  [b835a17e] JpegTurbo v0.1.2
  [5ab0869b] KernelDensity v0.6.5
  [b964fa9f] LaTeXStrings v1.3.0
  [8cdb02fc] LazyModules v0.3.1
  [2ab3a3ac] LogExpFunctions v0.3.21
  [e6f89c97] LoggingExtras v1.0.0
  [1914dd2f] MacroTools v0.5.10
  [ee78f7c6] Makie v0.19.2 `~/dev/makiedev/dev/Makie`
  [20f20a25] MakieCore v0.6.2 `~/dev/makiedev/dev/Makie/MakieCore`
  [dbb5928d] MappedArrays v0.4.1
  [7eb4fadd] Match v1.2.0
  [0a4f8689] MathTeXEngine v0.5.4
  [739be429] MbedTLS v1.1.7
  [978d7f02] MiniQhull v0.4.0
  [e1d29d7a] Missings v1.1.0
  [e94cdb99] MosaicViews v0.3.4
  [99f44e22] MsgPack v1.2.0
  [77ba4419] NaNMath v1.0.2
  [f09324ee] Netpbm v1.1.0
  [510215fc] Observables v0.5.4
  [6fe1bfb0] OffsetArrays v1.12.9
  [52e1d378] OpenEXR v0.3.2
  [4d8831e6] OpenSSL v1.3.3
  [bac558e1] OrderedCollections v1.4.1
  [90014a1f] PDMats v0.11.16
  [f57f5aa1] PNGFiles v0.3.17
  [19eb6ba3] Packing v0.5.0
  [5432bcbf] PaddedViews v0.5.11
  [69de0a69] Parsers v2.5.7
  [eebad327] PkgVersion v0.3.2
  [995b91a9] PlotUtils v1.3.4
  [647866c9] PolygonOps v0.1.2
  [21216c6a] Preferences v1.3.0
  [92933f4c] ProgressMeter v1.7.2
  [4b34888f] QOI v1.0.0
  [1fd47b50] QuadGK v2.8.1
  [b3c3ace0] RangeArrays v0.3.2
  [c84ed2f1] Ratios v0.4.3
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.0
  [ae029012] Requires v1.3.0
  [79098fc4] Rmath v0.7.1
  [fdea26ae] SIMD v3.4.4
  [7b38b023] ScanByte v0.3.3
  [6c6a2e73] Scratch v1.1.1
  [efcf1570] Setfield v1.1.1
  [65257c39] ShaderAbstractions v0.3.0
  [992d4aef] Showoff v1.0.3
  [73760f76] SignedDistanceFields v0.4.0
  [777ac1f9] SimpleBufferStream v1.1.0
  [699a6c99] SimpleTraits v0.9.4
  [45858cf5] Sixel v0.1.2
  [66db9d55] SnoopPrecompile v1.0.3
  [a2af1166] SortingAlgorithms v1.1.0
  [276daf66] SpecialFunctions v2.1.7
  [c5dd0088] StableHashTraits v0.3.1
  [cae243ae] StackViews v0.1.1
  [90137ffa] StaticArrays v1.5.15
  [1e83bf80] StaticArraysCore v1.4.0
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [4c63d2b9] StatsFuns v1.1.1
  [09ab397b] StructArrays v0.6.14
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.10.0
  [62fd8b95] TensorCore v0.1.1
  [731e570b] TiffImages v0.6.3
  [3bb67fe8] TranscodingStreams v0.9.11
  [981d1d27] TriplotBase v0.1.0
  [9d95972d] TupleTools v1.3.0
  [5c2747f8] URIs v1.4.2
  [1cfade01] UnicodeFun v0.4.1
  [276b4fcb] WGLMakie v0.8.6 `~/dev/makiedev/dev/Makie/WGLMakie`
  [eead4739] WidgetsBase v0.1.4
  [efce3f68] WoodburyMatrices v0.5.5
  [6e34b625] Bzip2_jll v1.0.8+0
  [83423d85] Cairo_jll v1.16.1+1
  [04572ae6] Deno_jll v1.28.1+0
  [5ae413db] EarCut_jll v2.2.4+0
  [2e619515] Expat_jll v2.4.8+0
  [b22a6f82] FFMPEG_jll v4.4.2+2
  [f5851436] FFTW_jll v3.3.10+0
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.10.4+0
  [559328eb] FriBidi_jll v1.0.10+0
  [78b55507] Gettext_jll v0.21.0+0
  [61579ee1] Ghostscript_jll v9.55.0+4
  [7746bdde] Glib_jll v2.74.0+2
  [3b182d85] Graphite2_jll v1.3.14+0
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
⌅ [c73af94c] ImageMagick_jll v6.9.12+3
  [905a6f67] Imath_jll v3.1.2+0
  [1d5cc7b8] IntelOpenMP_jll v2018.0.3+2
  [aacddb02] JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
  [dd4b983a] LZO_jll v2.10.1+0
⌅ [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.16.1+2
  [4b2f31a3] Libmount_jll v2.35.0+0
  [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
  [856f044c] MKL_jll v2022.2.0+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [18a262bb] OpenEXR_jll v3.1.1+0
  [458c3c95] OpenSSL_jll v1.1.20+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
  [30392449] Pixman_jll v0.40.1+0
  [460c41e3] QhullMiniWrapper_jll v1.0.0+1
⌅ [784f63db] Qhull_jll v8.0.1001+0
  [f50d1b31] Rmath_jll v0.4.0+0
  [02c8fc9c] XML2_jll v2.10.3+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+4
  [a3789734] Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+3
  [c5fb5394] Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] Zstd_jll v1.5.4+0
  [9a68df92] isoband_jll v0.2.3+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
  [b53b4c65] libpng_jll v1.6.38+0
  [075b6546] libsixel_jll v1.10.3+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [0dad84c5] ArgTools v1.1.1 `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [8bf52ea8] CRC32c `@stdlib/CRC32c`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads v1.6.0 `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [9fa8497b] Future `@stdlib/Future`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [4af54fe1] LazyArtifacts `@stdlib/LazyArtifacts`
  [b27032c2] LibCURL v0.6.3 `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions v1.2.0 `@stdlib/NetworkOptions`
  [44cfe95a] Pkg v1.9.0 `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics v1.9.0 `@stdlib/Statistics`
  [4607b0f0] SuiteSparse `@stdlib/SuiteSparse`
  [fa267f1f] TOML v1.0.3 `@stdlib/TOML`
  [a4e569a6] Tar v1.10.0 `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll v1.0.2+0 `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll v7.84.0+0 `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll v1.10.2+0 `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll v2.28.0+0 `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll v2022.10.11 `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll v0.3.21+0 `@stdlib/OpenBLAS_jll`
  [05823500] OpenLibm_jll v0.8.1+0 `@stdlib/OpenLibm_jll`
  [efcefdf7] PCRE2_jll v10.42.0+0 `@stdlib/PCRE2_jll`
  [bea87d4a] SuiteSparse_jll v5.10.1+6 `@stdlib/SuiteSparse_jll`
  [83775a58] Zlib_jll v1.2.13+0 `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll v5.4.0+0 `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll v1.48.0+0 `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll v17.4.0+0 `@stdlib/p7zip_jll`
        Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading.
Precompiling environment...
  11 dependencies successfully precompiled in 51 seconds. 200 already precompiled.
  1 dependency had warnings during precompilation:
┌ WGLMakie [276b4fcb-3e11-5398-bf8b-a0c2d153d008]
│  WARNING: Makie.MakieLayout is deprecatedThe module `MakieLayout` has been removed and integrated into Makie, so simply replace all usage of `MakieLayout` with `Makie`.
│    likely near none:1
│  WARNING: importing deprecated binding Makie.MakieLayout into WGLMakie.
└
     Testing Running tests...
objc[36673]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x225be9518) and /Users/patrick/.julia/artifacts/12f3018147190ddc494f686e5fbefe8d84f16efb/Julia.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x1099d5348). One of the two will be used. Which one is undefined.
   Resolving package versions...
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_jDKbbp/Project.toml`
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
    Updating `/private/var/folders/_g/v7k14vb9231gm0t5fg0sp0180000gn/T/jl_jDKbbp/Manifest.toml`
  [ec485272] + ArnoldiMethod v0.2.0
  [aafaddc9] + CatIndices v0.2.2
  [324d7699] + CategoricalArrays v0.10.7
  [aaaa29a8] + Clustering v0.14.3
  [ed09eef8] + ComputationalResources v0.3.2
  [150eb455] + CoordinateTransformations v0.6.2
  [dc8bdbbb] + CustomUnitRanges v1.0.2
  [8bb1440f] + DelimitedFiles v1.9.1
  [b4f34e82] + Distances v0.10.7
  [4f61f5a4] + FFTViews v0.3.2
  [86223c79] + Graphs v1.8.0
  [f332f351] + ImageContrastAdjustment v0.3.10
  [51556ac3] + ImageDistances v0.2.16
  [6a3955dd] + ImageFiltering v0.7.3
⌅ [787d08f9] + ImageMorphology v0.3.2
  [2996bd0c] + ImageQualityIndexes v0.3.4
  [80713f31] + ImageSegmentation v1.7.0
  [4e3cecfd] + ImageShow v0.3.6
  [02fcd773] + ImageTransformations v0.9.5
  [916415d5] + Images v0.25.2
  [1d092043] + IntegralArrays v0.1.5
  [033835bb] + JLD2 v0.4.30
  [7269a6da] + MeshIO v0.4.10
  [626554b9] + MetaGraphs v0.7.2
  [b8a86587] + NearestNeighbors v0.4.13
  [d96e819e] + Parameters v0.12.3
  [94ee1d12] + Quaternions v0.7.4
  [c1ae055f] + RealDot v0.1.0
  [d37af2e0] + ReferenceTests v0.1.0 `~/dev/makiedev/dev/Makie/ReferenceTests`
  [dee08c22] + RegionTrees v0.3.2
  [6038ab10] + Rotations v1.3.4
  [47aef6b3] + SimpleWeightedGraphs v1.2.2
  [860ef19b] + StableRNGs v1.0.0
⌅ [06e1c1a7] + TiledIteration v0.3.1
  [3a884ed6] + UnPack v1.0.2
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Test Summary: | Pass  Total  Time
mimes         |    7      7  1.7s
running   1: lines with gaps
running   2: scatters
running   3: scatter rotations
running   4: scatter image markers
running   5: basic polygon shapes
running   6: BezierPath markers
running   7: complex_bezier_markers
running   8: polygon markers
running   9: marke glyph alignment
running  10: heatmap_with_labels
running  11: data space
running  12: single_strings_single_positions
running  13: multi_strings_multi_positions
running  14: single_strings_single_positions_justification
running  15: multi_boundingboxes
running  16: single_boundingboxes
running  17: text_in_3d_axis
running  18: empty_lines
running  19: 3D screenspace annotations
running  20: Text offset
running  21: Log10 text
running  22: latex strings
running  23: latex hlines in axis
running  24: latex simple
running  25: latex bb
running  26: latex updates
running  27: update annotation style
running  28: latex ticks
running  29: dynamic latex ticks
running  30: Word Wrapping
running  31: label type change
running  32: glowcolor, glowwidth
running  33: isorange, isovalue
running  34: levels
running  35: position
running  36: rotation
running  37: shading
running  38: visible
running  39: Test RGB heatmaps
running  40: heatmap_interpolation
running  41: poly and colormap
running  42: quiver
running  43: Arrows on hemisphere
running  44: image
running  45: colored triangle
running  46: colored triangle with poly
running  47: scale_plot
running  48: Polygons
running  49: Text Annotation
running  50: Text rotation
running  51: Standard deviation band
running  52: Line changing colour
running  53: streamplot
running  54: Axes label rotations
running  55: Colorbar label rotations
running  56: Simple pie chart
running  57: Hollow pie chart
running  58: Open pie chart
running  59: intersecting polygon
running  60: Line Function
running  61: Grouped bar
running  62: space 2D
running  63: space 2D autolimits
running  64: Scatter & Text transformations
running  65: 2D surface with explicit color
running  66: heatmap and image colormap interpolation
running  67: nonlinear colormap
running  68: colormap with specific values
running  69: multi rect with poly
running  70: minor grid & scales
running  71: Tooltip
running  72: tricontourf
running  73: tricontourf extendhigh extendlow
running  74: tricontourf relative mode
running  75: tricontourf manual vs delaunay
running  76: marker offset in data space
running  77: trimspine
running  78: hexbin bin int
running  79: hexbin bin tuple
running  80: hexbin two cellsizes
running  81: hexbin one cellsize
running  82: hexbin threshold
running  83: hexbin scale
running  84: Latex labels after the fact
running  85: Rich text
running  86: bracket scalar
running  87: bracket vector
running  88: Stephist
running  89: LaTeXStrings linesegment offsets
running  90: Image on Geometry (Moon)
running  91: Image on Geometry (Earth)
running  92: Orthographic Camera
running  93: Volume Function
running  94: Textured Mesh
running  95: Load Mesh
running  96: Colored Mesh
running  97: Wireframe of a Mesh
running  98: Wireframe of Sphere
running  99: Meshscatter Function
running 100: scatter
running 101: Marker sizes
running 102: 3D Contour with 2D contour slices
running 103: Contour3d
running 104: Arrows 3D
running 105: Arrows on Sphere
running 106: FEM mesh 3D
running 107: Fluctuation 3D
running 108: Connected Sphere
running 109: Simple meshscatter
running 110: Normals of a Cat
running 111: Sphere Mesh
running 112: Unicode Marker
running 113: Merged color Mesh
running 114: Surface + wireframe + contour
running 115: Streamplot 3D
running 116: Volume on black background
running 117: Depth Shift
running 118: space 3D
running 119: thick arc
running 120: stroked rect poly
running 121: array of rects poly
running 122: char marker scenespace
running 123: lines number color
running 124: lines array of colors
running 125: scatter interval
running 126: scatter linrange
running 127: scatter rotation
running 128: heatmap transparent colormap
running 129: contour small x
running 130: contour small y
running 131: contour with levels
running 132: contour with levels array
running 133: contour with color per level
running 134: contour with colorrange
running 135: circle line
running 136: streamplot with func
running 137: lines with func
running 138: scatter with func
running 139: volume translated
running 140: meshscatter color numbers
running 141: meshscatter color array
running 142: transparent mesh texture
running 143: Unequal x and y sizes in surface
running 144: Matrices of data in surfaces
running 145: log10 heatmap
running 146: reverse range heatmap
running 147: lines linesegments width test
running 148: multipoly with multi strokes
running 149: axsi3
running 150: pattern barplot
running 151: barplot lowclip highclip nan_color
running 152: Colorbar
running 153: scene visibility
running 154: redisplay after closing screen
running 155: space test in transformed axis
running 156: Figure and Subplots
running 157: Figure with Blocks
running 158: menus
running 159: Label with text wrapping
running 160: Axis titles and subtitles
running 161: Legend draw order
running 162: updating 2d primitives
running 163: updating multiple meshes
running 164: record test
running 165: record test formats
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
mp4: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
  Expression: all(1:n) do i
    v = ReferenceTests.compare_media(reference[i], to_compare[i])
    return v < 0.02
end
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] compare_videos(reference::Vector{Matrix{RGB{N0f8}}}, vpath::String, dir::String)
   @ Main ~/dev/makiedev/dev/Makie/ReferenceTests/src/tests/updating.jl:76
contour with color per level.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.055868403906020256 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
heatmap_interpolation.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.037358428405923905 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
contour with levels.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.0417003161900481 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
levels.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.037988482506205075 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
contour with levels array.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.05112567340077157 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
quiver.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.053504715133653694 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
contour small x.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.06686499933823523 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
streamplot.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.05085232080318649 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
Text rotation.png: Test Failed at /Users/patrick/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87
  Expression: score <= threshold
   Evaluated: 0.039954068650245325 <= 0.032
Stacktrace:
 [1] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [3] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] macro expansion
   @ ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:87 [inlined]
 [5] macro expansion
   @ /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [6] test_comparison(scores::Dict{String, Float64}; threshold::Float64)
   @ ReferenceTests ~/dev/makiedev/dev/Makie/ReferenceTests/src/runtests.jl:85
Test Summary:                                         | Pass  Fail  Broken  Total     Time
refimages                                             |  351    11      23    385  4m32.4s
  refimages                                           |  175     2      23    200  4m21.0s
    primitives                                        |    9             2     11    21.7s
    text.jl                                           |   22                   22    45.6s
    attributes.jl                                     |    7                    7     6.9s
    examples2d.jl                                     |   51             9     60  1m35.6s
    examples3d.jl                                     |   29            10     39    36.4s
    short_tests.jl                                    |   37             2     39    31.5s
    figures_and_makielayout.jl                        |    6                    6    11.7s
    updating_plots                                    |   14     2             16    11.5s
      updating 2d primitives                          |    1                    1     1.1s
      updating multiple meshes                        |    1                    1     1.5s
      record test                                     |    1                    1     1.0s
      record test formats                             |   11     2             13     7.8s
        mp4                                           |    2     2              4     2.9s
        mkv                                           |    4                    4     1.8s
        webm                                          |    4                    4     2.1s
  Comparison scores                                   |  176     9            185     0.0s
    circle line.png                                   |    1                    1     0.0s
    updating multiple meshes/step-2.png               |    1                    1     0.0s
    latex updates/step-2.png                          |    1                    1     0.0s
    BezierPath markers.png                            |    1                    1     0.0s
    Arrows on hemisphere.png                          |    1                    1     0.0s
    visible.png                                       |    1                    1     0.0s
    Tooltip.png                                       |    1                    1     0.0s
    record test formats/step-2.png                    |    1                    1     0.0s
    Wireframe of a Mesh.png                           |    1                    1     0.0s
    Line changing colour.mp4                          |    1                    1     0.0s
    Fluctuation 3D.png                                |    1                    1     0.0s
    meshscatter color array.png                       |    1                    1     0.0s
    Legend draw order.png                             |    1                    1     0.0s
    scatter rotations.png                             |    1                    1     0.0s
    hexbin scale.png                                  |    1                    1     0.0s
    scatter.png                                       |    1                    1     0.0s
    record test formats/step-4.png                    |    1                    1     0.0s
    updating 2d primitives/step-5.png                 |    1                    1     0.0s
    updating 2d primitives/step-3.png                 |    1                    1     0.0s
    Image on Geometry (Moon).png                      |    1                    1     0.0s
    LaTeXStrings linesegment offsets.png              |    1                    1     0.0s
    latex updates/step-1.png                          |    1                    1     0.0s
    heatmap_with_labels.png                           |    1                    1     0.0s
    shading.png                                       |    1                    1     0.0s
    space test in transformed axis.png                |    1                    1     0.0s
    Orthographic Camera.png                           |    1                    1     0.0s
    2D surface with explicit color.png                |    1                    1     0.0s
    scale_plot.png                                    |    1                    1     0.0s
    Figure and Subplots.png                           |    1                    1     0.0s
    scatters.png                                      |    1                    1     0.0s
    Axes label rotations/step-3.png                   |    1                    1     0.0s
    lines number color.png                            |    1                    1     0.0s
    contour with color per level.png                  |          1              1     0.0s
    lines with gaps.png                               |    1                    1     0.0s
    multipoly with multi strokes.png                  |    1                    1     0.0s
    reverse range heatmap.png                         |    1                    1     0.0s
    rotation.png                                      |    1                    1     0.0s
    meshscatter color numbers.png                     |    1                    1     0.0s
    latex bb.png                                      |    1                    1     0.0s
    bracket scalar.png                                |    1                    1     0.0s
    heatmap_interpolation.png                         |          1              1     0.0s
    Axes label rotations/step-2.png                   |    1                    1     0.0s
    Volume on black background.png                    |    1                    1     0.0s
    redisplay after closing screen.png                |    1                    1     0.0s
    volume translated.png                             |    1                    1     0.0s
    axsi3.png                                         |    1                    1     0.0s
    updating 2d primitives/step-2.png                 |    1                    1     0.0s
    Arrows on Sphere.png                              |    1                    1     0.0s
    tricontourf extendhigh extendlow.png              |    1                    1     0.0s
    Standard deviation band.png                       |    1                    1     0.0s
    Colorbar label rotations/step-3.png               |    1                    1     0.0s
    Unicode Marker.png                                |    1                    1     0.0s
    Line Function.png                                 |    1                    1     0.0s
    Hollow pie chart.png                              |    1                    1     0.0s
    Marker sizes.png                                  |    1                    1     0.0s
    lines with func.png                               |    1                    1     0.0s
    intersecting polygon.png                          |    1                    1     0.0s
    Surface + wireframe + contour.png                 |    1                    1     0.0s
    updating 2d primitives/step-7.png                 |    1                    1     0.0s
    char marker scenespace.png                        |    1                    1     0.0s
    Axis titles and subtitles.png                     |    1                    1     0.0s
    single_boundingboxes.png                          |    1                    1     0.0s
    bracket vector.png                                |    1                    1     0.0s
    contour with levels.png                           |          1              1     0.0s
    position.png                                      |    1                    1     0.0s
    Latex labels after the fact.png                   |    1                    1     0.0s
    streamplot with func.png                          |    1                    1     0.0s
    Word Wrapping.png                                 |    1                    1     0.0s
    scatter linrange.png                              |    1                    1     0.0s
    Streamplot 3D.png                                 |    1                    1     0.0s
    Colorbar label rotations/step-2.png               |    1                    1     0.0s
    array of rects poly.png                           |    1                    1     0.0s
    updating 2d primitives/step-8.png                 |    1                    1     0.0s
    levels.png                                        |          1              1     0.0s
    Contour3d.png                                     |    1                    1     0.0s
    Open pie chart.png                                |    1                    1     0.0s
    poly and colormap.png                             |    1                    1     0.0s
    record test formats/step-1.png                    |    1                    1     0.0s
    Log10 text.png                                    |    1                    1     0.0s
    isorange, isovalue.png                            |    1                    1     0.0s
    Rich text.png                                     |    1                    1     0.0s
    Normals of a Cat.png                              |    1                    1     0.0s
    update annotation style/step-1.png                |    1                    1     0.0s
    nonlinear colormap.png                            |    1                    1     0.0s
    hexbin bin int.png                                |    1                    1     0.0s
    data space.png                                    |    1                    1     0.0s
    updating 2d primitives/step-1.png                 |    1                    1     0.0s
    hexbin bin tuple.png                              |    1                    1     0.0s
    Volume Function.png                               |    1                    1     0.0s
    Label with text wrapping.png                      |    1                    1     0.0s
    multi rect with poly.png                          |    1                    1     0.0s
    Text Annotation.png                               |    1                    1     0.0s
    Load Mesh.png                                     |    1                    1     0.0s
    Matrices of data in surfaces.png                  |    1                    1     0.0s
    scatter interval.png                              |    1                    1     0.0s
    scatter with func.png                             |    1                    1     0.0s
    heatmap and image colormap interpolation.png      |    1                    1     0.0s
    updating 2d primitives/step-10.png                |    1                    1     0.0s
    complex_bezier_markers.png                        |    1                    1     0.0s
    marke glyph alignment.png                         |    1                    1     0.0s
    latex simple.png                                  |    1                    1     0.0s
    colored triangle.png                              |    1                    1     0.0s
    record test formats/step-3.png                    |    1                    1     0.0s
    hexbin two cellsizes.png                          |    1                    1     0.0s
    multi_strings_multi_positions.png                 |    1                    1     0.0s
    label type change.png                             |    1                    1     0.0s
    contour with levels array.png                     |          1              1     0.0s
    quiver.png                                        |          1              1     0.0s
    contour small y.png                               |    1                    1     0.0s
    Simple meshscatter.png                            |    1                    1     0.0s
    latex ticks.png                                   |    1                    1     0.0s
    record test.mp4                                   |    1                    1     0.0s
    transparent mesh texture.png                      |    1                    1     0.0s
    tricontourf manual vs delaunay.png                |    1                    1     0.0s
    contour with colorrange.png                       |    1                    1     0.0s
    Connected Sphere.png                              |    1                    1     0.0s
    Arrows 3D.png                                     |    1                    1     0.0s
    updating 2d primitives/step-4.png                 |    1                    1     0.0s
    Colorbar label rotations/step-1.png               |    1                    1     0.0s
    text_in_3d_axis.png                               |    1                    1     0.0s
    Polygons.png                                      |    1                    1     0.0s
    3D screenspace annotations.png                    |    1                    1     0.0s
    updating 2d primitives/step-6.png                 |    1                    1     0.0s
    basic polygon shapes.png                          |    1                    1     0.0s
    updating 2d primitives/step-9.png                 |    1                    1     0.0s
    trimspine.png                                     |    1                    1     0.0s
    hexbin one cellsize.png                           |    1                    1     0.0s
    thick arc.png                                     |    1                    1     0.0s
    contour small x.png                               |          1              1     0.0s
    scatter rotation.png                              |    1                    1     0.0s
    Figure with Blocks.png                            |    1                    1     0.0s
    image.png                                         |    1                    1     0.0s
    streamplot.png                                    |          1              1     0.0s
    marker offset in data space.png                   |    1                    1     0.0s
    minor grid & scales.png                           |    1                    1     0.0s
    scene visibility.png                              |    1                    1     0.0s
    log10 heatmap.png                                 |    1                    1     0.0s
    space 3D.png                                      |    1                    1     0.0s
    latex hlines in axis.png                          |    1                    1     0.0s
    Grouped bar.png                                   |    1                    1     0.0s
    hexbin threshold.png                              |    1                    1     0.0s
    space 2D.png                                      |    1                    1     0.0s
    Text offset.png                                   |    1                    1     0.0s
    tricontourf.png                                   |    1                    1     0.0s
    Axes label rotations/step-4.png                   |    1                    1     0.0s
    pattern barplot.png                               |    1                    1     0.0s
    Wireframe of Sphere.png                           |    1                    1     0.0s
    latex strings.png                                 |    1                    1     0.0s
    glowcolor, glowwidth.png                          |    1                    1     0.0s
    colored triangle with poly.png                    |    1                    1     0.0s
    Scatter & Text transformations.png                |    1                    1     0.0s
    Simple pie chart.png                              |    1                    1     0.0s
    stroked rect poly.png                             |    1                    1     0.0s
    heatmap transparent colormap.png                  |    1                    1     0.0s
    Colored Mesh.png                                  |    1                    1     0.0s
    Depth Shift.png                                   |    1                    1     0.0s
    Test RGB heatmaps.png                             |    1                    1     0.0s
    Unequal x and y sizes in surface.png              |    1                    1     0.0s
    barplot lowclip highclip nan_color.png            |    1                    1     0.0s
    single_strings_single_positions_justification.png |    1                    1     0.0s
    dynamic latex ticks.png                           |    1                    1     0.0s
    lines linesegments width test.png                 |    1                    1     0.0s
    update annotation style/step-2.png                |    1                    1     0.0s
    space 2D autolimits.png                           |    1                    1     0.0s
    Merged color Mesh.png                             |    1                    1     0.0s
    polygon markers.png                               |    1                    1     0.0s
    Axes label rotations/step-1.png                   |    1                    1     0.0s
    single_strings_single_positions.png               |    1                    1     0.0s
    lines array of colors.png                         |    1                    1     0.0s
    empty_lines.png                                   |    1                    1     0.0s
    tricontourf relative mode.png                     |    1                    1     0.0s
    Sphere Mesh.png                                   |    1                    1     0.0s
    multi_boundingboxes.png                           |    1                    1     0.0s
    colormap with specific values.png                 |    1                    1     0.0s
    Stephist.png                                      |    1                    1     0.0s
    FEM mesh 3D.png                                   |    1                    1     0.0s
    Colorbar.png                                      |    1                    1     0.0s
    scatter image markers.png                         |    1                    1     0.0s
    menus.png                                         |    1                    1     0.0s
    Text rotation.png                                 |          1              1     0.0s
    3D Contour with 2D contour slices.png             |    1                    1     0.0s
    Meshscatter Function.png                          |    1                    1     0.0s
    Textured Mesh.png                                 |    1                    1     0.0s
    Image on Geometry (Earth).png                     |    1                    1     0.0s
    updating multiple meshes/step-1.png               |    1                    1     0.0s
ERROR: LoadError: Some tests did not pass: 351 passed, 11 failed, 0 errored, 23 broken.
in expression starting at /Users/patrick/dev/makiedev/dev/Makie/WGLMakie/test/runtests.jl:58
ERROR: Package WGLMakie errored during testing

MakieCore passes 100%.

I'm not able to test RPRMakie, of course :)

@pbouffard
Copy link
Contributor

.. and finally, on Julia 1.8.5, I get the same error during the destroying singleton screen test as I earlier reported, as well as the same errors in the record test formats/mp4 test.

Hope these data points from a Mac M-series user are helpful.

This is accomplished by making the window and rendered framebuffer
sizes independent of one another. By separating the two concepts, we
can create rasterized graphics at higher (or lower) resolution than
what is shown on screen.

The window scale factor is used to scale the sizes of elements within
the window (and on Linux and Windows, the window size itself from the
requested logical sizes), and the px-per-unit scale factor dictates
the size of the rasterized render.

The default scaling factors are initialized by requesting the content
scale factor from GLFW (and dynamically responding to changes in the
content scale factor on platforms where GLFW provides support).

Testing is added on Linux where xvfb-run can be used to force a
HiDPI context.
- Clear the `scalefactor` and `px_per_unit` observables when the figure
  is closed. It's possible both may be used during a figure's lifetime,
  but that should not persist past a close.

- In the system scale factor callback, do not unconditionally resize
  the native window. Instead, leverage the fact that the observable
  callback will invoke a resize event, and that correctly will check that
  the root scene is not `nothing`.

- Do not completely ignore the scale factor on OSX. The difference is
  that there is a native scaling factor applied by the OS, but if/when
  the desired scale factor differs from the native scaling, we must
  still make adjustments.
Instead of polling for window size changes on every render tick, use
the size-changed callback from GLFW to only make changes when it is
known that there's been a change in the size of the window.

This solves a concurrency problem that can happen when the scale factor
is changed. The sequence of events looks like:

1. The `screen.scalefactor[]` value is changed
2. The listeners to `scalefactor` start to be notified.
3. Asynchronously, the `WindowAreaUpdater` listener attached to the
   `render_tick` observable runs.
4. The window area listener notices that the window size given the
   _new_ value of the scale factor doesn't match the scene size, so
   it updates the scene size.
5. The `scalefactor` listener responsible for resizing the window
   gets its slice of time to run, and it now sees that everything is
   already the "correct" size.

Therefore, the window is not resized, and instead the scene size is
rescaled in the opposite direction of the scale factor change.
@jmert
Copy link
Author

jmert commented Feb 24, 2023

I've squashed a bunch of the (relatively) sure commits into a single commit, and then I've kept some of the OSX-specific fixes and the potentially-more-controversial change to the window size callback as separate commits (to ease reverting if necessary).

As for the failures on OSX, can anyone inspect/share the reference and test images to see what is the failing feature?

In my latest local test run with julia-master, I'm also seeing some errors to do with finalizers/closing windows on Linux — I haven't investigated if that's new to this PR or a more general Julia v1.10-DEV problem, though...

@jmert
Copy link
Author

jmert commented Feb 24, 2023

Unfortunately, I see the same error on Julia 1.8 so it's not just a DEV incompatibility.

The assertion makes me wonder if it's related to #2553, though, since it's the assertion added there that's being violated. Rebasing has brought that PR into the history here, so the fact that I didn't used to see these errors would suggest a change on master either interacts poorly with changes here or these changes make a now existing error more obvious.

Backtrace and error message
error in running finalizer: GLFW.GLFWError(code=GLFW.ErrorCode(0x00010001), description="The GLFW library is not initialized")
jl_f_throw at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:531
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
_ErrorCallbackWrapper at /home/justin/.julia/packages/GLFW/BWxfF/src/callback.jl:43
unknown function (ip: 0x7ffa68b0efc3)
_glfwInputError at /home/justin/.julia/artifacts/5aa80c7b8e919cbfee41019069d9b25269befe10/lib/libglfw.so (unknown line)
HideWindow at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:604 [inlined]
set_visibility! at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:376 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:383 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:380 [inlined]
#close#54 at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:590
close at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:589 [inlined]
#1021 at /home/justin/.julia/dev/Makie/src/display.jl:45
unknown function (ip: 0x7ffa3698f554)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
jl_f__call_latest at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:774
#invokelatest#2 at ./essentials.jl:729 [inlined]
invokelatest at ./essentials.jl:726 [inlined]
notify at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:169 [inlined]
setindex! at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:86 [inlined]
empty! at /home/justin/.julia/dev/Makie/src/scenes.jl:393
unknown function (ip: 0x7ffa369a7c22)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
run_finalizer at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:280
jl_gc_run_finalizers_in_list at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:367
run_finalizers at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:410
ijl_atexit_hook at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/init.c:236
jl_repl_entrypoint at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/jlapi.c:720
main at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/cli/loader_exe.c:59
unknown function (ip: 0x7ffa6a26d78f)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
error in running finalizer: GLFW.GLFWError(code=GLFW.ErrorCode(0x00010001), description="The GLFW library is not initialized")
jl_f_throw at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:531
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
_ErrorCallbackWrapper at /home/justin/.julia/packages/GLFW/BWxfF/src/callback.jl:43
unknown function (ip: 0x7ffa68b0efc3)
_glfwInputError at /home/justin/.julia/artifacts/5aa80c7b8e919cbfee41019069d9b25269befe10/lib/libglfw.so (unknown line)
HideWindow at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:604 [inlined]
set_visibility! at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:376 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:383 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:380 [inlined]
#close#54 at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:590
close at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:589 [inlined]
#1021 at /home/justin/.julia/dev/Makie/src/display.jl:45
unknown function (ip: 0x7ffa3698f554)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
jl_f__call_latest at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:774
#invokelatest#2 at ./essentials.jl:729 [inlined]
invokelatest at ./essentials.jl:726 [inlined]
notify at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:169 [inlined]
setindex! at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:86 [inlined]
empty! at /home/justin/.julia/dev/Makie/src/scenes.jl:393
unknown function (ip: 0x7ffa369a7c22)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
run_finalizer at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:280
jl_gc_run_finalizers_in_list at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:367
run_finalizers at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:410
ijl_atexit_hook at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/init.c:236
jl_repl_entrypoint at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/jlapi.c:720
main at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/cli/loader_exe.c:59
unknown function (ip: 0x7ffa6a26d78f)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
error in running finalizer: GLFW.GLFWError(code=GLFW.ErrorCode(0x00010001), description="The GLFW library is not initialized")
jl_f_throw at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:531
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
_ErrorCallbackWrapper at /home/justin/.julia/packages/GLFW/BWxfF/src/callback.jl:43
unknown function (ip: 0x7ffa68b0efc3)
_glfwInputError at /home/justin/.julia/artifacts/5aa80c7b8e919cbfee41019069d9b25269befe10/lib/libglfw.so (unknown line)
HideWindow at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:604 [inlined]
set_visibility! at /home/justin/.julia/packages/GLFW/BWxfF/src/glfw3.jl:376 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:383 [inlined]
set_screen_visibility! at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:380 [inlined]
#close#54 at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:590
close at /home/justin/.julia/dev/Makie/GLMakie/src/screen.jl:589 [inlined]
#1021 at /home/justin/.julia/dev/Makie/src/display.jl:45
unknown function (ip: 0x7ffa3698f554)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
jl_f__call_latest at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/builtins.c:774
#invokelatest#2 at ./essentials.jl:729 [inlined]
invokelatest at ./essentials.jl:726 [inlined]
notify at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:169 [inlined]
setindex! at /home/justin/.julia/packages/Observables/PHGQ8/src/Observables.jl:86 [inlined]
empty! at /home/justin/.julia/dev/Makie/src/scenes.jl:393
unknown function (ip: 0x7ffa369a7c22)
_jl_invoke at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2377 [inlined]
ijl_apply_generic at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gf.c:2559
jl_apply at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/julia.h:1843 [inlined]
run_finalizer at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:280
jl_gc_run_finalizers_in_list at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:367
run_finalizers at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/gc.c:410
ijl_atexit_hook at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/init.c:236
jl_repl_entrypoint at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/src/jlapi.c:720
main at /cache/build/default-aws-shared0-3/julialang/julia-release-1-dot-8/cli/loader_exe.c:59
unknown function (ip: 0x7ffa6a26d78f)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x401098)
┌ Warning: error closing screen
│   exception =
│    AssertionError: nw.handle !== C_NULL
│    Stacktrace:
│      [1] set_screen_visibility!
│        @ ~/.julia/dev/Makie/GLMakie/src/screen.jl:382 [inlined]
│      [2] set_screen_visibility!
│        @ ~/.julia/dev/Makie/GLMakie/src/screen.jl:380 [inlined]
│      [3] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
│        @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:590
│      [4] close
│        @ ~/.julia/dev/Makie/GLMakie/src/screen.jl:589 [inlined]
│      [5] (::Makie.var"#1021#1022"{Scene, GLMakie.Screen{GLFW.Window}})(is_open::Bool)
│        @ Makie ~/.julia/dev/Makie/src/display.jl:45
│      [6] #invokelatest#2
│        @ ./essentials.jl:729 [inlined]
│      [7] invokelatest
│        @ ./essentials.jl:726 [inlined]
│      [8] (::Makie.var"#1021#1022"{Scene, GLMakie.Screen{GLFW.Window}})(is_open::Bool)
│        @ Makie ~/.julia/dev/Makie/src/display.jl:55
│      [9] #invokelatest#2
│        @ ./essentials.jl:729 [inlined]
│     [10] invokelatest
│        @ ./essentials.jl:726 [inlined]
│     [11] notify
│        @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:169 [inlined]
│     [12] setindex!
│        @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:86 [inlined]
│     [13] (::Makie.var"#953#954"{Scene})(open::Bool)
│        @ Makie ~/.julia/dev/Makie/src/interaction/events.jl:17
│     [14] #invokelatest#2
│        @ ./essentials.jl:729 [inlined]
│     [15] invokelatest
│        @ ./essentials.jl:726 [inlined]
│     [16] notify
│        @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:169 [inlined]
│     [17] setindex!
│        @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:86 [inlined]
│     [18] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
│        @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:593
│     [19] close
│        @ ~/.julia/dev/Makie/GLMakie/src/screen.jl:589 [inlined]
│     [20] renderloop(screen::GLMakie.Screen{GLFW.Window})
│        @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:927
│     [21] (::GLMakie.var"#61#62"{GLMakie.Screen{GLFW.Window}})()
│        @ GLMakie ./task.jl:484
└ @ GLMakie ~/.julia/dev/Makie/GLMakie/src/screen.jl:929

@ffreyer
Copy link
Collaborator

ffreyer commented Feb 24, 2023

"The GLFW library is not initialized"

That would mean glfwInit didn't run, failed or glfwTerminate ran. You should be getting a Julia error on using GLFW if init fails though, and GLMakie doesn't seem to ever call GLFW.Terminate(). Might be useful to check if GLFW.INITIALIZED[] remains true throughout?

The assertion is basically just "Window must exist" which is reasonable. Something would have to destroy (or fail to create) the window for it to trigger. Maybe it's trying to close the screen a second time from here, and failing?
https://github.com/jmert/Makie.jl/blob/5ba035c247620ac13b2952e3f20f1aee757284e2/GLMakie/src/screen.jl#L925-L931

@pbouffard
Copy link
Contributor

"The GLFW library is not initialized"

FWIW, I also happened on this error when trying to use a sysimage, see my post: https://discourse.julialang.org/t/errors-when-using-sysimage-with-makie-master/95132.

@jkrumbiegel
Copy link
Member

merged into #2831

@SimonDanisch SimonDanisch mentioned this pull request Aug 1, 2023
16 tasks
SimonDanisch added a commit that referenced this pull request Nov 17, 2023
Continues #2831 !
Still needs to check, if I rebased correctly and didn't incorrectly
apply some of the changes!

## Merged PRs
- #2598
- #2746
- #2346
- #2544
- #3082
- #2868
- #3062
- #3106
- #3281
- #3246

## TODOS

- [x] fix flaky test `@test GLMakie.window_size(screen.glscreen) ==
scaled(screen, (W, H))`
- [x] Merge axis type inferences from #2220 
- [x] Test on different resolution screens, IJulia, Pluto, VSCode,
Windowed
- [x] rebase to only have merge commits from the PRs 
- [x] investigate unexpected speed ups
- [x] reset camera settings from tests
- [ ] check doc image generation
- [x] rethink default near/far in Camera3D (compatability with OIT)
- [x] merge #3246
- [x] fix WGLMakie issues/tests:
- [x] fix line depth issues (see tests: ~~hexbin colorrange~~ (not new),
LaTeXStrings in Axis3, Axis3 axis reversal)
  - [x] fix lighting of surface with nan points (fixed in #3246)
- ~~volume/3D contour artifacts (see 3D Contour with 2D contour
slices)~~ not new
  - ~~artifacting in "colorscale (lines)"~~ not new
- [x] GLMakie:
  - [x] slight outline in "scatter image markers" test
  - ~~clipping/z-fighting in "volume translated"~~ not new
- [x] CairoMakie:
  -  ~~Artfiacting in `colorscale (lines)"~~ not new
  - ~~markersize in "scatter rotations" changed?~~ not new
  - ~~color change in "colorscale (poly)"~~ not new
  - ~~transparency/render order of "OldAxis + Surface"~~ not new
  - ~~render order in "Merged color mesh"~~ not new
  - ~~render order of "Surface + wireframe + contour"~~ not new
- [x] Check "SpecApi in convert_arguments" (colors swapped?)


## Fixes the following errors

- fixes #2721 via #2746
- fixes #1600 via #2746
- fixes #1236 via #2746
- fixes MakieOrg/GeoMakie.jl#133 via #2598
- closes #2522
- closes #3239 via #3246
- fixes #3238 via #3246
- fixes #2985 via #3246
- fixes #3307 via #3281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants