-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
World age failure when running GtkReactive demo #21141
Comments
There turns out to be a more reliable failure: run the |
for Reactive, I assume it'll want to do something like a more correct version of (like calling apply_latest): (or maybe just starting the event loop later?)
Looks like the underlying cause is probably a race-condition between restoring backedges and invalidating them during deserialization. |
Just to make sure I understand, you're saying it's only an issue because of the asynchronous nature of Reactive? And that by putting it inside an I'm not finding an |
The part that I changed is inside the action closure callback, so it doesn't run until the checkbox is clicked. The race condition means that it sometimes gets confused about which method it should be running, depending on the order in which recompilation was happening (e.g. the |
Hmm, on 5cacdd6 the following: using GtkReactive, Gtk.ShortNames
using Base.Test
try
Reactive.stop()
catch
end
rr() = (Reactive.run_till_now(); yield())
rr()
win = Window() |> (c = canvas(UserUnit))
showall(win)
sleep(0.1)
lastevent = Ref("nothing")
motion = map(btn->lastevent[] = string("motion to ", btn.position.x, ", ", btn.position.y),
c.mouse.motion) still triggers the following errors when I mouse over the window: julia> include("reduced.jl")
Signal{String}(motion to GtkReactive.UserUnit(-1.0), GtkReactive.UserUnit(-1.0), nactions=0)
julia> Failed to push!
GtkReactive.MouseButton{GtkReactive.UserUnit}(GtkReactive.XY{GtkReactive.UserUnit}(GtkReactive.UserUnit(28.6624755859375), GtkReactive.UserUnit(10.3670654296875)), 0x00000000, 3, 0, nothing)
to node
Signal{GtkReactive.MouseButton{GtkReactive.UserUnit}}(GtkReactive.MouseButton{GtkReactive.UserUnit}(GtkReactive.XY{GtkReactive.UserUnit}(GtkReactive.UserUnit(28.6624755859375), GtkReactive.UserUnit(10.3670654296875)), 0x00000000, 3, 0, nothing), nactions=1)
MethodError: no method matching (::##3#4)(::GtkReactive.MouseButton{GtkReactive.UserUnit})
The applicable method may be too new: running in world age 21654, while current world is 21655.
Closest candidates are:
#3(::Any) at /home/tim/.julia/v0.6/GtkReactive/test/reduced.jl:16 (method too new to be called from this world context.)
(::Reactive.##10#11{##3#4,Tuple{Reactive.Signal{GtkReactive.MouseButton{GtkReactive.UserUnit}}}})(::Reactive.Signal{String}, ::Int64) at /home/tim/.julia/v0.6/Reactive/src/operators.jl:39
do_action(::Reactive.Action, ::Int64) at /home/tim/.julia/v0.6/Reactive/src/core.jl:141
run(::Int64) at /home/tim/.julia/v0.6/Reactive/src/core.jl:218
macro expansion at /home/tim/.julia/v0.6/Reactive/src/core.jl:258 [inlined]
(::Reactive.##7#8)() at ./task.jl:335
... |
AFAICT, this is doing exactly what it was asked to do. The only bug here was that it would then segfault afterwards. |
I misunderstood. You're saying we still need the Reactive change? Is there an |
…ation we need to restore not only backedges directly to the new methods, but also to any methods whos backedges have not been inferred but which might propagate invalidation changes to the new code fix #21141
…ation we need to restore not only backedges directly to the new methods, but also to any methods whos backedges have not been inferred but which might propagate invalidation changes to the new code fix #21141
…ation we need to restore not only backedges directly to the new methods, but also to any methods whos backedges have not been inferred but which might propagate invalidation changes to the new code fix #21141
…ation we need to restore not only backedges directly to the new methods, but also to any methods whos backedges have not been inferred but which might propagate invalidation changes to the new code fix #21141
When running the
examples/drawing.jl
demo underand if GtkReactive needs to be rebuilt, I get the following error when I click on the canvas:
However, it seems to work fine if GtkReactive didn't need to be recompiled.
For you convenience I did a
egrep "pure|generated|eval" *
in every package that gets loaded for that demo, looking for language constructs that might be suspicious; results are in this gist.The text was updated successfully, but these errors were encountered: