Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive WGLMakie figure throws errors #3781

Open
kbarros opened this issue Apr 11, 2024 · 0 comments
Open

Interactive WGLMakie figure throws errors #3781

kbarros opened this issue Apr 11, 2024 · 0 comments
Labels
bug interaction WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.

Comments

@kbarros
Copy link
Contributor

kbarros commented Apr 11, 2024

The test case that I currently have requires installing Sunny. When I execute this,

using Sunny, WGLMakie
cryst = Sunny.fcc_crystal()
view_crystal(cryst)

and then interact the the WGLMakie figure, it throws many "key not found" errors. Example stack trace below. I haven't had luck reducing this to a simpler standalone test case. When I starting remove things from the scene, the frequency of the errors decrease, in a seemingly nondeterministic way.

An exception was thrown in JS: Error: Key 25837 not found! undefined
Additional message: Error while processing message {"payload":false,"id":"25837","msg_type":"0"}
Stack trace:
    Error: Key 25837 not found! undefined
        at lookup_global_object (http://localhost:9384/assets/a3ea2b1768bae0eec7c90e59010978af2088e5c5-Bonito.bundled.js:3708:11)
        at Object.process_message (http://localhost:9384/assets/a3ea2b1768bae0eec7c90e59010978af2088e5c5-Bonito.bundled.js:3650:17)
        at http://localhost:9384/assets/439a543fe5196e6a836a7ad81e559b5ad3108dec-Websocket.bundled.js:95:32
        at http://localhost:9384/assets/a3ea2b1768bae0eec7c90e59010978af2088e5c5-Bonito.bundled.js:3638:33
        at new Promise (<anonymous>)
        at Lock.lock (http://localhost:9384/assets/a3ea2b1768bae0eec7c90e59010978af2088e5c5-Bonito.bundled.js:3632:16)
        at http://localhost:9384/assets/439a543fe5196e6a836a7ad81e559b5ad3108dec-Websocket.bundled.js:94:48
        at new Promise (<anonymous>)
        at websocket.onmessage (http://localhost:9384/assets/439a543fe5196e6a836a7ad81e559b5ad3108dec-Websocket.bundled.js:89:17)
┌ Warning: Error in window event callback
│   exception =
│    ArgumentError: collection must be non-empty
│    Stacktrace:
│     [1] first
│       @ ./abstractarray.jl:473 [inlined]
│     [2] (::Makie.var"#1441#1443"{Scene, Base.RefValue{Bool}, Base.RefValue{Union{Nothing, Makie.Mouse.Button}}, Base.RefValue{Float64}, Base.RefValue{Float64}, Base.RefValue{Bool}, Base.RefValue{Bool}, Base.RefValue{Union{Nothing, Makie.Mouse.Button}}, Base.RefValue{Bool}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Makie.Mouse.Action}, Observable{MouseEvent}, Float64, Module})(event::Makie.MouseButtonEvent)
│       @ Makie ~/.julia/dev/Makie/src/makielayout/mousestatemachine.jl:292
│     [3] #invokelatest#2
│       @ ./essentials.jl:892 [inlined]
│     [4] invokelatest
│       @ ./essentials.jl:889 [inlined]
│     [5] notify
│       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
│     [6] setindex!
│       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
│     [7] (::WGLMakie.var"#58#60"{Dict{Any, Any}, Scene, Events})()
│       @ WGLMakie ~/.julia/dev/Makie/WGLMakie/src/events.jl:63
└ @ WGLMakie ~/.julia/dev/Makie/WGLMakie/src/events.jl:109
┌ Warning: Error in window event callback
│   exception =
│    ArgumentError: collection must be non-empty
│    Stacktrace:
│     [1] first
│       @ ./abstractarray.jl:473 [inlined]
│     [2] (::Makie.var"#1441#1443"{Scene, Base.RefValue{Bool}, Base.RefValue{Union{Nothing, Makie.Mouse.Button}}, Base.RefValue{Float64}, Base.RefValue{Float64}, Base.RefValue{Bool}, Base.RefValue{Bool}, Base.RefValue{Union{Nothing, Makie.Mouse.Button}}, Base.RefValue{Bool}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Point{2, Float32}}, Base.RefValue{Makie.Mouse.Action}, Observable{MouseEvent}, Float64, Module})(event::Makie.MouseButtonEvent)
│       @ Makie ~/.julia/dev/Makie/src/makielayout/mousestatemachine.jl:292
│     [3] #invokelatest#2
│       @ ./essentials.jl:892 [inlined]
│     [4] invokelatest
│       @ ./essentials.jl:889 [inlined]
│     [5] notify
│       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:206 [inlined]
│     [6] setindex!
│       @ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:123 [inlined]
│     [7] (::WGLMakie.var"#58#60"{Dict{Any, Any}, Scene, Events})()
│       @ WGLMakie ~/.julia/dev/Makie/WGLMakie/src/events.jl:63
└ @ WGLMakie ~/.julia/dev/Makie/WGLMakie/src/events.jl:109
@kbarros kbarros added the bug label Apr 11, 2024
@asinghvi17 asinghvi17 added the WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie. label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug interaction WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
Projects
None yet
Development

No branches or pull requests

3 participants