You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using JLD2
# Define a struct with 256 fields
count=256
fields = [Symbol("field",i) for i in1:count]
@evalstruct MyStruct
$(fields...)
end# Fill the struct
myStructInstance =MyStruct(ntuple(i -> i, count)...)
# Save the struct@save"myStruct.jld2" myStructInstance
# Load the struct@load"myStruct.jld2" myStructInstance
if count is 255 this works as expected but with 256 the following error occurs
┌ Warning: saved type MyStruct is missing field field1 in workspace type; reconstructing
└ @ JLD2 ~/.julia/packages/JLD2/VWinU/src/data/reconstructing_datatypes.jl:207
The resulting load is an empty struct
julia> myStructInstance
Reconstruct@MyStruct(())
Julia is 1.10 and JLD2 is the most recent version.
Is this a known bug? Or do I need to change any parameters of the @save command? (using jldsave/jldopen results in the same behavior)
The text was updated successfully, but these errors were encountered:
A minimum working example is the following:
if count is 255 this works as expected but with 256 the following error occurs
The resulting load is an empty struct
Julia is 1.10 and JLD2 is the most recent version.
Is this a known bug? Or do I need to change any parameters of the @save command? (using jldsave/jldopen results in the same behavior)
The text was updated successfully, but these errors were encountered: