# Warning: error closing screen

**URL:** <https://discourse.julialang.org/t/warning-error-closing-screen/111939>\
**Category:** Visualization\
**Tags:** question, package, glmakie\
**Created:** [March 21, 2024, 4:10pm UTC](https://discourse.julialang.org/t/warning-error-closing-screen/111939 "2024-03-21T16:10:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 21, 2024, 4:10pm UTC](https://discourse.julialang.org/t/warning-error-closing-screen/111939/1 "2024-03-21T16:10:36Z")

</div>

I can run my simulation fine from the REPL.  
You can find my code at: [GitHub - aenarete/KiteControllers.jl: Controllers for airborne wind energy systems](https://github.com/aenarete/KiteControllers.jl)

But if I run it from `bash` with the command:

```julia
julia --project -t 7,1 -e "push!(LOAD_PATH,joinpath(pwd(),\"src\"));include(\"./examples/autopilot.jl\")"

```

I get the following warning at the end of the simulation:

```julia
┌ Warning: error closing screen
│ exception =
│ GLFWError (NOT_INITIALIZED): The GLFW library is not initialized
│ Stacktrace:
│ [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
│ @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
│ [2] HideWindow
│ @ ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:604 [inlined]
│ [3] set_visibility!
│ @ ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:376 [inlined]
│ [4] set_screen_visibility!
│ @ ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:402 [inlined]
│ [5] set_screen_visibility!
│ @ ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:399 [inlined]
│ [6] close(screen::GLMakie.Screen{GLFW.Window}; reuse::Bool)
│ @ GLMakie ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:625
│ [7] close
│ @ ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:623 [inlined]
│ [8] renderloop(screen::GLMakie.Screen{GLFW.Window})
│ @ GLMakie ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:978
│ [9] (::GLMakie.var"#69#70"{GLMakie.Screen{GLFW.Window}})()
│ @ GLMakie ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:824
└ @ GLMakie ~/.julia/packages/GLMakie/QyIWu/src/screen.jl:980

```

Any idea how to get rid of this warning?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 21, 2024, 4:42pm UTC](https://discourse.julialang.org/t/warning-error-closing-screen/111939/2 "2024-03-21T16:42:33Z")

</div>

Adding this call at the end of the script fixes the error:

```julia
KiteViewers.GLMakie.closeall()

```
