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

DataInspector fails on meshscatter when markersize is an integer #4647

Open
3 tasks done
BambOoxX opened this issue Dec 5, 2024 · 0 comments
Open
3 tasks done

DataInspector fails on meshscatter when markersize is an integer #4647

BambOoxX opened this issue Dec 5, 2024 · 0 comments
Labels

Comments

@BambOoxX
Copy link

BambOoxX commented Dec 5, 2024

  • what version of Makie are you running? (]st -m Makie)
    • GLMakie v0.10.16
    • Makie v0.21.16
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on?

Julia Version 1.10.4
Commit 48d4fd4843 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, tigerlake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

When inspecting data inside a meshscatter I had the following error

julia> Error in callback:
TaskFailedException
Stacktrace:
  [1] check_channel_state
    @ .\channels.jl:188 [inlined]
  [2] put!
    @ .\channels.jl:340 [inlined]
  [3] (::Makie.var"#1321#1325"{Channel{Nothing}})(::Tuple{Float64, Float64}, ::Tuple{Float64, Float64})
    @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:296
  [4] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base .\essentials.jl:892
  [5] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:889
  [6] (::Observables.OnAny)(value::Any)
    @ Observables D:\bamboo\.julia\packages\Observables\YdEbO\src\Observables.jl:420
  [7] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
  [8] invokelatest
    @ .\essentials.jl:889 [inlined]
  [9] notify
    @ D:\bamboo\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [10] setindex!
    @ D:\bamboo\.julia\packages\Observables\YdEbO\src\Observables.jl:123 [inlined]
 [11] (::GLMakie.MousePositionUpdater)(::Makie.TickState)
    @ GLMakie D:\bamboo\.julia\packages\GLMakie\xG4T9\src\events.jl:6
 [12] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
 [13] invokelatest
    @ .\essentials.jl:889 [inlined]
 [14] notify
    @ D:\bamboo\.julia\packages\Observables\YdEbO\src\Observables.jl:206 [inlined]
 [15] setindex!
    @ D:\bamboo\.julia\packages\Observables\YdEbO\src\Observables.jl:123 [inlined]
 [16] pollevents(screen::GLMakie.Screen{GLFW.Window}, frame_state::Makie.TickState)
    @ GLMakie D:\bamboo\.julia\packages\GLMakie\xG4T9\src\screen.jl:486
 [17] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie D:\bamboo\.julia\packages\GLMakie\xG4T9\src\screen.jl:935
 [18] renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie D:\bamboo\.julia\packages\GLMakie\xG4T9\src\screen.jl:963
 [19] (::GLMakie.var"#71#72"{GLMakie.Screen{GLFW.Window}})()
    @ GLMakie D:\bamboo\.julia\packages\GLMakie\xG4T9\src\screen.jl:823

    nested task error: MethodError: no method matching _to_scale(::Int64, ::UInt32)

    Closest candidates are:
      _to_scale(::Vec{3, Float32}, ::Any)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:60
      _to_scale(::Vec{2, Float32}, ::Any)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:59
      _to_scale(::Vector, ::Any)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:61
      ...

    Stacktrace:
     [1] show_data(inspector::DataInspector, plot::MeshScatter{Tuple{Vector{Point3}}}, idx::UInt32)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:473
     [2] show_data_recursion(inspector::DataInspector, plot::MeshScatter{Tuple{Vector{Point3}}}, idx::UInt32)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:351
     [3] on_hover(inspector::DataInspector)
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:321
     [4] (::Makie.var"#1320#1324"{Scene, DataInspector})(ch::Channel{Nothing})
       @ Makie D:\bamboo\.julia\packages\Makie\pFPBw\src\interaction\inspector.jl:286
     [5] (::Base.var"#651#652"{Makie.var"#1320#1324"{Scene, DataInspector}, Channel{Nothing}})()
       @ Base .\channels.jl:142

Code to reproduce

using GLMakie
plt = meshscatter(rand(Point3,10), color=:red, markersize=250, inspector_label=(plot, index, position) -> "foo")
DataInspector()

Code that works (note the "." after 250)

using GLMakie
plt = meshscatter(rand(Point3,10), color=:red, markersize=250., inspector_label=(plot, index, position) -> "foo")
DataInspector()
@BambOoxX BambOoxX added the bug label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant