[TIMOB-25598] Windows: Error logs are not produced on app crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-03-07T00:39:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Mostafizur Rahman |
Assignee | Kota Iguchi |
Created | 2017-12-11T20:46:26.000+0000 |
Updated | 2018-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
File | Date | Size |
---|---|---|
Info_log.txt | 2017-12-11T20:44:27.000+0000 | 9177 |
https://github.com/appcelerator/titanium_mobile_windows/pull/1167
Closing ticket; Verified fix in SDK Version: 7.1.0.v20180228160738 and SDK Version: 7.2.0.v20180301101144.
Reopening - just wanted to update ticket title for better description.