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

**URL:** <https://discourse.julialang.org/t/glmakie-crashes-when-maximising-window-after-saving-high-resolution-png/108949>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [January 18, 2024, 10:20am UTC](https://discourse.julialang.org/t/glmakie-crashes-when-maximising-window-after-saving-high-resolution-png/108949 "2024-01-18T10:20:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![p\_f](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@p\_f](https://discourse.julialang.org/u/p_f)\
**Post date:** [January 18, 2024, 10:20am UTC](https://discourse.julialang.org/t/glmakie-crashes-when-maximising-window-after-saving-high-resolution-png/108949/1 "2024-01-18T10:20:42Z")

</div>

Quick aside: should I be putting stuff like this onto github instead of here? I’ve never really interacted with github more than my own repos.

Step 1, make figure:

```julia
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

gives error:

```julia
julia> ┌ Warning: error in renderloop
│ exception =
│ glTexImage 2D: width too large. Width: 19200
│ Stacktrace:
│ [1] error(::String, ::Int64)
│ @ Base .\error.jl:44
│ [2] glTexImage(ttype::UInt32, level::Int64, internalFormat::UInt32, w::Int64, h::Int64, border::Int64, format::UInt32, datatype::UInt32, data::Ptr{Nothing})
│ @ GLMakie.GLAbstraction C:\Users\username\.julia\packages\GLMakie\vf9WN\src\GLAbstraction\GLExtendedFunctions.jl:209
│ [3] resize_nocopy!(t::GLMakie.GLAbstraction.Texture{RGBA{FixedPointNumbers.N0f8}, 2}, newdims::Tuple{Int64, Int64})
│ @ GLMakie.GLAbstraction C:\Users\username\.julia\packages\GLMakie\vf9WN\src\GLAbstraction\GLTexture.jl:111
│ [4] resize!(fb::GLMakie.GLFramebuffer, w::Int64, h::Int64)
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\glwindow.jl:159
│ [5] render_frame(screen::GLMakie.Screen{GLFW.Window}; resize_buffers::Bool)
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\rendering.jl:48
│ [6] render_frame
│ @ C:\Users\username\.julia\packages\GLMakie\vf9WN\src\rendering.jl:29 [inlined]
│ [7] refreshwindowcb(screen::GLMakie.Screen{GLFW.Window}, window::GLFW.Window)
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:864
│ [8] (::GLMakie.var"#72#73"{GLMakie.Screen{GLFW.Window}})(window::GLFW.Window)
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:868
│ [9] _WindowRefreshCallbackWrapper(window::GLFW.Window)
│ @ GLFW C:\Users\username\.julia\packages\GLFW\BWxfF\src\callback.jl:43
│ [10] PollEvents
│ @ C:\Users\username\.julia\packages\GLFW\BWxfF\src\glfw3.jl:620 [inlined]
│ [11] pollevents(screen::GLMakie.Screen{GLFW.Window})
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:449
│ [12] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:937
│ [13] renderloop(screen::GLMakie.Screen{GLFW.Window})
│ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:963
│ [14] (::GLMakie.var"#69#70"{GLMakie.Screen{GLFW.Window}})()
│ @ GLMakie .\task.jl:514
└ @ GLMakie C:\Users\username\.julia\packages\GLMakie\vf9WN\src\screen.jl:972

```

can continue using GLMakie after running `GLMakie.closeall()`

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [January 18, 2024, 12:11pm UTC](https://discourse.julialang.org/t/glmakie-crashes-when-maximising-window-after-saving-high-resolution-png/108949/2 "2024-01-18T12:11:59Z")

</div>

> [@p\_f](#):
>
> should I be putting stuff like this onto github instead of here?

Yes, easy to validate errors like that are perfect for github issues. Usage questions are for discourse instead.

Seems like here the `px_per_unit` value persists after saving, sounds like a bug.
