-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
limits!
hangs when being passed a an indexed Figure, not an Axis
#3564
Comments
Looks like this method is being called in a loop: Makie.jl/src/makielayout/blocks/axis.jl Lines 1375 to 1377 in 5c8d07c
Placing a suitable restriction on args seems to do the trick:
diff --git a/src/makielayout/blocks/axis.jl b/src/makielayout/blocks/axis.jl
index 8248577fb..3d270b73a 100644
--- a/src/makielayout/blocks/axis.jl
+++ b/src/makielayout/blocks/axis.jl
@@ -1372,7 +1372,7 @@ function limits!(ax::Axis, rect::Rect2)
Makie.ylims!(ax, ymin, ymax)
end
-function limits!(args...)
+function limits!(args::Union{Real, HyperRectangle}...)
limits!(current_axis(), args...)
end
|
@Sagnac That line indeed looks like the source of the problem and the proposed fix looks like it will solve it. Will you commit a fix or do you prefer if I open a PR? |
I can prepare a PR later today or tomorrow |
Fixes MakieOrg#3564 Restricting the sans axis arguments to the expected types prevents the method from being called in a non-terminating loop which was the case if, for example, the function was called with an indexed Figure instead of an Axis; calling limits! without a current axis also resulted in a stack overflow.
Fixes MakieOrg#3564 Restricting the sans axis arguments to the expected types prevents the method from being called in a non-terminating loop which was the case if, for example, the function was called with an indexed Figure instead of an Axis; calling limits! without a current axis also resulted in a stack overflow.
I've opened a PR with the fix. My initial solution wasn't ideal since it didn't allow for the lims to have a value of |
Fixes #3564 Restricting the sans axis arguments to the expected types prevents the method from being called in a non-terminating loop which was the case if, for example, the function was called with an indexed Figure instead of an Axis; calling limits! without a current axis also resulted in a stack overflow.
]activate --temp; add Makie
)This works as intended
Now change the line
limits!(ax, -100, 100, -100, 100)
to the (incorrect)limits!(fig[1, 1], -100, 100, -100, 100)
, so:and now Julia hangs/ freezes. When this occurs I cannot interrupt it in vscode (which is an issue for the developers of Julia itself I guess) so I have to kill and restart the session.
Desired behavior: an error.
versioninfo()
Manifest.toml
The text was updated successfully, but these errors were encountered: