Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9585] Android: Emulator: Map.Annotation.leftButton: missing image resource crashes app on launch

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-18T14:20:59.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.0, Release 2.0.1
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi, parity, qe-and060112
ReporterDustin Hyde
Assigneejithinpv
Created2012-06-15T16:00:18.000+0000
Updated2017-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

FileDateSize
ddms log.txt2012-06-15T16:00:18.000+000021101

Comments

  1. jithinpv 2013-03-18

    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
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced.

JSON Source