Closed louisponet closed 1 year ago
Hi @louisponet ,
StackFrame
s contain quite objects from Core
and therefore references connected to julia C internals.
This is an absolute nightmare to support. (Hard to debug and can change between julia releases)
For such things it is probably best to use the Serialization
standard lib.
In case you would still like to use JLD2
as a container format for storing additional metadata or so,
have a look at #377.
It shows you one possible way to use CustomSerialization
to embedd binary payloads into JLD2 files.
julia> dump(Base.StackTraces.StackFrame)
Base.StackTraces.StackFrame <: Any
func::Symbol
file::Symbol
line::Int64
linfo::Union{Nothing, Core.CodeInfo, Core.MethodInstance}
from_c::Bool
inlined::Bool
pointer::UInt64
Yeah I thought it must have been something like that. I dug a bit myself and found pointers and whatnot in the stackframes (which I thought would be just a representation), and realized that's probably the issue. I also once tried saving tasks and there it was clearer to me why that wouldn't work.
Thank you for the suggestions, I'll experiment with those a bit!
Cheers
MWE:
Is there a reason why this shouldn't work?