MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.4k stars 306 forks source link

GLMakie crashes when maximising window after saving high resolution .png #4005

Open pfuchter opened 2 months ago

pfuchter commented 2 months ago

Forgot to post this on github at the time, but just ran into it again. (windows, latest GLMakie)

After saving a GLMakie figure with high px_per_unit, if you maximise the window GLMakie crashes.

"Seems like here the px_per_unit value persists after saving" -jules, discourse

Step 1, make figure:

begin
f = Figure()
ax = Axis3(f[1, 1], aspect = :data)
scatter!(ax, rand(100), rand(100), rand(100))
f
end

Step 2: save("test.png",f,px_per_unit=10)

Step 3: maximise GLMakie window

ffreyer commented 1 month ago

This happens because screen.px_per_unit gets updated by save. So when you maximize GLMakie tries to render at 10x your full screen resolution, which is likely to exceed GL_MAX_TEXTURE_SIZE

We should probably try reseting px_per_unit after save/record