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

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

Open
zw963 opened this issue Apr 11, 2024 · 0 comments
Open

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

zw963 opened this issue Apr 11, 2024 · 0 comments

Comments

@zw963
Copy link

zw963 commented Apr 11, 2024

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

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

No branches or pull requests

1 participant