Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4887] Android: Integrity scout crashes when attempting to create/open window with URL: nativePath

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-07-10T22:22:50.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sn/a
ComponentsAndroid
Labelsintegrity, scout
ReporterEric Merriman
AssigneeIngo Muschenetz
Created2011-08-03T17:49:51.000+0000
Updated2017-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

FileDateSize
logcat.txt2011-08-03T17:49:51.000+00006115

Comments

  1. Lee Morris 2017-07-10

    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.

JSON Source