{ "id": "63675", "key": "TIMOB-3043", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-10-27T18:31:05.000+0000", "created": "2011-04-15T03:35:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "13667", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "82068", "key": "TIMOB-5892", "fields": { "summary": "iOS: needs to handle thrown exceptions (revisiting)", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:48:16.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

This is essentially the same as the below misfiled issue (which\nappears to never have been refiled):

\n

\nhttps://appcelerator.lighthouseapp.com/projects/25719/tickets/456-b...

\n

Basically, SQLLite exceptions shouldn't result in the app\ncrashing - expecially ones like this one which are ones which are\nlikely to happen commonly due to data entry issues. It would be\nbetter to hand back some sort of result object that would tell you\nyour success or failure status, and on failure the reason\nreturned.

\n

Actually, even on SQL queries that succeed you should generally\nreturn a success code - right now they return undefined on success,\nwhich is somewhat ambiguous.

\n

Note that this is on Titanium Mobile 1.5.1, not sure if there\nare any changes in 1.6.0.

\n

Thanks!

\n\n

2011-02-03 11:36:14.824 Penguine[73582:5c03] [ERROR] Error occurred calling next on a\nPLSqliteResultSet. SQLite error: 'constraint failed' for 'INSERT\nINTO mh_blob_metadata (id, type, update_time_ms, filename_uuid)\nVALUES (?, ?, ?, ?)'
\n[ERROR] The application has crashed with an\nunhandled exception. Stack trace: 0 CoreFoundation 0x0225bbcc\nexceptionPreprocess + 156
\n1 libobjc.A.dylib 0x023b05c2 objc_exception_throw + 47
\n2 CoreFoundation 0x02214628 +[NSException raise:format:arguments:]\n+ 136
\n3 CoreFoundation 0x0221459a +[NSException raise:format:] + 58
\n4 Penguine 0x00035939 -[PLSqliteResultSet next] + 294
\n5 Penguine 0x000c6f4d -[TiDatabaseProxy execute:] + 638
\n6 CoreFoundation 0x021cc67d
invoking + 29
\n7 CoreFoundation 0x021cc551 -[NSInvocation invoke] + 145
\n8 Penguine 0x00044b69 -[KrollMethod call:] + 2092
\n9 Penguine 0x00043f1b KrollCallAsFunction + 327
\n10 Penguine 0x00286968
\nZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE\n+ 552
\n11 Penguine 0x0024a838 cti_op_call_NotTiFunction + 632
\n12 ??? 0x0c41c402 0x0 + 205636610
\n13 Penguine 0x001f9fab\nZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE\n+ 971
\n14 Penguine 0x0026620f
\nZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE\n+ 127
\n15 Penguine 0x001a9e39\n_ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE\n+ 57
\n16 Penguine 0x00282ce4 TiObjectCallAsFunction + 612
\n17 Penguine 0x0003ebdb -[KrollCallback call:thisObject:] + 784
\n18 Penguine 0x0003fdf2 -[KrollEvent invoke:] + 92
\n19 Penguine 0x0003f483 -[KrollContext invoke:] + 43
\n20 Penguine 0x00040ca0 -[KrollContext main] + 3216
\n21 Foundation 0x005f5d4c -[NSThread main] + 81
\n22 Foundation 0x005f5cd8
NSThreadmain +\n1387
\n23 libSystem.B.dylib 0x96f6785d pthread_start + 345
\n24 libSystem.B.dylib 0x96f676e2 thread_start + 34
\n2011-02-03 11:36:14.828 Penguine[73582:5c03]\nTerminating app due to uncaught exception\n'PLSqliteException', reason: 'Error occurred calling next on a\nPLSqliteResultSet. SQLite error: 'constraint failed' for 'INSERT\nINTO mh_blob_metadata (id, type, update_time_ms, filename_uuid)\nVALUES (?, ?, ?, ?)''
Call stack at first throw:\n( 0 CoreFoundation 0x0225bbe9 exceptionPreprocess + 185
\n1 libobjc.A.dylib 0x023b05c2 objc_exception_throw + 47
\n2 CoreFoundation 0x02214628 +[NSException raise:format:arguments:]\n+ 136
\n3 CoreFoundation 0x0221459a +[NSException raise:format:] + 58
\n4 Penguine 0x00035939 -[PLSqliteResultSet next] + 294
\n5 Penguine 0x000c6f4d -[TiDatabaseProxy execute:] + 638
\n6 CoreFoundation 0x021cc67d
invoking
+ 29
\n7 CoreFoundation 0x021cc551 -[NSInvocation invoke] + 145
\n8 Penguine 0x00044b69 -[KrollMethod call:] + 2092
\n9 Penguine 0x00043f1b KrollCallAsFunction + 327
\n10 Penguine 0x00286968\nZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE\n+ 552
\n11 Penguine 0x0024a838 cti_op_call_NotTiFunction + 632
\n12 ??? 0x0c41c402 0x0 + 205636610
\n13 Penguine 0x001f9fab
\nZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE\n+ 971
\n14 Penguine 0x0026620f\nZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE\n+ 127
\n15 Penguine 0x001a9e39
\nZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE\n+ 57
\n16 Penguine 0x00282ce4 TiObjectCallAsFunction + 612
\n17 Penguine 0x0003ebdb -[KrollCallback call:thisObject:] + 784
\n18 Penguine 0x0003fdf2 -[KrollEvent invoke:] + 92
\n19 Penguine 0x0003f483 -[KrollContext invoke:] + 43
\n20 Penguine 0x00040ca0 -[KrollContext main] + 3216
\n21 Foundation 0x005f5d4c -[NSThread main] + 81
\n22 Foundation 0x005f5cd8
NSThreadmain +\n1387
\n23 libSystem.B.dylib 0x96f6785d _pthread_start + 345
\n24 libSystem.B.dylib 0x96f676e2 thread_start + 34
\n) terminate called after throwing an instance of 'NSException'
\n[DEBUG] Session did end with error\n(null)

{html}", "attachment": [], "flagged": false, "summary": "Titanium Mobile crashes on PLSqlLiteException", "creator": { "name": "douglassoo", "key": "douglassoo", "displayName": "Douglas Soo", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "douglassoo", "key": "douglassoo", "displayName": "Douglas Soo", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "410840", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:48:16.000+0000", "updated": "2017-03-09T22:48:16.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }