{ "id": "114980", "key": "TIMOB-14155", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15498", "description": "2013 Sprint 12 API", "name": "2013 Sprint 12 API", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15110", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-09T23:24:13.000+0000", "created": "2013-05-27T11:59:18.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_map", "qe-3.1.1", "qe-testadded", "regression", "triage" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-06-10T09:51:59.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem*\r\nWhen trying to show a MapView with region and annotations in SDK 3.1.1 I get this error:\r\n\r\n*Log*\r\n{code}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] : Reason:\r\n[ERROR] : Invalid Region \r\n[ERROR] : Stack trace:\r\n[ERROR] : 0 CoreFoundation 0x038fa012 __exceptionPreprocess + 178\r\n[ERROR] : 1 libobjc.A.dylib 0x033bbe7e objc_exception_throw + 44\r\n[ERROR] : 2 CoreFoundation 0x03982fb1 -[NSException raise] + 17\r\n[ERROR] : 3 MapKit 0x023aa78d -[MKMapView setRegion:animated:] + 709\r\n[ERROR] : 4 ligneE 0x0011e44b -[TiMapView render] + 891\r\n[ERROR] : 5 ligneE 0x0011ed36 -[TiMapView frameSizeChanged:bounds:] + 294\r\n[ERROR] : 6 ligneE 0x00099a46 -[TiUIView checkBounds] + 806\r\n[ERROR] : 7 ligneE 0x00099b47 -[TiUIView setBounds:] + 119\r\n[ERROR] : 8 ligneE 0x0011ebf5 -[TiMapView setBounds:] + 453\r\n[ERROR] : 9 ligneE 0x0007cbd0 -[TiViewProxy relayout] + 2016\r\n[ERROR] : 10 ligneE 0x000808d8 -[TiViewProxy layoutChild:optimize:withMeasuredBounds:] + 1736\r\n[ERROR] : 11 ligneE 0x0006d54c -[TiViewProxy add:] + 1388\r\n[ERROR] : 12 ligneE 0x000770ee -[TiViewProxy windowWillOpen] + 1342\r\n[ERROR] : 13 ligneE 0x00073636 -[TiViewProxy setParent:] + 134\r\n[ERROR] : 14 ligneE 0x0006d392 -[TiViewProxy add:] + 946\r\n[ERROR] : 15 ligneE 0x000770ee -[TiViewProxy windowWillOpen] + 1342\r\n[ERROR] : 16 ligneE 0x000696be -[TiWindowProxy openOnUIThread:] + 190\r\n[ERROR] : 17 ligneE 0x00069521 __22-[TiWindowProxy open:]_block_invoke + 49\r\n[ERROR] : 18 ligneE 0x0013a084 __TiThreadPerformOnMainThread_block_invoke + 52\r\n[ERROR] : 19 ligneE 0x0013a4fc TiThreadProcessPendingMainThreadBlocks + 524\r\n[ERROR] : 20 ligneE 0x0013a2d9 __TiThreadPerformOnMainThread_block_invoke178 + 57\r\n[ERROR] : 21 libdispatch.dylib 0x03c0a53f _dispatch_call_block_and_release + 15\r\n[ERROR] : 22 libdispatch.dylib 0x03c1c014 _dispatch_client_callout + 14\r\n[ERROR] : 23 libdispatch.dylib 0x03c0c7d5 _dispatch_main_queue_callback_4CF + 296\r\n[ERROR] : 24 CoreFoundation 0x038a0af5 __CFRunLoopRun + 1925\r\n[ERROR] : 25 CoreFoundation 0x0389ff44 CFRunLoopRunSpecific + 276\r\n[ERROR] : 26 CoreFoundation 0x0389fe1b CFRunLoopRunInMode + 123\r\n[ERROR] : 27 GraphicsServices 0x036817e3 GSEventRunModal + 88\r\n[ERROR] : 28 GraphicsServices 0x03681668 GSEventRun + 104\r\n[ERROR] : 29 UIKit 0x011b7ffc UIApplicationMain + 1211\r\n[ERROR] : 30 ligneE 0x00003ac8 main + 456\r\n[ERROR] : 31 ligneE 0x000023d5 start + 53\r\n[ERROR] : 2013-05-27 12:46:45.139 ligneE[2475:17b0f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid Region '\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (0x38fa012 0x33bbe7e 0x3982fb1 0x23aa78d 0x11e44b 0x11ed36 0x99a46 0x99b47 0x11ebf5 0x7cbd0 0x808d8 0x6d54c 0x770ee 0x73636 0x6d392 0x770ee 0x696be 0x69521 0x13a084 0x13a4fc 0x13a2d9 0x3c0a53f 0x3c1c014 0x3c0c7d5 0x38a0af5 0x389ff44 0x389fe1b 0x36817e3 0x3681668 0x11b7ffc 0x3ac8 0x23d5)\r\n-- End simulator log ---------------------------------------------------------\r\n{code}\r\n\r\n*Note*\r\nThis works fine on 3.0.2 GA and previous versions. It seems that the problem occurs with 3.1 GA and above.\r\n\r\n*Workaround*\r\nAdd left and right properties to Ti.Map creation. The error will no longer occur.", "attachment": [], "flagged": false, "summary": " iOS: 'Invalid Region ' with MapView on SDK 3.1.1", "creator": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX, TI Studio 3.1.1 SDK 3.1.1", "comment": { "comments": [ { "id": "254142", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you provide a reproducible test case that we can drop into an app.js and run?\n\nThanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T23:26:07.000+0000", "updated": "2013-05-27T23:26:07.000+0000" }, { "id": "254189", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Will try to do this.", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T07:04:34.000+0000", "updated": "2013-05-28T07:04:34.000+0000" }, { "id": "254599", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "will wait for test code . but have a feeling that this is could be due to the fact that we donot do proper type checking before trying setRegion. If the region being passed in does not have any latitude, longitude and latitudeDelta and longitudeDelta. Will also try to test if that is the actual cause. ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-29T18:19:22.000+0000", "updated": "2013-05-29T18:19:22.000+0000" }, { "id": "254619", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry was on a meeting all day. I post it as soon as I can.\nthe MapView is inside a view I wonder if it doesn't affect also...\nbecause in one case I have a \"normal\" window with a navbar and a tabgroup no problem\nhe same code but with a window without a navbar and without tabgroup and here it crash", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-29T19:16:16.000+0000", "updated": "2013-05-29T19:16:16.000+0000" }, { "id": "256587", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\nI have made a full sample case (sorry for late replay), clicl on the link to download it : http://cjoint.com/?0FhlmfuI9du", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T09:14:15.000+0000", "updated": "2013-06-07T09:14:15.000+0000" }, { "id": "256638", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "the strange thing :\nusing :\nvar mapview = Titanium.Map.createView({\n\tmapType : Titanium.Map.STANDARD_TYPE,\n\tregion : mapRegionSites,\n\ttop : \"24dp\",\n\tbottom : tp,\n\tleft:\"0dp\",\n\tright:\"0dp\",\n\tanimate : true,\n\tregionFit : true,\n\tuserLocation : true,\n\tannotations : [annotationDepart, annotationArrivee]\n});\n\ninstead of \nvar mapview = Titanium.Map.createView({\n\tmapType : Titanium.Map.STANDARD_TYPE,\n\tregion : mapRegionSites,\n\ttop : \"24dp\",\n\tbottom : tp,\n\tanimate : true,\n\tregionFit : true,\n\tuserLocation : true,\n\tannotations : [annotationDepart, annotationArrivee]\n});\n\ndoesn't make it crashing on 3.1X, the only diff here is the left and right property.", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T15:44:32.000+0000", "updated": "2013-06-07T15:44:32.000+0000" }, { "id": "256692", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T18:59:31.000+0000", "updated": "2013-06-07T18:59:31.000+0000" }, { "id": "256706", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Simplified Test code \n{code}\n\tvar window = Ti.UI.createWindow();\n\tvar self = Ti.UI.createView();\n\n\tvar isAndroid = false;\n\tif (Titanium.Platform.name == 'android') {\n\t\tisAndroid = true;\n\t}\n\n\tvar annotationDepart = Titanium.Map.createAnnotation({\n\t\tpincolor : Titanium.Map.ANNOTATION_GREEN,\n\t\tanimate : true\n\t});\n\n\tvar annotationArrivee = Titanium.Map.createAnnotation({\n\t\tpincolor : Titanium.Map.ANNOTATION_RED,\n\t\tanimate : true\n\t});\n\n\n\n\n\t//create the map boundary area values\n\tvar fact = 1;\n\tif (!isAndroid) {\n\t\tfact = 3;\n\t}\n\n\n\t//create the map region definition for the boundaries containing the sites\n\tvar mapRegionSites = {\n\t\tlatitude : 45.170863999999995, \n\t\tlongitude : 5.7132035000000005,\n\t\tlatitudeDelta : 0.004636666666667584,\n\t\tlongitudeDelta : 0.001671666666666442\n\t};\n\n\tTi.API.info(mapRegionSites);\n\n\t//tell the map view to display the region with the sites in\n\t//mapview.setLocation(mapRegionSites);\n\n\t//\n\t// CREATE ANNOTATIONS\n\t//\n\n\t//\n\t// CREATE MAP VIEW\n\t//\n\n\tvar mapToolbar;\n\tvar tp = \"44dp\";\n\n\t//To do\n\t/*\n\t * annotationDepart, annotationArrivee\n\t * tcAnnotations\n\t * routes\n\t * decLatitudeMax = -100000;\n\t * decLatitudeMin = 100000;\n\t * decLongitudeMax = -100000;\n\t * decLongitudeMin = 100000;\n\t */\n\n\tvar mapview = Titanium.Map.createView({\n\t\tmapType : Titanium.Map.STANDARD_TYPE,\n\t\tregion : mapRegionSites,\n\t\ttop : \"24dp\",\n\t\tbottom : tp, //left:0,right:0,\n\t\tanimate : true,\n\t\tregionFit : true,\n\t\tuserLocation : true,\n\t\tannotations : [annotationDepart, annotationArrivee]\n\t});\n\n\n mapview.addEventListener('complete', function(){\n mapview.setRegion(mapRegionSites);\n })\n\n\tself.add(mapview);\n\n\n\twindow.add(self);\n\t\n\twindow.open();\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T19:26:30.000+0000", "updated": "2013-06-07T19:26:30.000+0000" }, { "id": "256708", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending \n\nmaster :https://github.com/appcelerator/titanium_mobile/pull/4364\n3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4365", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-07T19:29:36.000+0000", "updated": "2013-06-07T19:29:36.000+0000" }, { "id": "256855", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My bad. I thought I pressed the buttons. Buttons now pressed.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-09T23:25:08.000+0000", "updated": "2013-06-09T23:25:08.000+0000" }, { "id": "256862", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with: \r\nSDK:3.1.1.v20130609163050\r\nAppcelerator Studio: 3.1.1.201306071750\r\nOS: OSX 10.7.5\r\nDevice:iPad mini(6.0)\r\nXcode: 4.6", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-10T09:51:59.000+0000", "updated": "2013-06-10T09:51:59.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }