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

Windows: Ti.Database.ResultSet fieldName() function crashes app

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 5.1.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Windows Phone Emulator 8.1
      Ti SDK: 5.1.0.v20151026164636

    • Story Points:
      5
    • Sprint:
      2015 Sprint 22 SDK

      Description

      Run the code below in the Windows Emulator.

      var booksDB = Ti.Database.open('booksDB');
      booksDB.execute('CREATE TABLE IF NOT EXISTS books(id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, author TEXT)');
      booksDB.execute('REPLACE INTO books (title,author) VALUES (?,?)', ('Great Expectations', 'Charles Dickens'));
      var result = booksDB.execute('SELECT * FROM books');
      Ti.API.info('=== RESULT ===');
      Ti.API.info(result.fieldCount);
      for (var i = 0, j = result.fieldCount; i < j; i++) {
        Ti.API.info(result.fieldName(i));
      }
      Ti.API.info('==============');
      result.close();
      booksDB.close();
      

      RESULTS:

      [INFO]  Installing and launching the application
      [INFO]  Project built successfully in 25s 336ms
       
      [INFO]  Connected to app
      -- Start application log -----------------------------------------------------
      [INFO]  === RESULT ===
      [INFO]  3
      [INFO]  Disconnected from app
      -- End application log -------------------------------------------------------
       
      [ERROR] The remote procedure call failed.
      [ERROR] Error: The remote procedure call failed.
          at ChildProcess.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\5.1.0.v20151026164636\node_modules\windowslib\lib\emulator.js:287:15)
          at ChildProcess.emit (events.js:110:17)
          at maybeClose (child_process.js:1008:16)
          at Socket.<anonymous> (child_process.js:1176:11)
          at Socket.emit (events.js:107:17)
          at Pipe.close (net.js:476:12)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                fmiao Feon Sua Xin Miao
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration