Titanium JIRA Archive
Appcelerator Community (AC)

[AC-907] Map SIGSEGV when removing it from the window

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-08-26T04:50:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsandroid, map, module
ReporterAlejandro Vera
AssigneeMauro Parra-Miranda
Created2014-07-16T10:56:55.000+0000
Updated2016-03-08T07:37:12.000+0000

Description

This simple code always crashes.
var window = Ti.UI.createWindow();
	var map = Map.createView({
		top:0,
        	left:0,
        	width: "100%",
		height: "100%"
	});
	
	window.add(map);
	window.open();
	
	setTimeout(function(){
		Ti.API.info("Removing map");
		window.remove(map);
	}, 15000);

Attachments

FileDateSize
avd_details.png2014-07-16T10:56:55.000+000040209
log.txt2014-07-16T10:56:55.000+000015724

Comments

  1. Motiur Rahman 2014-07-19

    Hi, I have tested this issue. It’s not a bug.Its working good without any crashes.

    Testing Environment:

    Titanium SDK: 3.2.3.GA, 3.3.0.RC Titanium CLI: 3.3.0 Android SDK: 4.2.2,4.4.2, OS X Version: 10.9.3, Appcelerator Studio: 3.2.3

    Steps to Test:

    1.Create a Classic project. 2.Paste this code in app.js file. 3. Add map module in tiapp.xml file. 4.Configure your tiapp.xml file with Google API key. 5.Run this code with testing environment.

    Test Case

       var window = Ti.UI.createWindow({
       	backgroundColor : 'red',
       	layout : 'vertical'
       });
       
       // Create a Button.
       var add = Ti.UI.createButton({
       	title : 'Add',
       	height : Ti.UI.SIZE,
       	width : Ti.UI.SIZE,
       	top : 20,
       	left : 20
       });
       
       // Listen for click events.
       add.addEventListener('click', function() {
       	window.add(map);
       });
       window.add(add);
       
       // Create a Button.
       var remove = Ti.UI.createButton({
       	title : 'Remove',
       	height : Ti.UI.SIZE,
       	width : Ti.UI.SIZE,
       	top : 20,
       	left : 20
       });
       
       // Listen for click events.
       remove.addEventListener('click', function() {
       	window.remove(map);
       });
       
       // Add to the parent view.
       window.add(remove);
       
       var MapModule = require('ti.map');
       var map = MapModule.createView({
       	top : 0,
       	left : 0,
       	width : "100%",
       	height : "100%"
       });
       
       window.open();
       
       
    For more details:[http://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android] Thanks.
  2. Mauro Parra-Miranda 2014-08-10

    Hello [~xafilox]! Do you mind to take a look into the code sample and let us know if your device is SIGSEGV with it? TIA!
  3. Mauro Parra-Miranda 2014-08-26

    Please check our testcase. Will reopen if the reporter can provide a testcase that reproduces the issue.

JSON Source