Skip to content

Invalid memory access (signal 11) at address 0x0  #96

@zw963

Description

@zw963
Invalid memory access (signal 11) at address 0x0
[0x55eb4f123e66] *Exception::CallStack::print_backtrace:Nil +118 in bin/translater
[0x55eb4f1048e6] ~procProc(Int32, Pointer(LibC::SiginfoT), Pointer(Void), Nil) +310 in bin/translater
[0x7f828811c770] ?? +140198605342576 in /usr/lib/libc.so.6
[0x0] ???

I can reproduce this on my recent version translater.
it is an simple app with infrequent access to SQL.

reproduce

  1. clone https://github.com/crystal-china/translater and switch to sqlite3_exception branch.
  2. shards install
  3. shards build
  4. run bin/translater -e baidu,bing 'hello world'

As you can see, it raise Invalid memory access this time, but it work on next time.

image

the broken code is here, when insert into two table in same db file in a times loop.

Anyway, i thiought whatever happen don't should cause a Invalid memory access.

Add a sleep 0.1 after this line, seem like fix this issue.

BTW: same issue happen both on use DB.connect or DB.open.

Test on Crystal 1.12.0

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions