Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25598] Windows: Error logs are not produced on app crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-03-07T00:39:32.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.1.0
ComponentsWindows
Labelsn/a
ReporterMostafizur Rahman
AssigneeKota Iguchi
Created2017-12-11T20:46:26.000+0000
Updated2018-03-07T00:39:38.000+0000

Description

Hello, We are having issues in being able to debug crashes when trying to access undefined element in an object. *Test Code:* index.xml
<Alloy>
	<Window class="container">
		<Label id="label" onClick="doClick">Hello, World</Label>
	</Window>
</Alloy>
index.js
var helper = require('helper.js');
var testObject = {
  first: {
    name: 'test',
    city: 'PA',
    distance: 2
  }
};

function doClick(e) {
  helper.getData(function(_data) {
    // console.log('distance:', _data.secondObject.distance);
		$.label.text = _data.secondObject.distance;
  });

}

$.index.open();
lib/helper.js
exports.getData = function(_callback) {
  _callback({
    first: {
      name: 'test',
      city: 'PA',
      distance: 2
    }
  });
};
Steps to reproduce. 1. Run the attached project using above code. 2. Click on Hello, World. 3. The error will be displayed in the console. The error message just says "*[ERROR] In undefined: undefined, undefined*" instead of specifying where exactly the error is. In this situation, the error object is showed in the error screen displayed in the app. But, in some scenarios when this happens during a complex operation, app crashes. When that happens, it is really hard to figure out where exactly the issue is. That way, even if the app crashes, we can see the error in the console to be able to fix it. Thanks

Attachments

FileDateSize
Info_log.txt2017-12-11T20:44:27.000+00009177

Comments

  1. Kota Iguchi 2017-12-12

    https://github.com/appcelerator/titanium_mobile_windows/pull/1167
  2. Samir Mohammed 2018-03-02

    Closing ticket; Verified fix in SDK Version: 7.1.0.v20180228160738 and SDK Version: 7.2.0.v20180301101144.
  3. Kota Iguchi 2018-03-07

    Reopening - just wanted to update ticket title for better description.

JSON Source