Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18478] Android: android lib - Log cat bug causing some logs to disappear

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-02-27T03:36:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0
ComponentsAndroid
Labelsn/a
ReporterAshraf Abu
AssigneeAshraf Abu
Created2015-01-30T06:32:03.000+0000
Updated2017-03-21T18:42:22.000+0000

Description

This bug causes some parts of the lines to vanish after the stream is split due to the buffer. Example would be in this scenario: Data callback 1:
I/TiAPI   ( 2856):  !TEST_RESULTS_START!
I/TiAPI   ( 2856): {
I/TiAPI   ( 2856):  "date": "2015-01-23T08:04:59.765Z",
I/TiAPI   ( 2856):  "results": [
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 1040,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testAPI"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 9660,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testLength"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 98065,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testAppend"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 58124,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testInsert"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 9049,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testInsertBlogExample"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 64461,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testCopy"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "failed",
I/TiAPI   ( 2856):          "duration": 3481,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testClone",
I/TiAPI   ( 2856):          "error": {
I/TiAPI   ( 2856):              "name": "AssertionError",
I/TiAPI   ( 2856):              "actual": {
I/TiAPI   ( 2856):                  "length": 20,
I/TiAPI   ( 2856):                  "bubbleParent": true,
I/TiAPI   ( 2856):                  "apiName": "Ti.Buffer"
I/TiAPI   ( 2856):              },
I/TiAPI   ( 2856):              "expected": {
I/TiAPI   ( 2856):                  "length": 20,
I/TiAPI   ( 2856):                  "bubbleParent": true,
I/TiAPI   ( 2856):                  "byteOrder": 1,
I/TiAPI   ( 2856):                  "apiName": "Ti.Buffer"
I/TiAPI   ( 2856):              },
I/TiAPI   ( 2856):              "operator": "to equal",
I/TiAPI   ( 2856):              "message": "expected { _hasJavaListener: undefined,\n length: 20,\n bubbleParent: true,\n byteOrder: undefined,\n type: undefined,\n value: undefined,\n apiName: 'Ti.Buffer' } to equal { _hasJavaListener: undefined,\n length: 20,\n bubbleParent: true,\n byteOrder: 1,\n type: undefined,\n value: undefined,\n apiName: 'Ti.Buffer' }",
I/TiAPI   ( 2856):              "generatedMessage": true,
I/TiAPI   ( 2856):              "showDiff": true
I/TiAPI   ( 2856):          }
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 92516,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testFill"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 1110,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testClear"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 528,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testRelease"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 18048,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testToStringAndBlob"
I/TiAPI   ( 2856):      },
I/TiAPI   ( 2856):      {
I/TiAPI   ( 2856):          "state": "passed",
I/TiAPI   ( 2856):          "duration": 1223,
I/TiAPI   ( 2856):          "suite": "buffer",
I/TiAPI   ( 2856):          "title": "testAutoEncode"
I/TiAPI   ( 2856):      }
I/TiAPI   ( 2856):  ],
I/TiAPI   ( 2856):  "platform": {
I/TiAPI   ( 2856):      "ostype": "32bit",
I/TiAPI   ( 2856):      "name": "android",
I/TiAPI   ( 2856):      "osname": "android",
I/TiAPI   ( 2856):      "version": "4.4.4",
I/TiAPI   ( 2856):      "ad
Data callback 2
dress": "10.0.3.15",
I/TiAPI   ( 2856):      "macaddress": "08:00:27:e5:f1:d0",
I/TiAPI   ( 2856):      "architecture": "Unknown",
I/TiAPI   ( 2856):      "availableMemory": 415984,
I/TiAPI   ( 2856):      "manufacturer": "Genymotion",
I/TiAPI   ( 2856):      "model": "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920"
I/TiAPI   ( 2856):  },
I/TiAPI   ( 2856):  "displayCaps": {
I/TiAPI   ( 2856):      "density": "xxhigh",
I/TiAPI   ( 2856):      "dpi": 480,
I/TiAPI   ( 2856):      "platformHeight": 1776,
I/TiAPI   ( 2856):      "platformWidth": 1080,
I/TiAPI   ( 2856):      "xdpi": 480,
I/TiAPI   ( 2856):      "ydpi": 480
I/TiAPI   ( 2856):  },
I/TiAPI   ( 2856):  "build": {
I/TiAPI   ( 2856):      "date": "2015/01/12 15:33",
I/TiAPI   ( 2856):      "git": "0014f83",
I/TiAPI   ( 2856):      "version": "3.5.0"
I/TiAPI   ( 2856):  }
I/TiAPI   ( 2856): }
I/TiAPI   ( 2856): !TEST_RESULTS_STOP!
The last part of the address, dress": "10.0.3.15", would cause the original code to return, hence that part is not sent out to the logger at all. This causes the json to be incomplete and causing errors.

Comments

  1. Ashraf Abu 2015-01-30

    Currently in progress. Not completed yet. PR to monitor progress: https://github.com/appcelerator/androidlib/pull/4
  2. Ashraf Abu 2015-02-27

    Merged
  3. Lee Morris 2017-03-21

    Closing ticket as fixed.

JSON Source