You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application is crashing due to EXC_BAD_ACCESS exception when trying to use transaction.executeSql in loop (10 iterations). This is only happen for iOS 10 and above. Android build is working fine.
Application code:
instance.transaction(function (tx) {
for (var i = 0; i < sqls.length; i++) {
lastSql = sqls[i];
lastParam = params[i];
if (i == sqls.length - 1) {
tx.executeSql(sqls[i], params[i], callback, errorRollBack);
} else {
tx.executeSql(sqls[i], params[i], function () {}, errorRollBack);
}
}
}, function (e) {
callback(e);
});
I tried all the test code as suggested and documented here and all of them are working as expected.
After spending a long night with this issue, finally I got the exact problem. The issue is related to maximum number of terms one can use in select statement (SQLITE_MAX_COMPOUND_SELECT). My application was trying to insert more than 500 of records using UNION SELECT in on go.
The exact issue was
too many terms in compound SELECT
For solution I batched my insert operation in smaller chuck.
Reopening as a bug, plugin should report an error rather than crashing in case of this kind of input.
Also marking as an enhancement, I can imagine people may want to add more than 500 rows at a time. No promise when I will get a chance to deliver this enhancement.
My application is crashing due to EXC_BAD_ACCESS exception when trying to use transaction.executeSql in loop (10 iterations). This is only happen for iOS 10 and above. Android build is working fine.
Application code:
I tried all the test code as suggested and documented here and all of them are working as expected.
Environment:
[email protected]
[email protected]
[email protected]
[email protected]
Please see below
Please let me know if this need further information.
The text was updated successfully, but these errors were encountered: