Closed thchr closed 1 year ago
Well, I can't infer from that error message what could cause it. The qhull memory is reserved and initialized in the Voronoi constructor. The failing unsafe_load comes from a julia function (qh_visit_voronoi) that is given to qhull as cfunction. The invalid pointer should be allocated inside qhull and given to qh_visit_voronoi as parameter. Maybe the SnoopPrecompile has some incompatibility with the giving julia function as parameter to qhull. At least that is only thing I can think of now.
After trying for ~1 hour, I somehow also cannot reproduce this anymore: sorry about the noise - I'll close this again.
For posterity, a possible MWE could have been something like this (but works fine for me now...):
Put this in /src/DebugSnoop.jl
module SnoopDebug
using SnoopPrecompile
using DirectQhull
f(x) = Voronoi(x .* rand(2,5))
@precompile_all_calls begin
f(2)
end
end # module
using DebugSnoop
crashes - now it doesn't.using DebugSnoop
):
using SnoopPrecompile
SnoopPrecompile.verbose[] = true
include("src/DebugSnoop.jl")
I tried using SnoopPrecompile.jl on a method that called
Voronoi
from DirectQhull.jl. Unfortunately, it seems there is some pointer loaded during module initialization that does not persist between different loads of the package: I wonder if these pointers should be initialized in an__init__
function?Representative error message below: