{ "id": "142945", "key": "TIMOB-18401", "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": "16711", "description": "Release 3.5.1", "name": "Release 3.5.1", "archived": false, "released": true, "releaseDate": "2015-03-06" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-01-21T22:19:57.000+0000", "created": "2015-01-16T09:22:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "3.5.0", "crash", "docs", "module", "qe-verified" ], "versions": [], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-02-20T00:17:44.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": "two years ago I developed an iOS module that wrapped around Google Maps for iOS SDK to return support for Google maps on Titanium projects.\r\n\r\n{quote}\r\nhttps://marketplace.appcelerator.com/apps/5076?restoreSearch=true#!overview\r\n{quote}\r\n\r\nthis worked fine and with every major Titanium SDK release I rebuilt, tested and it always worked fine.\r\n\r\nI used to run it using\r\n\r\n\r\n.../3.5.0.GA/titanium.py run\r\n\r\n\r\n\r\nbut that doesn't work anymore, instead I run\r\n\r\n\r\n{quote}\r\npython build.py\r\n{quote}\r\n\r\n\r\nwhich works although it will not run in simulator which adds up to development time.\r\n\r\nthe thing is that when I tried\r\n\r\n{quote}\r\nxcrun lipo -info build/...... .a\r\n{quote}\r\n\r\nI only got i386\r\n\r\n\r\n\r\nso I had to recreate a new module using the new titanium CLI, change the GUID and add my objective c classes and Google framework setup guide to it.\r\n\r\nthen after building again I managed to get it to support all architectures, so you may want to update the docs for veteran module developers.\r\n\r\n\r\n\r\nnow for the main issue:\r\n\r\nI use the module in a 10 lines demo app which just opens a window and adds an instance of Google maps, I build it with 3.4.1.GA SDK and it runs fine in the simulator. I also used the latest 1.9.1 version of Google's framework\r\n\r\nI then simply changed the tiapp.xml to use 3.5.0.GA instead, the simulator opened, I see my debug printouts and then the app crashes, according to xcode it crashes due to a memory release that was not allocated. \r\n\r\n{quote}\r\nmalloc: *** error for object 0xffcb5f0: pointer being freed was not allocated ***\r\n*** set a breakpoint in malloc_error_break to debug\r\n{quote}\r\n\r\nI tried to set the above breakpoint, I tried to see the xcode stack when it crashes but it is of no use, it crashes somewhere in the tile drawing of the Google Maps framework but it will not do so if run through SDK 3.4.1.GA...\r\n\r\n\r\nFact is, that from all the components used here the only variable that changed is the Titanium SDK version. so my guess is something in the list of changes of the new SDK broke something and some of the older apps won't work anymore. This module is used by many Titanium developers and is bundled with their published apps.\r\n\r\n\r\n\r\nto sum up:\r\n\r\n1. module + SDK 3.4.1.GA + Google SDK 1.9.1 = works\r\n2. module + SDK 3.5.0.GA + Google SDK 1.9.1 = crash\r\n3. xCode project + Google SDK 1.9.1 + sample app = works\r\n4. older module build compiled months ago + SDK 3.5.0.GA = crash\r\n\r\n\r\n\r\nattached is a sample project. it has a module folder with three versions, the 1.9.3 was built with 3.5.0.GA and supports 64-bit, the rest are older 32-bit only created with older SDKs (3.4.0 and earlier)\r\n\r\n\r\nyou will need to get the Google SDK\r\n\r\n{quote}\r\nhttps://developers.google.com/maps/documentation/ios/\r\n{quote}\r\n\r\nyou will also need to tell the module where to find the google framework in the module.xcconfig file per the module docs\r\n\r\n\r\n\r\nif you need a license key for it drop me an email : canufind1 at gmail", "attachment": [ { "id": "53692", "filename": "GoogleMapsTestModule.zip", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-19T17:14:42.000+0000", "size": 1019941, "mimeType": "application/zip" }, { "id": "53655", "filename": "mapTest2.zip", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-16T09:22:26.000+0000", "size": 9396562, "mimeType": "application/zip" } ], "flagged": false, "summary": "Module using Google Maps SDK works fine when run with 3.4.1.GA crashes with 3.5.0.GA", "creator": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "osx 10.9\r\niPhone simulator 8.1\r\nXcode 6.1\r\ntitanium studio 3.4.1.201410281727\r\ntitanium cli 3.4.1", "closedSprints": [ { "id": 309, "state": "closed", "name": "2015 Sprint 02 SDK", "startDate": "2015-01-17T01:00:16.697Z", "endDate": "2015-01-31T01:00:00.000Z", "completeDate": "2015-02-02T14:36:09.696Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "339668", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Jon, any news?", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-19T13:55:10.000+0000", "updated": "2015-01-19T13:55:10.000+0000" }, { "id": "339671", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey [~moshebox@gmail.com], we are still working on this. We have been able to reproduce your issue and are working on tracking down the problem.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-19T15:56:51.000+0000", "updated": "2015-01-19T15:56:51.000+0000" }, { "id": "339923", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Moshe, I found the problem with this. There was a conflict with the titanium debugger library and the google maps library. It was a compiler flag on the debugger. I submitted a PR and it should get in pretty soon. The debugger is not open sourced, but we'll update this jira ticket when it gets merged.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-20T18:07:36.000+0000", "updated": "2015-01-20T18:07:36.000+0000" }, { "id": "339942", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR for master https://github.com/appcelerator/titanium_mobile/pull/6587\r\nPR for 3.5.x https://github.com/appcelerator/titanium_mobile/pull/6588", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-20T18:48:11.000+0000", "updated": "2015-01-20T18:48:11.000+0000" }, { "id": "340016", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Pedro, that's great news, Thank you very much, waiting for the merge so I can guide other developers how to patch their local SDK 3.5.0.GA so they can build their apps until an official fixed SDK is released.", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-20T22:26:48.000+0000", "updated": "2015-01-20T22:26:48.000+0000" }, { "id": "340028", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Moshe,\r\nSee if you can pull the changes and try it yourself, just replace the debugger with the one in the PR. Let us know if any other issues come up. This will be merged sometime tomorrow PST time.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-20T23:07:33.000+0000", "updated": "2015-01-20T23:07:33.000+0000" }, { "id": "340036", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Pedro,\r\n\r\nI did and it works, it does not crash.\r\n\r\nproblem is, the app.js in my original attachment was a strip down version that only created the main map view.. after trying the stripped down version successfully I tried the full demo app.js with the new 1.9.3 module (no code changes, 64 bit enabled per 3.5.0.GA release notes guidelines) ....and it crashed again :(\r\n\r\nmaybe there is something else other than the debugger at play?\r\n\r\nfull app.js: https://dl.dropboxusercontent.com/u/172026/app.js", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-20T23:45:27.000+0000", "updated": "2015-01-20T23:48:03.000+0000" }, { "id": "340038", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks Moshe, I'll take a look", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-20T23:50:30.000+0000", "updated": "2015-01-20T23:50:30.000+0000" }, { "id": "340047", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Pedro,\r\n\r\njust to be sure, I removed any debugging logs or code comments I had in place when trying to trace this problem and rebuilt and checked the module.\r\n\r\nup to date 1.9.3 version here : https://dl.dropboxusercontent.com/u/172026/com.moshemarciano.googlemaps-iphone-1.9.3.zip\r\n\r\nI then tried it and it crashed, opened it in xCode and it seems to crash on the TiBindingTiValueFromNSObject function.\r\n\r\nversion 1.9.1 of the module included in the original attachment is the same code base compiled to 32 bit with 3.4.1.GA, it has no such problems even when run using SDK 3.5.0.GA....", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-21T00:24:13.000+0000", "updated": "2015-01-21T00:24:13.000+0000" }, { "id": "340053", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Moshe, looks like the problem might be in the module. I debugged it as well, just like you did. Place this in KrollMethod.m just before\r\n\t\treturn [KrollObject toValue:[o context] value:result];\r\n\r\n{code}\r\nNSLog(@\"\\n\\n\");\r\nNSLog(@\"---- %@\", o); // Method name\r\nNSLog(@\"---- %@\", result); // Result of method call\r\n{code}\r\nLooks like the \"addMarker\" method is supposed to return something but it's not returning anything. As if the function where this\r\n{code}\r\n-(id)addMarker\r\n{\r\n // some code\r\n // notice the return type is \"id\" but I'm returning nothing.\r\n}\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-21T00:40:41.000+0000", "updated": "2015-01-21T00:40:41.000+0000" }, { "id": "340112", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Pedro,\r\n\r\nyou were right :)\r\n\r\nhow could you tell the return type is wrong? when I added these debug lines it told me which function is it but did not trace the return type or the actual error.\r\n\r\nanyway, it seems to work now, I will do more testing to be sure.\r\n\r\na few last questions:\r\n\r\n1. how could you tell?\r\n2. any idea when this fix will be part of an official release? I need to tell developers how to get it and patch locally\r\n3. the fact is that before 3.5.0 (or maybe before xCode 6.1?) this would not result with an error or crash, and this means that many other modules that has little bugs like this may now crash apps, isn't that behaviour change problematic?", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-21T14:50:32.000+0000", "updated": "2015-01-21T14:50:32.000+0000" }, { "id": "340121", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi Moshe\r\n\r\n1. I did not know for that this was the case for certain, just a gut feeling and experience (I've seen this type of crash before)\r\n2. This should be in 3.5.X and master later today\r\n3. Correct, the crash is on the module and the module developer is responsible. The fact that it did not crash before is a mystery to me, or that it even compiles, having a return type and not a return statement. Nothing we can do here.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-21T16:58:02.000+0000", "updated": "2015-01-21T16:58:02.000+0000" }, { "id": "340186", "author": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "thank you Pedro", "updateAuthor": { "name": "moshebox@gmail.com", "key": "moshebox@gmail.com", "displayName": "Moshe Marciano", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2015-01-21T22:56:03.000+0000", "updated": "2015-01-21T22:56:03.000+0000" }, { "id": "343980", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.2\r\nAppcelerator Studio, build: 3.4.2.201502181619\r\nTitanium SDK build: 3.5.1.v20150219140555\r\nTitanium CLI, build: 3.4.2-alpha\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPad Mini 3 (8.1.3)\r\n\r\nBuilt a module using the GMaps SDK, installed an app to device with the module and verified the crash on 3.5.0.GA. The app no longer crashes on 3.5.1 SDK\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-02-20T00:17:30.000+0000", "updated": "2015-02-20T00:17:30.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }