MakieOrg / Makie.jl

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

GLMakie GLFWError macOS icons #3997

Closed xlxs4 closed 1 day ago

xlxs4 commented 2 days ago

Since this is a rather old GLFW change (https://github.com/glfw/glfw/commit/9a87c2a4b49808d3666c7b093b77e8512fa23908) and I can't seem to find any related changes in GLMakie or GLFW.jl, I don't understand what's going on.

julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/Users/xlxs4/.julia/compiled/v1.10/GLMakie/jl_uUAE1S".
ERROR: LoadError: GLFWError (65548): Cocoa: Regular windows do not have icons on macOS
Stacktrace:
  [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
  [2] SetWindowIcon(window::GLFW.Window, images::Vector{Base.ReinterpretArray{NTuple{4, UInt8}, 2, ColorTypes.RGBA{FixedPointNumbers.N0f8}, Matrix{ColorTypes.RGBA{FixedPointNumbers.N0f8}}, false}})
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:538
  [3] empty_screen(debugging::Bool; reuse::Bool)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:260
  [4] empty_screen
    @ ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:222 [inlined]
  [5] singleton_screen(debugging::Bool)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:329
  [6] macro expansion
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:21 [inlined]
  [7] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
  [8] macro expansion
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:18 [inlined]
  [9] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [10] top-level scope
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:16
 [11] include(mod::Module, _path::String)
    @ Base ./Base.jl:495
 [12] include(x::String)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:1
 [13] top-level scope
    @ ~/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:89
 [14] include
    @ ./Base.jl:495 [inlined]
 [15] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2222
 [16] top-level scope
    @ stdin:3
in expression starting at /Users/xlxs4/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:15
in expression starting at /Users/xlxs4/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:1
in expression starting at stdin:
aplavin commented 2 days ago

Also just got this error! MacBook Air M2.

JamesWrigley commented 2 days ago

This was reported on Slack too, it seems to be because of the update I made to GLFW 3.4 :octopus: https://github.com/JuliaPackaging/Yggdrasil/pull/8990

I'll try to figure out what could be wrong, but in the meantime going back to GLFW_jll 3.3.9 should work.

JamesWrigley commented 2 days ago

Hmm, according to Github that commit is only in the 3.4 release despite being quite old (3.4 development started in 2019 apparently). I think this will need to be fixed in GLMakie. The previous implementation was a noop, which explains why it wasn't causing issues before.

xlxs4 commented 2 days ago

Ohhh, makes sense. Thanks!

haakon-e commented 2 days ago

Until #3999 is merged and a new release is pushed, it seems like I need to

]add GLFW_jll@3.3.9 GLMakie

to get GLMakie working.

Even switching to older releases of GLMakie does not appear to limit the installed version of GLFW_jll (is this intentional?)

keithjlee commented 1 day ago

Same here on an M1 Pro Macbook.