I tried out the old example code from 2018 at this link for some real time plotting.
It errored in 1.11.1 with a resize! error. When I tried it in 1.10.6 it worked fine. I am assuming there should be a new method written for resize?
The error is:
julia> gplot = testanimplot()
ERROR: MethodError: no method matching resize!(::Memory{UInt8}, ::Int64)
The function `resize!` exists, but no method is defined for this combination of argument types.
Closest candidates are:
resize!(::Gtk.GtkWindow, ::Integer, ::Integer)
@ Gtk C:\Users\jakez\.julia\packages\Gtk\oo3cW\src\windows.jl:18
resize!(::BitVector, ::Integer)
@ Base bitarray.jl:814
resize!(::Vector, ::Integer)
@ Base array.jl:1436
Are there more lines in the error message that you did not paste? I miss a reference to the function that calls resize!, since the code of example that you link does not contain it.
In any event, it seems that the problem is in some function belonging to Gtk.jl, which might be using some non-API feature of Julia no longer working in 1.11.
Unfortunately, the Github of Gtk.jl tells that that package is no longer maintained. Perhaps modifying the example (from a very old, 2018 post) to make it work with Gtk4.jl may help.
I thought there might be other places the resize!(::Memory{UInt8}, ::Int64) command is used so that there might need to be a method for this, perhaps I am wrong?
Memory is a new type in Julia 1.11 which is the new fundamental memory allocation type. It doesn’t have a resize! function. It looks like NumericIO.jl is accessing some internal field that used to be a Vector (which supports resize!) but is now a Memory. But that’s just a guess.
#One-off solution to formatting individual values:
function string_formatted(v::Real, fmt::IOFormattingReal; showexp::Bool=true)
s = IOBuffer()
print_formatted(s, v, fmt, showexp=showexp)
d = s.data
resize!(d, s.size)
return String(d)
end