[TIMOB-9585] Android: Emulator: Map.Annotation.leftButton: missing image resource crashes app on launch
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2013-03-18T14:20:59.000+0000 |
| Affected Version/s | Release 2.0.2, Release 2.1.0, Release 2.0.1 |
| Fix Version/s | Release 3.0.2 |
| Components | Android |
| Labels | api, parity, qe-and060112 |
| Reporter | Dustin Hyde |
| Assignee | jithinpv |
| Created | 2012-06-15T16:00:18.000+0000 |
| Updated | 2017-03-21T21:24:43.000+0000 |
Description
If Map.Annotation.leftButton image resource does not exist, app will force close/crash on launch when run on emulator.
This is not a regression.
This does not occur on Android devices.
This does not occur in the iOS Simulator.
Steps to Reproduce:
1. Run code:
var win = Ti.UI.createWindow({
backgroundColor: 'black',
layout:'vertical'
});
var b = Ti.UI.createButton({
title: "change annotation"
});
b.addEventListener('click', function() {
alert("click! annotation.title = " + mountainView.title);
mountainView.title = "Found it!";
mountainView.subtitle = "Works!";
});
win.add(b);
var mountainView = Titanium.Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:Titanium.Map.ANNOTATION_RED,
animate:true,
leftButton: '../images/appcelerator_small.png',
myid:1
});
var mapview = Ti.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:37.390749, longitude:-122.081651,
latitudeDelta:0.01, longitudeDelta:0.01},
annotations: [mountainView]
});
win.add(mapview);
win.open();
Actual Result:
Force Close dialog/crash.
Expected Result:
The app should load. A window should open. There should be a vertical layout with a button on the top and a map on the bottom.
Attachments
| File | Date | Size |
|---|---|---|
| ddms log.txt | 2012-06-15T16:00:18.000+0000 | 21101 |
Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 jithinpv
Closing ticket as the issue cannot be reproduced.