Juno? Bug? Struct prints with wrong value randomly

This is weird. Seems to only occur in Juno at the Julia REPL, not when Julia REPL is run at the command line.

struct A
    a::Float64
    b::Int
    c::Float64
end

julia> a = A(9, 6, 1.5)

Then repeatedly print a.

Sporadically, the displayed text will change between A(9.0, 6, 1.5) and A(9.0, 6, 1.2).

a.c always prints the correct value.

What’s going on here?

This is happening because of
https://github.com/JuliaLang/julia/issues/29885

As far as I can tell closing the workspace pane circumvents that bug because the race condition isn’t being triggered.

1 Like