# Deepcopy command during debugging leads to error message

**URL:** <https://discourse.julialang.org/t/deepcopy-command-during-debugging-leads-to-error-message/24561>\
**Category:** New to Julia\
**Created:** [May 24, 2019, 11:22am UTC](https://discourse.julialang.org/t/deepcopy-command-during-debugging-leads-to-error-message/24561 "2019-05-24T11:22:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [May 24, 2019, 11:22am UTC](https://discourse.julialang.org/t/deepcopy-command-during-debugging-leads-to-error-message/24561/1 "2019-05-24T11:22:18Z")

</div>

Hello,

I got an error message during debugging when I step over a command, which makes a copy of an object of a mutable struct with the function deepcopy.

ERROR: MethodError: no method matching ccall\_jl\_set\_nth\_field\_6c4adf90\_7e15\_11e9\_17a8\_a11fb0465f61(::Population.Pop, ::Int64, ::Int64)

The strange thing is: If I evaluate the expression for example in Jupyter or in the prompt, it will work. Does somebody have this issue, too?

I use pop\_tmp = deepcopy(pop) to make the copy of the object.

Best regards,  
Volker

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 24, 2019, 11:28am UTC](https://discourse.julialang.org/t/deepcopy-command-during-debugging-leads-to-error-message/24561/2 "2019-05-24T11:28:39Z")

</div>

Looks like a bug in JuliaInterpreter ([https://github.com/JuliaDebug/JuliaInterpreter.jl](https://github.com/JuliaDebug/JuliaInterpreter.jl)). Maybe post an issue there? Would be good if you could also include a minimal self contained example that fails like that.
