Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12334] iOS: Code line number for an exception is different between device and simulator

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-20T20:45:55.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0, Release 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterEduardo Gomez
AssigneeEric Merriman
Created2013-01-18T09:00:54.000+0000
Updated2017-06-20T20:45:55.000+0000

Description

Problem

When application is launched on device, code line exception is not correctly catch.

Actual results

On Simulator shows the exact code line. On device always shows "line 1"

Expected results

Get same code line number thrown for a given exception

Tested on

iOS 6 simulator & iPhone 4 w/ 6.0.1

Test case

var win1 = Titanium.UI.createWindow({

	title : 'Window 1',
	backgroundColor : '#fff'
});

var label1 = Titanium.UI.createLabel({
	color : '#000',
	text : 'Click me to open',
	font : {
		fontSize : 20,
		fontFamily : 'Helvetica Neue'
	},
	textAlign : 'center',
	width : 'auto',
});

win1.add(label1);
win1.open();
var win2 = Titanium.UI.createWindow({
	title : 'Window 1',
	backgroundColor : '#000'
});

var label2 = Titanium.UI.createLabel({
	color : '#fff',
	text : 'Click me to close',
	font : {
		fontSize : 20,
		fontFamily : 'Helvetica Neue'
	},
	textAlign : 'center',
	width : 'auto',
});

win2.add(label2);
label1.addEventListener('click', function(e) {
	win2.open({
		transition : Titanium.UI.iPhone.AnimationStyle.CURL_UP
	});
});

label2.addEventListener('click', function(e) {
	win2.close({
		transition : Titanium.UI.iPhone.AnimationStyle.CURL_DOWN
	});
	//win2.close();
});

// Getting an NULL exception ...
var initdb = null;
var tmp = initdb.execute("delete from visit;");

Attachments

FileDateSize
iOS_Device_Test.jpg2013-01-18T09:00:54.000+00001139350
iOS_Simulator_Test.jpg2013-01-18T09:00:54.000+000076021

Comments

  1. Lee Morris 2017-06-20

    I am unable to reproduce this issue with the following environment; iPhone 7 and Simulator (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source