Crash on recursive GetAllWithChildren with specific property format.

Issue #148 invalid
Knight Steele created an issue

This is my first time submitting a bug report, so let me know if I need to update/change anything.

I’ve been working on an app using Xamarin.Forms and am using SQLite-Net Extensions for my data. For the past two weeks my app has been crashing on List<Term> recievedTerms = conn.GetAllWithChildren<Term>(recursive: true);. I couldn’t figure out what was happening, until I finally found out that the code was only crashing if this property was present in Assessment:

 public string BackgroundColor
  {
      get { return IsComplete ? "#558f45" : "Gray"; }
      set { BackgroundColor = value; }
  }

I’ve been looking around for quite some time for answers to my issue and haven’t seen anything else like this, so I thought I ought to submit a bug report.

Also, it looks like the error that I’m getting that is causing the error (in logcat) is:

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xff6b7ffc

I’m not sure if that is relevant, but I thought I’d include it.

Also, included is a simplified test version of the same SQLite structure that I have in my app. If you comment out the above mentioned property in Assessment, the code won’t crash. If you leave it, it will crash.

Comments (3)

  1. Guillermo Gutiérrez

    Your setter is calling itself recursively. As soon as any piece of code tries to use it, it will enter an endless loop and crash. The setter itself has no meaning at all because the getter is not using any stored value anyway.

  2. Log in to comment