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

GLMakie: error when zooming too much #1040

Closed
ggggggggg opened this issue Jun 9, 2021 · 1 comment
Closed

GLMakie: error when zooming too much #1040

ggggggggg opened this issue Jun 9, 2021 · 1 comment

Comments

@ggggggggg
Copy link

ggggggggg commented Jun 9, 2021

See the below REPL output. After the lines(x,y) line I just keep using my mouse to zoom by dragging small boxes over the figure until eventually the error you see appears.

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake-avx512)

julia> x = range(0, 10, length=100)
0.0:0.10101010101010101:10.0

julia> y = sin.(x);

julia> lines(x, y)

julia> Error in callback:
ArgumentError: range step cannot be zero
Stacktrace:
  [1] (::Colon)(start::Float32, step::Float32, stop::Float32)
    @ Base .\twiceprecision.jl:387
  [2] get_minor_tickvalues(i::IntervalsBetween, scale::Function, tickvalues::Vector{Float32}, vmin::Float32, vmax::Float32)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\lineaxis.jl:589
  [3] (::Makie.MakieLayout.var"#177#208"{Observable{Vector{Float32}}, Observable{Any}, Attributes})(tickvalues::Vector{Float32}, minorticks::IntervalsBetween)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\lineaxis.jl:251
  [4] (::Observables.OnUpdate{Makie.MakieLayout.var"#177#208"{Observable{Vector{Float32}}, Observable{Any}, Attributes}, Tuple{Observable{Vector{Float32}}, Observable{Any}}})(#unused#::Vector{Float32})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:334
  [5] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
  [6] invokelatest
    @ .\essentials.jl:706 [inlined]
  [7] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
  [8] setindex!(observable::Observable{Vector{Float32}}, val::Vector{Float64})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248
  [9] (::Makie.MakieLayout.var"#173#204"{Observable{Vector{String}}, Observable{Vector{Point{2, Float32}}}, Observable{Vector{Float32}}, Observable{Tuple{Float32, Tuple{Float32, Float32}, Bool}}, Observable{Any}, Attributes})(tickvalues_labels_unfiltered::Tuple{Vector{Float64}, Vector{String}}, reversed::Bool)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\lineaxis.jl:226
 [10] (::Observables.OnUpdate{Makie.MakieLayout.var"#173#204"{Observable{Vector{String}}, Observable{Vector{Point{2, Float32}}}, Observable{Vector{Float32}}, Observable{Tuple{Float32, Tuple{Float32, Float32}, Bool}}, Observable{Any}, Attributes}, Tuple{Observable{Tuple{Vector{Float64}, Vector{String}}}, Observable{Any}}})(#unused#::Tuple{Vector{Float64}, Vector{String}})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:334
 [11] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [12] invokelatest
    @ .\essentials.jl:706 [inlined]
 [13] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
 [14] setindex!(observable::Observable{Tuple{Vector{Float64}, Vector{String}}}, val::Tuple{Vector{Float64}, Vector{String}})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248
 [15] (::Observables.MapUpdater{Makie.MakieLayout.var"#172#203", Tuple{Vector{Float64}, Vector{String}}})(::Tuple{Float32, Tuple{Float32, Float32}, Bool}, ::Vararg{Any, N} where N)
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:372
 [16] (::Observables.OnUpdate{Observables.MapUpdater{Makie.MakieLayout.var"#172#203", Tuple{Vector{Float64}, Vector{String}}}, Tuple{Observable{Tuple{Float32, Tuple{Float32, Float32}, Bool}}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}}})(#unused#::Tuple{Float32, Float32})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:334
 [17] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [18] invokelatest
    @ .\essentials.jl:706 [inlined]
 [19] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
 [20] setindex!
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248 [inlined]
 [21] (::Observables.var"#3#4"{Any, Observable{Any}})(value::Tuple{Float32, Float32})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:58
 [22] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [23] invokelatest
    @ .\essentials.jl:706 [inlined]
 [24] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
 [25] setindex!
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248 [inlined]
 [26] MapUpdater
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:372 [inlined]
 [27] (::Observables.OnUpdate{Observables.MapUpdater{typeof(Makie.MakieLayout.xlimits), Tuple{Float32, Float32}}, Tuple{Observable{GeometryBasics.HyperRectangle{2, Float32}}}})(#unused#::GeometryBasics.HyperRectangle{2, Float32})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:334
 [28] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [29] invokelatest
    @ .\essentials.jl:706 [inlined]
 [30] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
 [31] setindex!
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248 [inlined]
 [32] adjustlimits!(la::Axis)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\layoutables\axis.jl:901
 [33] #262
    @ C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\layoutables\axis.jl:438 [inlined]
 [34] (::Observables.OnUpdate{Makie.MakieLayout.var"#262#294"{Axis}, Tuple{Observable{GeometryBasics.HyperRectangle{2, Int64}}, Observable{GeometryBasics.HyperRectangle{2, Float32}}}})(#unused#::GeometryBasics.HyperRectangle{2, Float32})
    @ Observables C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:334
 [35] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [36] invokelatest
    @ .\essentials.jl:706 [inlined]
 [37] notify
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:88 [inlined]
 [38] setindex!
    @ C:\Users\oneilg\.julia\packages\Observables\OFj0u\src\Observables.jl:248 [inlined]
 [39] process_interaction(r::Makie.MakieLayout.RectangleZoom, event::MouseEvent, ax::Axis)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\interactions.jl:192
 [40] (::Makie.MakieLayout.var"#process_event#291"{Axis})(event::MouseEvent)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\layoutables\axis.jl:399
 [41] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [42] invokelatest
    @ .\essentials.jl:706 [inlined]
 [43] notify(observable::Makie.PriorityObservable{MouseEvent})
    @ Makie C:\Users\oneilg\.julia\packages\Makie\u02af\src\interaction\PriorityObservable.jl:72
 [44] setindex!
    @ C:\Users\oneilg\.julia\packages\Makie\u02af\src\interaction\PriorityObservable.jl:66 [inlined]
 [45] (::Makie.MakieLayout.var"#100#102"{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}, Makie.PriorityObservable{MouseEvent}, Float64, Module})(event::Makie.MouseButtonEvent)
    @ Makie.MakieLayout C:\Users\oneilg\.julia\packages\Makie\u02af\src\makielayout\mousestatemachine.jl:291
 [46] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [47] invokelatest
    @ .\essentials.jl:706 [inlined]
 [48] notify(observable::Makie.PriorityObservable{Makie.MouseButtonEvent})
    @ Makie C:\Users\oneilg\.julia\packages\Makie\u02af\src\interaction\PriorityObservable.jl:72
 [49] setindex!
    @ C:\Users\oneilg\.julia\packages\Makie\u02af\src\interaction\PriorityObservable.jl:66 [inlined]
 [50] (::GLMakie.var"#mousebuttons#67"{Makie.PriorityObservable{Makie.MouseButtonEvent}})(window::GLFW.Window, button::GLFW.MouseButton, action::GLFW.Action, mods::Int32)
    @ GLMakie C:\Users\oneilg\.julia\packages\GLMakie\9FCgb\src\events.jl:89
 [51] _MouseButtonCallbackWrapper(window::GLFW.Window, button::GLFW.MouseButton, action::GLFW.Action, mods::Int32)
    @ GLFW C:\Users\oneilg\.julia\packages\GLFW\BWxfF\src\callback.jl:43
 [52] PollEvents
    @ C:\Users\oneilg\.julia\packages\GLFW\BWxfF\src\glfw3.jl:620 [inlined]
 [53] pollevents
    @ C:\Users\oneilg\.julia\packages\GLMakie\9FCgb\src\screen.jl:548 [inlined]
 [54] fps_renderloop(screen::GLMakie.Screen, framerate::Float64)
    @ GLMakie C:\Users\oneilg\.julia\packages\GLMakie\9FCgb\src\rendering.jl:21
 [55] renderloop(screen::GLMakie.Screen; framerate::Float64)
    @ GLMakie C:\Users\oneilg\.julia\packages\GLMakie\9FCgb\src\rendering.jl:48
 [56] renderloop(screen::GLMakie.Screen)
    @ GLMakie C:\Users\oneilg\.julia\packages\GLMakie\9FCgb\src\rendering.jl:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants