On Wed, Sep 28, 2016 at 4:36 PM, Christian Rorvik
<
christia...@gmail.com> wrote:
> GC of code turned out to be a red herring. After isolating the instance of a
> call that was crashing, and getting right up to it, GDB was kind enough to
> get its knickers in a twist and segfault itself every time I stepped
> instruction by instruction to find the precise point of failure (backtrace
> after segfault looked pretty meaningless).
>
> What it tunred out to be a was a Ref vs Ptr problem, where in Julia I have a
> callback wrapper that receives a pointer to the closure. I was taking this
> as Ref{T} and invoking it with a pointer from the C code. This worked all
> fine and dandy, but somehow caused the object to be collected (I'm
> guessing). I can see how what I did was wrong, but I can't see how it would
> lead to something being collected when there still exists roots pointing to
> it. If anything I would possibly expect a leak. Nonetheless, bit of a wild
> goose chase.