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

World Age #161

Closed
MikaelSlevinsky opened this issue Mar 24, 2017 · 17 comments
Closed

World Age #161

MikaelSlevinsky opened this issue Mar 24, 2017 · 17 comments

Comments

@MikaelSlevinsky
Copy link

On version:

julia> versioninfo()
Julia Version 0.6.0-pre.alpha.220
Commit 89609cf* (2017-03-22 20:10 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

with master Interact and IJulia, I get a world age issue in IJulia:

using Interact
x = collect(linspace(-1,1,101))
f = sin.(10exp.(x));
@manipulate for i = 1:10
    i
end

5
KERNEL EXCEPTION
MethodError: no method matching (::##1#4)(::IJulia.Msg)
The applicable method may be too new: running in world age 21603, while current world is 21678.
Closest candidates are:
  #1(::Any) at /Users/Mikael/.julia/v0.6/Interact/src/IJulia/setup.jl:56 (method too new to be called from this world context.)

Stacktrace:
 [1] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /Users/Mikael/.julia/v0.6/IJulia/src/comm_manager.jl:135
 [2] eventloop(::ZMQ.Socket) at /Users/Mikael/.julia/v0.6/IJulia/src/eventloop.jl:8
 [3] (::IJulia.##9#12)() at ./task.jl:335

KERNEL EXCEPTION
MethodError: no method matching (::##1#4)(::IJulia.Msg)
The applicable method may be too new: running in world age 21603, while current world is 21678.
Closest candidates are:
  #1(::Any) at /Users/Mikael/.julia/v0.6/Interact/src/IJulia/setup.jl:56 (method too new to be called from this world context.)

Stacktrace:
 [1] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /Users/Mikael/.julia/v0.6/IJulia/src/comm_manager.jl:135
 [2] eventloop(::ZMQ.Socket) at /Users/Mikael/.julia/v0.6/IJulia/src/eventloop.jl:8
 [3] (::IJulia.##9#12)() at ./task.jl:335

KERNEL EXCEPTION
MethodError: no method matching (::##1#4)(::IJulia.Msg)
The applicable method may be too new: running in world age 21603, while current world is 21678.
Closest candidates are:
  #1(::Any) at /Users/Mikael/.julia/v0.6/Interact/src/IJulia/setup.jl:56 (method too new to be called from this world context.)

Stacktrace:
 [1] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /Users/Mikael/.julia/v0.6/IJulia/src/comm_manager.jl:135
 [2] eventloop(::ZMQ.Socket) at /Users/Mikael/.julia/v0.6/IJulia/src/eventloop.jl:8
 [3] (::IJulia.##9#12)() at ./task.jl:335

This is too cryptic for me to figure out; I'm not even sure if it's an Interact or IJulia issue.

@JobJob
Copy link
Member

JobJob commented Mar 24, 2017

Hi, yeah a fix for this is coming soon, we're waiting on something in Base (more info here #158 (comment) if you're curious)

In the meantime I think you should be able to workaround this with the following changes:

Change this line in IJulia to eval(Expr(:call, handlers[msg.header["msg_type"]], socket, msg)), and this line in Reactive to isrequired(a) && eval(Expr(:call, a.f, a.recipient.value, timestep))

Let me know how it goes.

@JobJob
Copy link
Member

JobJob commented Mar 24, 2017

Actually looking at the error you might also have to change this line to

eval(Expr(:call, comm.on_msg, msg))

@MikaelSlevinsky
Copy link
Author

Thanks, the fix works! I only use Interact with plotting for demos, and it appears to have gotten a lot slower since July (on 0.4 then, 0.6 now). Any reason you can think of?

@JobJob
Copy link
Member

JobJob commented Mar 24, 2017

Doing what exactly? moving sliders to update plots? Which plotting lib?

I've noticed the throttle on the number of updates for each move of the slider is working "better" as in the plot updates fewer times when you move the slider, but sometimes this makes things less smooth

@JobJob
Copy link
Member

JobJob commented Mar 24, 2017

Glad it works btw, did you need to add the last part?

@timholy
Copy link
Member

timholy commented Apr 6, 2017

Probably fixed in JuliaLang/julia#20820 (worth testing).

@timholy
Copy link
Member

timholy commented Apr 6, 2017

Or perhaps not. See JuliaLang/julia#21141.

@SimonDanisch
Copy link
Member

Yeah, still getting world age errors first time after precompilation.. but they seem to be gone after a restart... Still not tested very well from my side, though

@oschulz
Copy link

oschulz commented Jun 20, 2017

Any news on this? I just ran into this with Julia v0.6.0:

MethodError: no method matching (::##13#14{Interact.Options{:SelectionSlider,Float64}})(::IJulia.Msg)
The applicable method may be too new: running in world age [...]

@oschulz
Copy link

oschulz commented Jun 20, 2017

Restart didn't help, in my case.

@JobJob
Copy link
Member

JobJob commented Jun 20, 2017

You might need to update IJulia

@JobJob
Copy link
Member

JobJob commented Jun 20, 2017

Oh I think you need to Pkg.checkout("IJulia"), let me know how that goes.

@JobJob
Copy link
Member

JobJob commented Jun 20, 2017

@stevengj if you get a chance to tag an IJulia release that would be great! Interact doesn't work on julia 0.6 without the invokelatest changes.

@shashi
Copy link
Member

shashi commented Jun 20, 2017

I've tagged it. @JobJob @timholy many thanks to you fine folks for taking care of this <3

@dpsanders
Copy link
Contributor

Can confirm that Interact works on the release of 0.6 with IJulia master (tag waiting to be merged:
JuliaLang/METADATA.jl#9891). Thanks to all!

@JobJob
Copy link
Member

JobJob commented Jun 20, 2017

Cheers, have fun at juliacon everyone!

@oschulz
Copy link

oschulz commented Jun 20, 2017

Works for me too now - thanks a lot, @JobJob and @shashi!

@shashi shashi closed this as completed Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants