Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling. #3

Closed
wants to merge 1 commit into from

Conversation

stereosteve
Copy link

Running specs on master w/ 0.21.1 I got:

Invalid memory access (signal 11) at address 0x0
[4459433179] *CallStack::print_backtrace:Int32 +107
[4459379463] __crystal_sigfault_handler +55
[140736114596666] _sigtramp +26
[4460655070] _Z9SaveErrorPPcRKN7leveldb6StatusE +26
[4460654944] leveldb_open +96
[4459785091] *LevelDB::DB#initialize<String>:Bool +211
[4459784857] *LevelDB::DB::new<String>:LevelDB::DB +137
[4459389083] ~procProc(Nil)@spec/leveldb/db_spec.cr:5 +571
[4459392043] *it<String, String, Int32, Int32, &Proc(Nil)>:(Array(Spec::Result) | Nil) +379
[4459388147] ~procProc(Nil)@spec/leveldb/db_spec.cr:4 +115
[4459670866] *Spec::RootContext::describe<String, String, Int32, &Proc(Nil)>:Spec::Context+ +354
[4459393593] *describe<String, String, Int32, &Proc(Nil)>:Spec::Context+ +9
[4459388011] ~procProc(Nil)@spec/leveldb/db_spec.cr:3 +107
[4459670866] *Spec::RootContext::describe<String, String, Int32, &Proc(Nil)>:Spec::Context+ +354
[4459403059] *describe<LevelDB:Module, String, Int32, &Proc(Nil)>:Spec::Context+ +51
[4459314439] __crystal_main +3543
[4459379208] main +40

Based on advice from jhass in the chat and looking at
levedb c api
converted to use
out param.
Specs pass now.

Use out param for error string.
@twisterghost twisterghost mentioned this pull request May 4, 2017
@veelenga
Copy link
Member

veelenga commented Oct 2, 2018

Sorry, it seems to me this PR is out of date. If I am wrong, please rebase or prepare a new PR and I will be happy to review/merge.

@veelenga veelenga closed this Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants