{ "id": "167213", "key": "TIMOB-24608", "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": "19572", "description": "Important fixes for 6.1.0", "name": "Release 6.1.1", "archived": false, "released": true, "releaseDate": "2017-06-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-19T20:30:09.000+0000", "created": "2017-04-20T18:08:43.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "issuelinks": [ { "id": "56029", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "169894", "key": "MOD-2362", "fields": { "summary": "Android: Crop Module not working ", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55262", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "167843", "key": "TIMOB-24743", "fields": { "summary": "Titanium CLI: Module build doesn't produce 'respackageinfo' file for Android", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55264", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "144567", "key": "TIMOB-18565", "fields": { "summary": "Android: Support android *.aar libraries while building module", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "55263", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "130742", "key": "TIMOB-17009", "fields": { "summary": "Tooling: Android Module need to add support for multiple res directories", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-10-09T14:02:18.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Hi ! \r\n\r\nWe are attempting to upgrade an Android module to SDK 6.0. \r\n\r\nHere is our original source code:\r\n{code}\r\n/**\r\n * This file was auto-generated by the Titanium Module SDK helper for Android\r\n * Appcelerator Titanium Mobile\r\n * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.\r\n * Licensed under the terms of the Apache Public License\r\n * Please see the LICENSE included with this distribution for details.\r\n *\r\n */\r\n\r\npackage ias.cropper;\r\n\r\nimport java.io.File;\r\n\r\nimport org.appcelerator.kroll.KrollDict;\r\nimport org.appcelerator.kroll.KrollFunction;\r\nimport org.appcelerator.kroll.KrollModule;\r\nimport org.appcelerator.kroll.annotations.Kroll;\r\nimport org.appcelerator.kroll.common.TiConfig;\r\nimport org.appcelerator.titanium.TiApplication;\r\nimport org.appcelerator.titanium.TiBlob;\r\nimport org.appcelerator.titanium.TiC;\r\nimport org.appcelerator.titanium.util.TiActivityResultHandler;\r\nimport org.appcelerator.titanium.util.TiActivitySupport;\r\n\r\nimport android.app.Activity;\r\nimport android.content.Intent;\r\nimport android.graphics.Bitmap;\r\nimport android.net.Uri;\r\nimport android.provider.MediaStore;\r\nimport android.util.Log;\r\nimport android.widget.Toast;\r\n\r\nimport com.soundcloud.android.crop.Crop;\r\nimport com.soundcloud.android.crop.CropImageActivity;\r\n\r\n\r\n@Kroll.module(name=\"Androidcropper\", id=\"ias.cropper\")\r\npublic class AndroidcropperModule extends KrollModule implements TiActivityResultHandler\r\n{\r\n\r\n\t// Standard Debugging variables\r\n\t\tprivate static final String LCAT = \"AndroidcropperModule\";\r\n\t\tprivate static final boolean DBG = TiConfig.LOGD;\r\n\r\n\t\tprivate KrollFunction successCallback;\r\n\t\tprivate KrollFunction cancelCallback;\r\n\t\tprivate KrollFunction errorCallback;\r\n\t\t\r\n\t\t\r\n\r\n\t\tpublic AndroidcropperModule()\r\n\t\t{\r\n\t\t\tsuper();\r\n\t\t}\r\n\r\n\t\t@Kroll.onAppCreate\r\n\t\tpublic static void onAppCreate(TiApplication app)\r\n\t\t{\r\n\t\t\tLog.d(LCAT, \"inside onAppCreate\");\r\n\t\t\t// put module init code that needs to run when the application is created\r\n\t\t}\r\n\r\n\t\tpublic void onResult(Activity activity, int requestCode, int resultCode, Intent result) {\r\n\t Log.i(LCAT, \"onResult Called\");\r\n\t\t\tif (requestCode == Crop.REQUEST_CROP) {\r\n\t\t\t\tif (resultCode == Activity.RESULT_OK) {\r\n\t Bitmap bitmap = null;\r\n\t try {\r\n\t bitmap = MediaStore.Images.Media.getBitmap(activity.getContentResolver(), Crop.getOutput(result));\r\n\t } catch (Exception e) {}\r\n\r\n\t\t\t\t\tKrollDict event = new KrollDict();\r\n\t\t\t\t\tevent.put(\"image\", TiBlob.blobFromImage(bitmap));\r\n\t event.put(TiC.EVENT_PROPERTY_SOURCE, this);\r\n\t\t\t\t\tsuccessCallback.callAsync(getKrollObject(), event);\r\n\r\n\t\t\t\t} else if (resultCode == Crop.RESULT_ERROR) {\r\n\t\t\t\t\tToast.makeText(activity, Crop.getError(result).getMessage(), Toast.LENGTH_SHORT).show();\r\n\r\n\t if (errorCallback == null) return;\r\n\t KrollDict event = new KrollDict();\r\n\t event.put(TiC.EVENT_PROPERTY_ERROR, Crop.getError(result).getMessage());\r\n\t event.put(TiC.EVENT_PROPERTY_SOURCE, this);\r\n\t errorCallback.callAsync(getKrollObject(), event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t public void onError(Activity activity, int requestCode, Exception e)\r\n\t {\r\n\t Log.i(LCAT, \"onError Called\");\r\n\t if (errorCallback == null) return;\r\n\t KrollDict event = new KrollDict();\r\n\t event.put(TiC.EVENT_PROPERTY_ERROR, e.getMessage());\r\n\t event.put(TiC.EVENT_PROPERTY_SOURCE, this);\r\n\t errorCallback.callAsync(getKrollObject(), event);\r\n\t }\r\n\r\n\t\t// Methods\r\n\t\t@Kroll.method\r\n\t\tpublic void open(KrollDict options) {\r\n\t\t\t Activity activity = getTiContext().getTiApp().getCurrentActivity();\r\n\t TiActivitySupport support = (TiActivitySupport) activity;\r\n\r\n\t\t\tsuccessCallback = getCallback(options, \"success\");\r\n\t\t\tcancelCallback = getCallback(options, \"cancel\");\r\n\t\t\terrorCallback = getCallback(options, \"error\");\r\n\r\n\t\t\tTiBlob originalImage = getImageData(options, \"image\");\r\n\r\n\t\t\tUri source = Uri.parse(originalImage.getNativePath());\r\n\t\t\tUri destination = Uri.fromFile(new File(activity.getCacheDir(), \"cropped\"));\r\n\r\n\t Intent cropIntent = new Intent();\r\n\r\n\t cropIntent.setData(source);\r\n\t cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, destination);\r\n\t //cropIntent.putExtra(\"aspect_x\", 1);\r\n\t //cropIntent.putExtra(\"aspect_y\", 1);\r\n\t \r\n\t cropIntent.putExtra(\"default_no_crop\", false);\r\n\t \r\n\r\n\t if (options.containsKeyAndNotNull(\"size\")) {\r\n\t Log.i(LCAT, \"Setting size to:\" + options.getInt(\"size\").toString());\r\n\t cropIntent.putExtra(\"max_x\", options.getInt(\"size\"));\r\n\t cropIntent.putExtra(\"max_y\", options.getInt(\"size\"));\r\n\t }\r\n\r\n\t cropIntent.setClass(activity, CropImageActivity.class);\r\n\r\n\t support.launchActivityForResult(cropIntent, Crop.REQUEST_CROP, this);\r\n\t\t}\r\n\r\n\t\tprivate KrollFunction getCallback(final KrollDict options, final String name){\r\n\t\t\tif (options.containsKey(name)) {\r\n\t\t\t\treturn (KrollFunction) options.get(name);\r\n\t\t\t} else {\r\n\t\t\t\tLog.e(LCAT, \"Callback not found:\" + name);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprivate TiBlob getImageData(final KrollDict options, final String name){\r\n\t\t\tif (options.containsKey(name)) {\r\n\t\t\t\treturn (TiBlob) options.get(name);\r\n\t\t\t} else {\r\n\t\t\t\tLog.e(LCAT, \"Image not found: \" + name);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n}\r\n\r\n{code}\r\n\r\nWe changed the following line:\r\n{code}\r\n Activity activity = getTiContext().getTiApp().getCurrentActivity();\r\n{code}\r\nto any one of the following substitutes:\r\n{code}\r\n Activity activity = getActivity(); or\r\n Activity activity = TiApplication.getInstance().getCurrentActivity(); or \r\n Activity activity = TiApplication.getAppRootOrCurrentActivity(); or \r\n Activity activity = getActivityProxy().getActivity();\r\n{code}\r\nNone of which worked and in every case we got the following exception:\r\n{code}\r\n[ERROR] : TiApplication: (main) [8919,68592] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ias.dispatchM/com.soundcloud.android.crop.CropImageActivity}: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference; Titanium 6.0.2,2017/02/24 11:22,undefined\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ias.dispatchM/com.soundcloud.android.crop.CropImageActivity}: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.-wrap12(ActivityThread.java)\r\n[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.setupViews(CropImageActivity.java:97)\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.onCreate(CropImageActivity.java:75)\r\n[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:6679)\r\n[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)\r\n[ERROR] : TiApplication: ... 9 more\r\n{code}\r\n", "attachment": [ { "id": "62242", "filename": "cropper.jar", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-16T19:43:15.000+0000", "size": 44898, "mimeType": "application/java-archive" }, { "id": "62644", "filename": "Screen Shot 2017-06-08 at 11.59.15 AM.png", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T18:15:36.000+0000", "size": 72769, "mimeType": "image/png" }, { "id": "62645", "filename": "Screen Shot 2017-06-08 at 12.00.47 PM.png", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T18:15:50.000+0000", "size": 108529, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: respackage value in native module's manifest is ignored", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 917, "state": "closed", "name": "2017 Sprint 13 SDK", "startDate": "2017-06-18T16:14:35.902Z", "endDate": "2017-07-02T16:14:00.000Z", "completeDate": "2017-07-06T23:53:22.101Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "418112", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "It would be useful to have the actual module source to be able to get an idea of what's going on and try to reproduce this issue, but from the logs you posted it's complaining about this code here:\r\n{code}\r\n[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.setupViews(CropImageActivity.java:97)\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.onCreate(CropImageActivity.java:75)\r\n[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:6679)\r\n{code}\r\nwhich I found at:\r\nhttps://github.com/jdamcd/android-crop/blob/master/lib/src/main/java/com/soundcloud/android/crop/CropImageActivity.java#L96\r\n\r\nBasically the library you're wrapping is expecting to get a CropImageView instance from the R.id.crop_image id, but is apparently getting a null pointer (meaning it can't find a view with that id).\r\n\r\nI see that defined in https://github.com/jdamcd/android-crop/blob/master/lib/src/main/res/layout/crop__activity_crop.xml\r\n\r\nSo I'm not certain what exactly is the issue here. How are you wrapping this third-party android-crop library? Are the resources (like the xml files I'm linking to) getting included?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-04-26T17:14:42.000+0000", "updated": "2017-04-26T17:14:42.000+0000" }, { "id": "418117", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok let me check with the customer if they can share the module and if they can provide more details based on your response. ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-26T17:37:25.000+0000", "updated": "2017-04-26T17:37:25.000+0000" }, { "id": "418338", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~cwilliams] !\r\n\r\nPFA the module project here:\r\n\r\nhttps://drive.google.com/file/d/0BwTWo-c2a0b9T3dSVHVYVk10Vnc/view?usp=sharing\r\n\r\nCustomer added below line to the manifest file to create auto generated R.java file but it's not creating any file:\r\n\r\nrespackage: com.soundcloud.android.crop\r\n\r\nThe initial issue was that we were getting 'java.lang.NoClassDefFoundError: com.example.mypackage.R$layout' Exception, so customer copied the R.class file manually to the jar file and it worked in 5.x but 6.x that doesn't work anymore, so we added 'respackage : com.soundcloud.android.crop' to auto generate R.java file but it's not creating any R.java file, this probably is the root cause of the whole issue.", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-01T19:02:18.000+0000", "updated": "2017-05-01T19:02:18.000+0000" }, { "id": "419819", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Sorry, Eric just reminded me of this ticket. I was able to reproduce locally after some effort, and am currently trying to get to the bottom of why this is happening. I think the repackage change is the correct way to go, rather than included the pre-compiled R* classes from the wrapped jar library.\r\n\r\nBut I think there may be a bug in the module build CLI code which is ignoring that value when building the module.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-16T19:28:01.000+0000", "updated": "2017-05-16T19:28:01.000+0000" }, { "id": "419821", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "So there is a CLI bug in building android native modules. I'll open a PR for that shortly. Additionally, the cropper.jar they used had the R files already inside, and I don't think that'd work properly.\r\nAdding `respackage: com.soundcloud.android.crop` is the correct way to got here, but the CLI bug basically was that we ignored that value.\r\n\r\nI built the 3rd party library using cradle and pulled out the classes.jar from he release AAR file, renamed it to cropper.jar and am attaching it here. That's what they should use in `android/lib`.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-16T19:45:35.000+0000", "updated": "2017-05-16T19:45:35.000+0000" }, { "id": "419822", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "master/6.2.0: https://github.com/appcelerator/titanium_mobile/pull/9063", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-16T19:50:13.000+0000", "updated": "2017-05-16T19:50:13.000+0000" }, { "id": "420065", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi ! Do you have any ETA to get this review finished ?\r\n", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-19T20:24:55.000+0000", "updated": "2017-05-19T20:24:55.000+0000" }, { "id": "421081", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "cherry-pick back port for 6.1.1: https://github.com/appcelerator/titanium_mobile/pull/9113\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-06-06T13:16:15.000+0000", "updated": "2017-06-06T13:16:15.000+0000" }, { "id": "421094", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "BTW, the respackage stuff is obsolete when using .aar files directly instead of manually extracting them to obtain the contained .jar and resources since 6.1.0, see https://wiki.appcelerator.org/display/guides2/Android+Module+Project#AndroidModuleProject-UsingAndroidLibraries. Using this will properly rebuild the R files from third-party libraries without the need to specify a respackage value.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-06-06T16:12:10.000+0000", "updated": "2017-06-06T16:12:10.000+0000" }, { "id": "421107", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for master & backport PR.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-06T18:11:13.000+0000", "updated": "2017-06-06T18:11:13.000+0000" }, { "id": "421357", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK's : 6.1.1.v20170607112801 & 6.2.0.v20170607160354.\r\n\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-08T02:00:25.000+0000", "updated": "2017-06-08T02:00:25.000+0000" }, { "id": "421751", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not working and affected other modules in the project ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T18:15:09.000+0000", "updated": "2017-06-12T18:15:09.000+0000" }, { "id": "421752", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please see the attached screen shots. ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T18:18:08.000+0000", "updated": "2017-06-12T18:18:08.000+0000" }, { "id": "421804", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rramirez], please try the 6_1_X branch, there is a known issue with the master branch and modules compiled with older versions.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-06-12T19:34:57.000+0000", "updated": "2017-06-12T19:34:57.000+0000" }, { "id": "421808", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I see, sorry !\r\n\r\nLet me check. Thanks", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T19:54:25.000+0000", "updated": "2017-06-12T19:54:25.000+0000" }, { "id": "421867", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~rramirez], Did you check it with 6_1_X branch ?", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-13T15:57:04.000+0000", "updated": "2017-06-13T15:57:04.000+0000" }, { "id": "422056", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes \r\n\r\nThis is the customer response:\r\n\r\nWe were able to build a module using the version of SDK you provided. However, when we run our app, we still have the same problem as before. We get the following exception when we try to use the cropping functionality: \r\n\r\n{code}\r\n[ERROR] : TiApplication: (main) [30641,338736] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ias.dispatchM/com.soundcloud.android.crop.CropImageActivity}: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference; Titanium 6.1.1,2017/06/09 15:31,undefined \r\n\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ias.dispatchM/com.soundcloud.android.crop.CropImageActivity}: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2947) \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008) \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread.-wrap14(ActivityThread.java) \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) \r\n\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) \r\n\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154) \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6688) \r\n\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) \r\n\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) \r\n\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) \r\n\r\n[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to write to field 'android.content.Context com.soundcloud.android.crop.CropImageView.context' on a null object reference \r\n\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.setupViews(CropImageActivity.java:97) \r\n\r\n[ERROR] : TiApplication: at com.soundcloud.android.crop.CropImageActivity.onCreate(CropImageActivity.java:75) \r\n\r\n[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:6912) \r\n\r\n[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) \r\n\r\n[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2900) \r\n\r\n[ERROR] : TiApplication: ... 9 more \r\n{code}\r\n\r\nIt seems like we are going in circles. ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-15T17:03:24.000+0000", "updated": "2017-06-15T17:03:24.000+0000" }, { "id": "422120", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Guys, Please check this asap. Customer need the fix. ", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-06-16T00:53:49.000+0000", "updated": "2017-06-16T00:53:49.000+0000" }, { "id": "422162", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The exception happens when the customer is attempting to crop a photo. here is the code of the module https://drive.google.com/open?id=0BwTWo-c2a0b9T3dSVHVYVk10Vnc", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-16T16:30:52.000+0000", "updated": "2017-06-16T16:30:52.000+0000" }, { "id": "422178", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~lchoudhary], the example in the module is a default one. Use the following code to actually test the module:\r\n{code}\r\nvar Cropper = require('ias.cropper');\r\nvar imageFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'image.jpg');\r\nvar imageBlob = imageFile.read();\r\nvar tmpFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'image.jpg');\r\ntmpFile.write(imageBlob);\r\nCropper.open({\r\n image: tmpFile.read(),\r\n success: function () {\r\n Ti.API.debug('success');\r\n },\r\n cancel: function () {\r\n Ti.API.debug('cancel');\r\n },\r\n error: function (e) {\r\n Ti.API.debug('error');\r\n Ti.API.debug(e.error);\r\n }\r\n});\r\n{code}\r\nPlace any test image under app/assets/image.jpg. I tested with 6.1.1.v20170615113917 and the module from the above link and the crop view opens just fine.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-06-16T19:13:10.000+0000", "updated": "2017-06-16T19:13:10.000+0000" }, { "id": "422186", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann], thanks for the app.js code.\r\n\r\n[~rramirez],I ran the code & the image opened successfully & I was able to move the crop selection square over the image to the appropriate position to crop the image & hitting {{Done}} button calls {{success}}.\r\n ", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-16T20:37:02.000+0000", "updated": "2017-06-16T20:37:02.000+0000" }, { "id": "422456", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Modules such as the one discussed here really are about wrapping a 3rd-party *.aar file to be consumed in a Titanium app. If we support AAR files in modules or directly in an Android app (and we do now), then you don't really need to make a module to wrap a 3rd-party library anymore.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-06-21T13:42:33.000+0000", "updated": "2017-06-21T13:42:33.000+0000" }, { "id": "422457", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "See [this PR|https://github.com/appcelerator-modules/ti.facebook/pull/85/commits/88568b940ca809c916f4b16d7c933daef5fd10cf] for an update migrating the Ti.Facebook to use the new AAR-handling and official Facebook SDK v4.23.0 AAR.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-06-21T13:50:33.000+0000", "updated": "2017-06-21T13:50:33.000+0000" } ], "maxResults": 32, "total": 32, "startAt": 0 } } }