Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25487] Android: Prevent kroll from removing null proxy object pointer

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-11-08T01:14:22.000+0000
Affected Version/sRelease 7.0.0
Fix Version/sRelease 7.0.0
ComponentsAndroid
Labelsn/a
ReporterGary Mathews
AssigneeGary Mathews
Created2017-11-07T21:48:08.000+0000
Updated2017-11-16T00:57:32.000+0000

Description

- Prevent null pointer dereference when removing proxy pointer *TEST CASE* - View map and navigate back repeatedly until crash
var MapModule = require('ti.map'),
    win = Titanium.UI.createWindow({backgroundColor: 'gray'}),
    btn = Ti.UI.createButton({title: 'VIEW MAP'});
    
function viewMap () {
    var win = Ti.UI.createWindow({backgroundColor: 'gray'}),
        mapView = MapModule.createView({
            userLocation: true,
            mapType: MapModule.NORMAL_TYPE,
            animate: true,
            region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }
        });
    win.add(mapView);
    win.open();
}

btn.addEventListener('click', function (e) {
	if (Ti.Geolocation.hasLocationPermissions()) {
        viewMap();
    } else {
        Ti.Geolocation.requestLocationPermissions(function (e) {
            if (e.success === true) {
                viewMap();
            } else {
                alert('permissions denied: ' + e.error);
            }
        });
	}
});

win.add(btn);
win.open();

Comments

  1. Gary Mathews 2017-11-07

    master: https://github.com/appcelerator/titanium_mobile/pull/9587
  2. Lokesh Choudhary 2017-11-16

    Verified the fix in SDK 7.0.0.v20171115153702. Closing.

JSON Source