[TIMOB-4887] Android: Integrity scout crashes when attempting to create/open window with URL: nativePath
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-07-10T22:22:50.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | Android |
Labels | integrity, scout |
Reporter | Eric Merriman |
Assignee | Ingo Muschenetz |
Created | 2011-08-03T17:49:51.000+0000 |
Updated | 2017-07-10T22:22:50.000+0000 |
Description
Description:
While evaluating some techniques for porting existing test cases into integrity, Vasyl on the Integrity team gave us some code to illustrate a simple form of the method the integrity harness uses to open .js files. This code works on iOS devices and the iOS simulator, but crashes when run on Android device/emulator. The crash occurs when clicking the button to open a new window:
var win = Ti.UI.createWindow({backgroundColor: '#fff'});
// Place a .js file into applicationDataDirectory
var file = Titanium.Filesystem.getFile(
Titanium.Filesystem.applicationDataDirectory,
'script.js'
);
file.write("Ti.UI.currentWindow.add(\
Ti.UI.createLabel({\
text:'Some text',\
top: 100,\
left: 50,\
width: 100,\
height:50\
})\
);");
var btn = Titanium.UI.createButton({
title: 'Next test',
width: 100,
height: 40,
left: 50
});
btn.addEventListener('click', function() {
// Open window with new context
Ti.UI.createWindow({
url: file.nativePath
}).open();
});
win.add(btn);
win.open();
Steps to Reproduce:
1) Create a new mobile project with 1.7.2 release
2) Paste code above into app.js
3) Run in emulator or run on device
4) Click the "Next Test" button
Result:
The application crashes. See log for details.
Expected result:
The text "Some text" appears.
Notes: Does not occur on iOS
Attachments
File | Date | Size |
logcat.txt | 2011-08-03T17:49:51.000+0000 | 6115 |
Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.