Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-3043

Titanium Mobile crashes on PLSqlLiteException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
      None

      Description

      {html}<div><p>This is essentially the same as the below misfiled issue (which
      appears to never have been refiled):</p>
      <p><a href=
      "https://appcelerator.lighthouseapp.com/projects/25719/tickets/456-better-exception-handling-for-tidatabasedbexecute">
      https://appcelerator.lighthouseapp.com/projects/25719/tickets/456-b...</a></p>
      <p>Basically, SQLLite exceptions shouldn't result in the app
      crashing - expecially ones like this one which are ones which are
      likely to happen commonly due to data entry issues. It would be
      better to hand back some sort of result object that would tell you
      your success or failure status, and on failure the reason
      returned.</p>
      <p>Actually, even on SQL queries that succeed you should generally
      return a success code - right now they return undefined on success,
      which is somewhat ambiguous.</p>
      <p>Note that this is on Titanium Mobile 1.5.1, not sure if there
      are any changes in 1.6.0.</p>
      <p>Thanks!</p>
      <ul>
      <li>Doug</li>
      </ul>
      <p>2011-02-03 11:36:14.824 Penguine[73582:5c03] <a href=
      "/projects/32238/changesets/ERROR" title=
      "Changeset [ERROR]">[ERROR]</a> Error occurred calling next on a
      PLSqliteResultSet. SQLite error: 'constraint failed' for 'INSERT
      INTO mh_blob_metadata (id, type, update_time_ms, filename_uuid)
      VALUES (?, ?, ?, ?)'<br>
      <a href="/projects/32238/changesets/ERROR" title=
      "Changeset [ERROR]">[ERROR]</a> The application has crashed with an
      unhandled exception. Stack trace: 0 CoreFoundation 0x0225bbcc
      <strong>exceptionPreprocess + 156<br>
      1 libobjc.A.dylib 0x023b05c2 objc_exception_throw + 47<br>
      2 CoreFoundation 0x02214628 +[NSException raise:format:arguments:]
      + 136<br>
      3 CoreFoundation 0x0221459a +[NSException raise:format:] + 58<br>
      4 Penguine 0x00035939 -[PLSqliteResultSet next] + 294<br>
      5 Penguine 0x000c6f4d -[TiDatabaseProxy execute:] + 638<br>
      6 CoreFoundation 0x021cc67d</strong> invoking <strong><em>+ 29<br>
      7 CoreFoundation 0x021cc551 -[NSInvocation invoke] + 145<br>
      8 Penguine 0x00044b69 -[KrollMethod call:] + 2092<br>
      9 Penguine 0x00043f1b KrollCallAsFunction + 327<br>
      10 Penguine 0x00286968</em>
      ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE
      + 552<br>
      11 Penguine 0x0024a838 cti_op_call_NotTiFunction + 632<br>
      12 ??? 0x0c41c402 0x0 + 205636610<br>
      13 Penguine 0x001f9fab
      <em>ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE
      + 971<br>
      14 Penguine 0x0026620f</em>
      ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE
      + 127<br>
      15 Penguine 0x001a9e39
      _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
      + 57<br>
      16 Penguine 0x00282ce4 TiObjectCallAsFunction + 612<br>
      17 Penguine 0x0003ebdb -[KrollCallback call:thisObject:] + 784<br>
      18 Penguine 0x0003fdf2 -[KrollEvent invoke:] + 92<br>
      19 Penguine 0x0003f483 -[KrollContext invoke:] + 43<br>
      20 Penguine 0x00040ca0 -[KrollContext main] + 3216<br>
      21 Foundation 0x005f5d4c -[NSThread main] + 81<br>
      22 Foundation 0x005f5cd8</strong> NSThread<strong>main</strong> +
      1387<br>
      23 libSystem.B.dylib 0x96f6785d <em>pthread_start + 345<br>
      24 libSystem.B.dylib 0x96f676e2 thread_start + 34<br>
      2011-02-03 11:36:14.828 Penguine[73582:5c03]
      <strong><em>Terminating app due to uncaught exception
      'PLSqliteException', reason: 'Error occurred calling next on a
      PLSqliteResultSet. SQLite error: 'constraint failed' for 'INSERT
      INTO mh_blob_metadata (id, type, update_time_ms, filename_uuid)
      VALUES (?, ?, ?, ?)''<br></em></strong> Call stack at first throw:
      ( 0 CoreFoundation 0x0225bbe9 <strong>exceptionPreprocess + 185<br>
      1 libobjc.A.dylib 0x023b05c2 objc_exception_throw + 47<br>
      2 CoreFoundation 0x02214628 +[NSException raise:format:arguments:]
      + 136<br>
      3 CoreFoundation 0x0221459a +[NSException raise:format:] + 58<br>
      4 Penguine 0x00035939 -[PLSqliteResultSet next] + 294<br>
      5 Penguine 0x000c6f4d -[TiDatabaseProxy execute:] + 638<br>
      6 CoreFoundation 0x021cc67d</strong> invoking</em> <strong>+ 29<br>
      7 CoreFoundation 0x021cc551 -[NSInvocation invoke] + 145<br>
      8 Penguine 0x00044b69 -[KrollMethod call:] + 2092<br>
      9 Penguine 0x00043f1b KrollCallAsFunction + 327<br>
      10 Penguine 0x00286968
      <em>ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE
      + 552<br>
      11 Penguine 0x0024a838 cti_op_call_NotTiFunction + 632<br>
      12 ??? 0x0c41c402 0x0 + 205636610<br>
      13 Penguine 0x001f9fab</em>
      ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE
      + 971<br>
      14 Penguine 0x0026620f
      <em>ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE
      + 127<br>
      15 Penguine 0x001a9e39</em>
      ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
      + 57<br>
      16 Penguine 0x00282ce4 TiObjectCallAsFunction + 612<br>
      17 Penguine 0x0003ebdb -[KrollCallback call:thisObject:] + 784<br>
      18 Penguine 0x0003fdf2 -[KrollEvent invoke:] + 92<br>
      19 Penguine 0x0003f483 -[KrollContext invoke:] + 43<br>
      20 Penguine 0x00040ca0 -[KrollContext main] + 3216<br>
      21 Foundation 0x005f5d4c -[NSThread main] + 81<br>
      22 Foundation 0x005f5cd8</strong> NSThread<strong>main</strong> +
      1387<br>
      23 libSystem.B.dylib 0x96f6785d _pthread_start + 345<br>
      24 libSystem.B.dylib 0x96f676e2 thread_start + 34<br>
      ) terminate called after throwing an instance of 'NSException'<br>
      <a href="/projects/32238/changesets/DEBUG" title=
      "Changeset [DEBUG]">[DEBUG]</a> Session did end with error
      (null)</p></div>{html}

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                blainhamon Blain Hamon
                Reporter:
                douglassoo Douglas Soo
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-2638
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration