Profile.print() not working 0.5.1 win7


#1

Hi all
I am getting the below error when using Profile.print() on a package of mine which is not public.

Profile.retrieve() throws the same error.

This code produces the error:


Profile.clear()   
Profile.init()

Profile.clear_malloc_data()
@profile res=DTM.run_model(ARGS)   

Profile.print()

ERROR: MethodError: Cannot `convert` an object of type Array{UInt8,1} to an object of type LambdaInfo
This may have arisen from a call to the constructor LambdaInfo(...),
since type constructors fall back to convert methods.
 in Nullable{LambdaInfo}(::Array{UInt8,1}) at .\sysimg.jl:53
 in lookup(::Ptr{Void}) at .\stacktraces.jl:131
 in Dict{UInt64,Array{StackFrame,1}}(::Base.Generator{Array{UInt64,1},Base.Profile.##4#5}) at .\dict.jl:348
 in getdict(::Array{UInt64,1}) at .\profile.jl:124
 in print at .\profile.jl:107 [inlined] (repeats 2 times)

I tried to save the profile data (to share it here).
But when I execute to code below, the profile is printed just fine (why?), but it does not seem to show any lines of my code.


pdata=deepcopy(Profile.fetch())
JLD.save("c:\\temp\\profiled_data.jld","profile_fetch",pdata)

exit()

#restart Julia
using JLD
dict=JLD.load("c:\\temp\\profiled_data.jld")
pdata=dict["profile_fetch"]
Profile.print(STDOUT,pdata) #works just fine.

@show Profile.fetch() seems to work. Is it worth sharing?