JuliaGizmos/GtkReactive.jl

drawing.jl Cairo/Canvas error

SteveElp opened this issue · 5 comments

I'm running drawing.jl from the REPL.

Ubuntu 20.04
JULIA VERSION 1.4.2

Any suggestions for the error below?

julia> ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358 ┌ Warning: Error in @guarded callback └ @ GtkReactive ~/.julia/packages/Gtk/X7HfN/src/base.jl:90 ERROR: MethodError: no method matching drawline(::Cairo.CairoContext, ::Array{Any,1}, ::RGB{FixedPointNumbers.Normed{UInt8,8}}) The applicable method may be too new: running in world age 27230, while current world is 27231. Closest candidates are: drawline(::Any, ::Any, ::Any) at none:2 (method too new to be called from this world context.) Stacktrace: [1] (::var"#9#10")(::Gtk.GtkCanvas, ::Array{Any,1}, ::Array{Any,1}) at ./none:6 [2] (::GtkReactive.var"#159#161"{var"#9#10",Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}})(::Gtk.GtkCanvas) at /home/peter/.julia/packages/Gtk/X7HfN/src/base.jl:88 [3] draw(::Gtk.GtkCanvas, ::Bool) at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:86 [4] draw at /home/peter/.julia/packages/Gtk/X7HfN/src/cairo.jl:84 [inlined] [5] #160 at /home/peter/.julia/packages/GtkReactive/lAPT0/src/graphics_interaction.jl:296 [inlined] [6] #33 at /home/peter/.julia/packages/Reactive/g1LZ6/src/operators.jl:41 [inlined] [7] runaction(::Reactive.var"#33#34"{GtkReactive.var"#160#162"{GtkReactive.Canvas{UserUnit}},Signal{Nothing},Tuple{Signal{Array{Any,1}},Signal{Array{Any,1}}}}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:313 [8] foreach(::typeof(Reactive.runaction), ::Array{Function,1}) at ./abstractarray.jl:1919 [9] run_node(::Signal{Nothing}) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:340 [10] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::typeof(Reactive.print_error), ::Bool) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:358 [11] run_push(::Signal{Array{Any,1}}, ::Array{Any,1}, ::Function) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:345 [12] run(::Int64) at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:306 [13] run at /home/peter/.julia/packages/Reactive/g1LZ6/src/core.jl:300 [inlined] [14] (::Reactive.var"#27#29")() at ./task.jl:358

That's not much to go on, to get any real help you'll need to submit a reproducible example.

But you can (and should) read about world age here.

Thank you for your answer!

Please close the issue. The problem is present in GTK.jl, and not related to GtkReactive. If I run the "gl-area.jl" example, I get the same error as I get with GtkReactive. But the testcases of GTK.jl all pass.

Could be added to the GtkReactive docs to install GTK.jl, run all the testcases and all the examples (currently 3) to check for errors.

@SteveElp did you resolve it? I'm experiencing the same thing.

FWIW all the Gtk.jl tests and examples pass.

Okay, moving the method definition prior to the do/block method using it worked. I'll submit a PR to change the example I suppose.