praeclarum / sqlite-net

Simple, powerful, cross-platform SQLite client and ORM for .NET
MIT License
4.05k stars 1.42k forks source link

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) pthread_mutex_lock sqlite3_finalize #705

Open jwidmer opened 6 years ago

jwidmer commented 6 years ago

Xamarin Android App that we released about 2 months ago. We have been working through crashes and fixing them and now we are down to this one:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
pthread_mutex_lock

backtrace:

  #00  pc 0000000000047a06  /system/lib/libc.so (pthread_mutex_lock+1)
  #01  pc 0000000000010087  /data/app/com.myapp-2/lib/arm/libe_sqlite3.so (sqlite3_finalize+26)
  #02  pc 0000000000033794  <anonymous>

Any ideas what is going on here or how to track this down? We are on sqlite-net-pcl 1.5.166-beta.

Weldryn commented 6 years ago

You are using a beta version. Consider using a stable version instead ?

opcodewriter commented 6 years ago

@jwidmer I am getting exactly the same crash

#00 pc 00048576  /system/lib/libc.so (pthread_mutex_lock+1)
#01 pc 00010087  /data/app/com.myapp.droid-1/lib/arm/libe_sqlite3.so (sqlite3_finalize+26)
#02 pc 0000ccac  <anonymous:ccd2e000>

@Weldryn What beta version are you referring to? I am using sqlite-net-pcl v1.4.118

jwidmer commented 6 years ago

@opcodewriter 1.5.166-beta

praeclarum commented 6 years ago

The next release is going to bump SQLitePCLRaw to 1.1.11 - it handles the low-level access to the database and will hopefully fix your code.

Would you try updating those packages and report if you have the same problem?

jwidmer commented 6 years ago

Recently we have been considering updating our app to Entity Framework Core 2.1 (Microsoft.EntityFrameworkCore.Sqlite). EntityFrameworkCore.Sqlite also uses SQLitePCLRaw 1.1.11. How confident are you that the issue was related to the version of SQLitePCLRaw? I would like to recommend to just update to latest of SQLite-net-pcl (and therefore SQLitePCLRaw 1.1.11) but everyone else wants to move to EntityFrameworkCore. If we can get this issue fixed by just updating to latest of SQLite-net-pcl then I am pretty sure we will just do that. Any opinion?