locked
SIGSEGV fatal mono error? RRS feed

  • Question

  • User447 posted

    I'm getting this error. It seems to be semi-consistant and can happen anywhere. It also appears to be associated with something I am doing with SQLite but I just can't figure out how to start fixing this issue!

    Has anyone encountered this?

    [mono-rt] Stacktrace:
    [mono-rt] 
    [mono-rt]   at <unknown> <0xffffffff>
    [mono-rt]   at (wrapper managed-to-native) SQLite.SQLite3.Prepare2 (intptr,string,int,intptr&,intptr) <IL 0x0003c, 0xffffffff>
    [mono-rt]   at SQLite.SQLite3.Prepare2 (intptr,string) [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\SQLite.cs:2329
    [mono-rt]   at SQLite.SQLiteCommand.Prepare () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\SQLite.cs:1640
    [mono-rt]   at SQLite.SQLiteCommand/<ExecuteDeferredQuery>d__0`1.MoveNext () [0x00062] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\SQLite.cs:1566
    [mono-rt]   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <IL 0x0001b, 0x0018f>
    [mono-rt]   at System.Collections.Generic.List`1..ctor (System.Collections.Generic.IEnumerable`1<T>) <IL 0x00031, 0x00157>
    [mono-rt]   at System.Linq.Enumerable.ToList<TSource> (System.Collections.Generic.IEnumerable`1<TSource>) <IL 0x00007, 0x00077>
    [mono-rt]   at SQLite.SQLiteCommand.ExecuteQuery<T> () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\SQLite.cs:1535
    [mono-rt]   at SQLite.TableQuery`1.GetEnumerator () [0x0000b] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\SQLite.cs:2233
    [mono-rt]   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <IL 0x00001, 0x00083>
    [mono-rt]   at System.Collections.Generic.List`1..ctor (System.Collections.Generic.IEnumerable`1<T>) <IL 0x00031, 0x00157>
    [mono-rt]   at System.Linq.Enumerable.ToList<TSource> (System.Collections.Generic.IEnumerable`1<TSource>) <IL 0x00007, 0x00077>
    [mono-rt]   at Mobile_Time_Clock.ClockEntry/Find.ByEmployeeGUID (System.Guid) [0x0001a] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\ClockEntry.cs:116
    [mono-rt]   at Mobile_Time_Clock.Employee.MostRecentClockEntryOnDevice () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\Employee.cs:241
    [mono-rt]   at Mobile_Time_Clock.Employee.IsClockedIn () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\Employee.cs:280
    [mono-rt]   at Mobile_Time_Clock.Employee/Find.<AllClockedInLocallyByAuthority>b__c (Mobile_Time_Clock.Employee) [0x00000] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\Employee.cs:118
    [mono-rt]   at System.Linq.Enumerable/<CreateWhereIterator>c__Iterator33`1.MoveNext () <IL 0x00065, 0x002af>
    [mono-rt]   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <IL 0x0001b, 0x0018f>
    [mono-rt]   at System.Collections.Generic.List`1..ctor (System.Collections.Generic.IEnumerable`1<T>) <IL 0x00031, 0x00157>
    [mono-rt]   at System.Linq.Enumerable.ToList<TSource> (System.Collections.Generic.IEnumerable`1<TSource>) <IL 0x00007, 0x00077>
    [mono-rt]   at Mobile_Time_Clock.Employee/Find.AllClockedInLocallyByAuthority () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\Resources\Classes\Database\Employee.cs:118
    [mono-rt]   at Mobile_Time_Clock.DisplayEmployeesClockedInToThisDevice.Refresh () [0x00001] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\DisplayEmployeesClockedInToThisDevice.cs:129
    [mono-rt]   at Mobile_Time_Clock.DisplayEmployeesClockedInToThisDevice.OnCreate (Android.OS.Bundle) [0x0009a] in d:\Dropbox\Mobile Time Clock\Android Apps\Mobile Time Clock\Mobile Time Clock\Mobile Time Clock\DisplayEmployeesClockedInToThisDevice.cs:63
    [mono-rt]   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.App.Activity.cs:1561
    [mono-rt]   at (wrapper dynamic-method) object.8f024818-d9b6-4635-a473-2bf1574f3cd1 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
    [mono-rt]   at (wrapper native-to-managed) object.8f024818-d9b6-4635-a473-2bf1574f3cd1 (intptr,intptr,intptr) <IL 0x00023, 0xffffffff>
    [mono-rt] 
    [mono-rt] =================================================================
    [mono-rt] Got a SIGSEGV while executing native code. This usually indicates
    [mono-rt] a fatal error in the mono runtime or one of the native libraries 
    [mono-rt] used by your application.
    [mono-rt] =================================================================
    [mono-rt] 
    
    Wednesday, August 14, 2013 9:21 PM

All replies

  • User447 posted

    OK, getting closer. I've narrowed it down to multiple threads trying to perform work on the database at the same time.

    What would be the best way to handle this? Some kind of transient fault handling?

    Thursday, August 15, 2013 12:56 AM
  • User447 posted

    Fixed it! All I needed to do was make sure I was using a separate SQLiteConnection between threads, instead of trying to share a static one.

    Thursday, August 15, 2013 2:17 AM
  • User447 posted

    Ok so I never did truly fix the problem I just made it far less frequent!

    But I think I HAVE found a solution...

    https://forums.xamarin.com/discussion/comment/51611/#Comment_51611

    Monday, April 28, 2014 4:16 AM
  • User83785 posted

    Hi Le-royStaines,

    I'm using Mvvmcross, and getting this: http://stackoverflow.com/questions/30362502/sqlite-exception-in-mvvmcross-using-messenger-plugin?noredirect=1#comment48882381_30362502

    I've already did all the lock stuff, locking the _connection everywhere i use it in my code. But it still getting the same error as you use to have. I mean, after the locks, it is less frequently but still happening some times.

    Any clue?

    Thanks in regards,

    Saturday, May 23, 2015 5:14 AM