[TIMOB-20577] Windows: App crashes when calling fetch() on any collection that has data
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-03-22T13:59:39.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 5.2.1, Alloy 1.8.1 |
Components | Windows |
Labels | supportTeam |
Reporter | Joe Finnigan |
Assignee | Gary Mathews |
Created | 2016-03-09T16:54:52.000+0000 |
Updated | 2019-05-15T14:09:57.000+0000 |
Description
Creating a collection, and calling fetch if it is emtpy doesn't crash. Create 1 model and save it, then re-fetch the collection the app crashes in the emulator. This is a pretty serious issue if you can't fetch any data?!
Not sure what version this dates back to as we're new to windows dev in Titanium. We're adding windows support to longstanding iOS/Android Ti apps.
Index.js:
var library = Alloy.createCollection("userForms");
library.fetch();
var user = Alloy.createModel('userForms', {
Name: "Hello world"
});
user.save();
library.fetch();
$.index.open();
Model:
config: {
columns: {
"Name": "TEXT"
},
adapter: {
type: "sql",
collection_name: "userForms"
}
}
[~joef][~nsalahin] This may be fixed by our fix to TIMOB-20222. Can you try this out on a 5.3.0 build of the SDK? You can get a 5.3.0 build by doing:
Then you'll need to update your project's tiapp.xml to use it.
I've tried it with Ti SDK: 5.3.0.v20160315093329 And it still crashes, getting an error message now that wasn't previously displayed in the console: {panel:title=ConsoleLog} [ERROR] : The remote procedure call failed. [ERROR] : Error: The remote procedure call failed. at ChildProcess.
PR: https://github.com/appcelerator/alloy/pull/771
Fix was in Alloy itself, so updating to Alloy 1.8.1 should fix the issue for the user.
Verified using: Windows 10 Pro Appc NPM: 4.2.4-2 Appc Core: 5.2.1-20 Titanium SDK: 5.2.1.v20160318225121 Alloy: 1.8.1 Using the code provided in the description, the app no longer crashes when calling fetch. Closing ticket