[TIMOB-25487] Android: Prevent kroll from removing null proxy object pointer
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-11-08T01:14:22.000+0000 |
| Affected Version/s | Release 7.0.0 |
| Fix Version/s | Release 7.0.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Gary Mathews |
| Assignee | Gary Mathews |
| Created | 2017-11-07T21:48:08.000+0000 |
| Updated | 2017-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();
master: https://github.com/appcelerator/titanium_mobile/pull/9587
Verified the fix in SDK 7.0.0.v20171115153702. Closing.