Blank images and "dead pixels" in Makie

I run into blank images and “dead pixels” when running this Makie example (see below).

The bottom-center image is blank, while the bottom-right image has a “dead pixel” at the bottom-right corner; hard to see, but it is there and does not follow the smooth gradient of the rest of the plot.

I also have another MWE that produces this same “dead pixel” phenomena, and they seem to occur with heatmaps near the center and edges of the figures.

Has anyone run into this issue before? Appreciate the support!

That’s pretty odd… What is your OS, julia and Makie/GLMakie/AbstractPlotting version?

Also does it always happen, or is it more of a corruption?

You should also try running this:

julia> ENV["MODERNGL_DEBUGGING"] = "true"
julia>]add ModernGL#master
julia>]build ModernGL

Restart Makie and try again…

Win 10 Pro, Julia v1.2.0 (on Atom 1.40.1), Makie v0.9.5 #master.

“build ModernGL” produced no changes and the plots look the same after Atom/Makie restart.

I’ve also tried reinstalling Makie.

I’ve tried many more Makie examples and I can’t get them to fail. The issue seems to be with 2D plots.

Makie version isn’t important, GLMakie/AbstractPlotting is :wink:

“build ModernGL” produced no changes and the plots look the same after Atom/Makie restart.

So you have all the visual errors, but no further debug information is displayed?

Is this printing:

using ModernGL
joinpath(dirname(pathof(ModernGL)), "..", "deps", "deps.jl") |> read |> String

"const enable_opengl_debugging = true"?

What GPU do you have?

GLMakie v0.0.7, AbstractPlotting v0.9.10

using ModernGL
joinpath(dirname(pathof(ModernGL)), "..", "deps", "deps.jl") |> read |> String

prints

“const enable_opengl_debugging = true\n”

Visual errors persist with no further debug information printed.

My GPU is Radeon HD 6800.

Of course, it’s AMD with their messy drivers -.-
I will see if I can reproduce it at home with an AMD gpu…

That’s both funny and sad…I appreciate the support, @sdanisch.

I’ve run the same code on a laptop with Intel GPU with none of these issues.

Another data point with a MWE:

using Makie#master 
x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2 .< 0.5^2
scene = image(A,scale_plot=false)
sc_t  = title(scene,"Image")

“Image” displays properly, but it is not ideal because it interpolates the image.
“Heatmap” displays nothing at all.

oh… can you try scene = heatmap(A,scale_plot=false, interpolate = true)?

Hmm…

That’s pretty interesting!
Can you try:

A = reshape(repeat(1:10, 10), 10, 10)
colors = Colors.distinguishable_colors(11)[2:end]
scene = heatmap(A,scale_plot=false, interpolate = true, colormap = colors)
scene = heatmap(A,scale_plot=false, interpolate = false, colormap = colors)

Came up in Juno Plot pane and separate Makie window:

Tried removing the Boolean threshold to plot the “analog” pattern, and the center/corner pixels are back:

x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2

One consistent issue I’ve found is that if I define or print the array in REPL after opening a Makie scene, I get a ton of errors in the REPL.

They start with “UndefVarError: warn not defined”, “Stacktrace: glBindBuffer”, etc.

Lots of errors from ModernGL and GLAbstraction.

This only happens when the array A is defined/printed in REPL after calling a Makie scene window.

Oh wow… So that’s why there are no warnings with debugging enabled:
https://github.com/JuliaGL/ModernGL.jl/blob/e1eb1b60fbd9b16c09e976901ddcd05ddd69f75b/src/functionloading.jl#L16
I just fixed it directly on master… so could you fetch ]add ModernGL#master and try again? Also make sure that the ENV is still set to debugging :wink:

Finally got a chance to try this with my AMD desktop…Can’t reproduce it… So hopefully you can get the warnings after checking out ModernGL#master… Maybe you can also check if you have the newest drivers? I remember there were different ways to make sure that you have the newest AMD drivers on windows,and some would leave you with old drivers… Maybe that’s the issue!

Alright, fetched the latest ModernGL#master and confirmed that ENV is set to debugging.

x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2 .< 0.5^2
scene = heatmap(A,scale_plot=false)

Still shows as a black square. There are no errors once I run the script, but a flood of errors once I type pretty much anything into the REPL.

I saved the warnings from the REPL after typing “A” but it is a pretty long list. Is there a way to upload a text file or should I just paste it here?

gist.github.com? If it’s just always the same, maybe condense it?