# Profile.print() not working 0.5.1 win7

**URL:** <https://discourse.julialang.org/t/profile-print-not-working-0-5-1-win7/3554>\
**Category:** General Usage\
**Created:** [May 6, 2017, 8:00am UTC](https://discourse.julialang.org/t/profile-print-not-working-0-5-1-win7/3554 "2017-05-06T08:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [May 6, 2017, 8:00am UTC](https://discourse.julialang.org/t/profile-print-not-working-0-5-1-win7/3554/1 "2017-05-06T08:00:00Z")

</div>

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:

```julia

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.

```julia

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?
