Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1686

Alloy: App crashes due to context used when accessing Ti.Database API


    • Story Points:
    • Sprint:
      2019 Sprint 10


      The current master is broken due to changes in the Obj-C JSCore interface (TIMOB-26038):

      [ERROR] Script Error {
      [ERROR]     column = 38;
      [ERROR]     line = 214;
      [ERROR]     message = "self type check failed for Objective-C instance method";
      [ERROR]     sourceURL = "file:///Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/B1994734-79D4-40DD-9003-C940456A903D/Lambus.app/alloy/sync/sql.js";
      [ERROR]     stack = "    at [native code]\n    at Sync(/alloy/sync/sql.js:214:38)\n    at sync(/alloy.js:92:22)\n    at fetch(/alloy/backbone.js:344:47)\n    at (/app.js:45:24)\n    at global code(/app.js:225:70)\n    at require@[native code]\n    at (/ti.main.js:8997:10)\n    at doLoad(/ti.main.js:8955:15)\n    at loadBootstrapScripts(/ti.main.js:8967:11)\n    at loadAsync(/ti.main.js:8972:23)\n    at global code(/ti.main.js:8994:10)";
      [ERROR]     toJSON = "<KrollCallback: 0x600000bfba40>";
      [ERROR] }

      Specifically, changes in Ti.Database seem to have caused this issues. It was triggered by Alloy models which use Backbone in the background which uses Ti.Database in the background.

      To reproduce, simply create a new Alloy app and create a model as documented in the docs. For the core-team: This is also reproducible in the app you guys have access to.

      EDIT: After investigating this, it seems like this selector is causing the issues as it's referenced in the sql.js to get the field from the result-set at the specified index.


          Issue Links



              • Assignee:
                cwilliams Christopher Williams
                hknoechel Hans Knöchel
                Ewan Harris
              • Watchers:
                7 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration