You're right that returning `Db` instead of `ref Db` "fixes" the problem, but 
is that really a solution? Returning a "ref" simply means that `load_rdb()` is 
really a Db constructor. That should work.

And no, an alias for `DbRef = ref Db` does 
_[not](https://forum.nim-lang.org/postActivity.xml#not) fix it. Same for `DB = 
ref object`. Still crashes....

... Oh! Your clue helped me find the problem.
    
    
    let scanned = sscanf(line.cstring, v_frmt.cstring,
                    addr result.version)
    
    
    Run

"version" there is a string, not a cstring, so this is over-writing the 
ref-counting data.

I really, really want the "newruntime". This kind of mistake is way too easy.

Reply via email to