A solution was come to, but it’s a bit of a hack…
The Clustering
class accepts a Proc
in the initializer. To fix the segfault, the initialize argument was removed and turned into a property which was set through a captured block through the start
method.
I disabled GC pretty early in the debug process to no avail.
Tried LLDB.
--release
, and --debug
have both been tried independetly, also to no avail.
This is the seggy.
Invalid memory access (signal 11) at address 0x4
[0x100b6576b] *CallStack::print_backtrace:Int32 +107
[0x100b066f6] __crystal_sigfault_handler +262
[0x7fff57be2b5d] _sigtramp +29
[0x100ce15e1] *Array(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool)))@Array(T)#check_needs_resize:(Pointer(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool))) | Nil) +17
[0x100ce1566] *Array(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool)))@Array(T)#push<NamedTuple(field: Symbol, message: String, positive: Nil, negative: Nil, block: Proc(RethinkORM::Base+, Bool))>:Array(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool))) +70
[0x100ce150e] *Array(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool)))@Array(T)#<<<NamedTuple(field: Symbol, message: String, positive: Nil, negative: Nil, block: Proc(RethinkORM::Base+, Bool))>:Array(NamedTuple(field: Symbol, message: String, positive: Proc(RethinkORM::Base+, Bool) | Nil, negative: Proc(RethinkORM::Base+, Bool) | Nil, block: Proc(RethinkORM::Base+, Bool))) +94
[0x100ae868d] __crystal_main +4285
[0x100ecbe4b] *Crystal::main_user_code<Int32, Pointer(Pointer(UInt8))>:Nil +27
[0x100ecbcdb] *Crystal::main<Int32, Pointer(Pointer(UInt8))>:Int32 +43
[0x100af80fb] main +27