{ "id": "86685", "key": "TIMOB-7716", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-10T23:44:17.000+0000", "created": "2012-02-17T16:50:05.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_media", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-05T15:50:31.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": "*The code*\r\nKitchen Sink from GitHub.\r\n\r\n*Expected behavior*\r\nWhen you navigate to 'Phone->Camera->Camera Basic' and then take a picture, it shouldn't crash.\r\n\r\n*Actual behavior*\r\nWhen you follow the steps above, it crashes the app.\r\n\r\n*Other info*\r\n-Same result with the following TiSDKs: 1.8.2.v20120217114657 and 2.0.0v20120217094635 \r\n-It doesn't matter if there is an SD card inserted or not, it crashes either way.\r\n", "attachment": [], "flagged": false, "summary": "Android: Taking a picture crashes the app on a Samsung Galaxy S2", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "183738", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Also seems to happen on a Samsung Exhibit 4G.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-19T14:57:35.000+0000", "updated": "2012-02-19T14:57:35.000+0000" }, { "id": "184068", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: You have to push 'save' after taking the picture to cause KS to crash.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-23T10:47:05.000+0000", "updated": "2012-02-23T10:47:05.000+0000" }, { "id": "184265", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#eee'\r\n});\r\n\r\nvar showCameraButton = Ti.UI.createButton({\r\n\ttitle : 'Open Camera', width : 200, height : 70, bottom : 5\r\n});\r\nshowCameraButton.addEventListener('click', function() {\r\n\tTi.Media.showCamera({\r\n\t\tsuccess : function(e) {},\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]//,\r\n\t\t//saveToPhotoGallery: true\r\n\t});\r\n});\r\n\r\nwin.add(showCameraButton);\r\nwin.open();\r\n{code}\r\n\r\nTesting steps:\r\n1. Run the above code on galaxy S2 with / without \"saveToPhotoGallery:true\".\r\n2. Click the button\r\n3. Take a picture and click 'save'\r\n\r\nExpected result:\r\nWith \"saveToPhotoGallery:true\", the picture should be in Gallery/Camera folder.\r\nWithout \"saveToPhotoGallery:true\", the picture should be in Gallery/(Your application name) folder.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-24T17:54:29.000+0000", "updated": "2012-02-24T17:54:29.000+0000" }, { "id": "184768", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Reopened this ticket since it now crashes on other Android devices.\r\n\r\nHere is the crash log:\r\n{code}\r\nI/PowerManagerService( 137): Light Animator Finished curIntValue=87\r\nI/InputReader( 137): dispatchTouch::touch event's action is 0\r\nI/InputDispatcher( 137): Delivering touch to current input target: action: 0, channel '4093e030 com.sec.android.app.camera/com.sec.android.app.camera.CropImage (server)'\r\nI/InputReader( 137): dispatchTouch::touch event's action is 1\r\nI/InputDispatcher( 137): Delivering touch to current input target: action: 1, channel '4093e030 com.sec.android.app.camera/com.sec.android.app.camera.CropImage (server)'\r\nV/CropImage( 1287): onSaveClicked\r\nV/CropImage( 1287): Crop = no, Return = specified uri\r\nV/CropImage( 1287): onPause\r\nV/Camera ( 1249): --onActivityResult--requestCode: 2001\r\nV/Camera ( 1249): --onActivityResult--resultCode: -1\r\nV/Camera ( 1249): --onActivityResult--data: Intent { act=inline-data (has extras) }\r\nW/ActivityManager( 137): Duplicate finish request for HistoryRecord{408ec038 com.sec.android.app.camera/.Camera}\r\nV/MediaProvider( 930): requestMediaThumbnail: this file must not be requested thumbnail. - path = /sdcard/dcim/Camera/tia264767409.jpg, uri =content://media/external/images/media/258\r\nD/AndroidRuntime( 1061): Shutting down VM\r\nW/dalvikvm( 1061): threadid=1: thread exiting with uncaught exception (group=0x40015578)\r\nE/TiApplication( 1061): (main) [10882,379591] Sending event: exception on thread: main msg:java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException; Titanium 2.0.0,2012/02/27 20:01,88ae7af\r\nE/TiApplication( 1061): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException\r\nE/TiApplication( 1061): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:2536)\r\nE/TiApplication( 1061): \tat android.app.ActivityThread.handleSendResult(ActivityThread.java:2578)\r\nE/TiApplication( 1061): \tat android.app.ActivityThread.access$2000(ActivityThread.java:117)\r\nE/TiApplication( 1061): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:965)\r\nE/TiApplication( 1061): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/TiApplication( 1061): \tat android.os.Looper.loop(Looper.java:123)\r\nE/TiApplication( 1061): \tat android.app.ActivityThread.main(ActivityThread.java:3687)\r\nE/TiApplication( 1061): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiApplication( 1061): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/TiApplication( 1061): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)\r\nE/TiApplication( 1061): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)\r\nE/TiApplication( 1061): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/TiApplication( 1061): Caused by: java.lang.NullPointerException\r\nE/TiApplication( 1061): \tat ti.modules.titanium.media.MediaModule.createDictForImage(MediaModule.java:557)\r\nE/TiApplication( 1061): \tat ti.modules.titanium.media.MediaModule$CameraResultHandler.onResult(MediaModule.java:314)\r\nE/TiApplication( 1061): \tat org.appcelerator.titanium.util.TiActivitySupportHelper$1.onResult(TiActivitySupportHelper.java:51)\r\nE/TiApplication( 1061): \tat org.appcelerator.titanium.util.TiActivitySupportHelper.onActivityResult(TiActivitySupportHelper.java:67)\r\nE/TiApplication( 1061): \tat org.appcelerator.titanium.TiBaseActivity.onActivityResult(TiBaseActivity.java:459)\r\nE/TiApplication( 1061): \tat android.app.Activity.dispatchActivityResult(Activity.java:3908)\r\nE/TiApplication( 1061): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:2532)\r\nE/TiApplication( 1061): \t... 11 more\r\nE/AndroidRuntime( 1061): FATAL EXCEPTION: main\r\nE/AndroidRuntime( 1061): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:2536)\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread.handleSendResult(ActivityThread.java:2578)\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread.access$2000(ActivityThread.java:117)\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:965)\r\nE/AndroidRuntime( 1061): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/AndroidRuntime( 1061): \tat android.os.Looper.loop(Looper.java:123)\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread.main(ActivityThread.java:3687)\r\nE/AndroidRuntime( 1061): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/AndroidRuntime( 1061): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\nE/AndroidRuntime( 1061): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)\r\nE/AndroidRuntime( 1061): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)\r\nE/AndroidRuntime( 1061): \tat dalvik.system.NativeStart.main(Native Method)\r\nE/AndroidRuntime( 1061): Caused by: java.lang.NullPointerException\r\nE/AndroidRuntime( 1061): \tat ti.modules.titanium.media.MediaModule.createDictForImage(MediaModule.java:557)\r\nE/AndroidRuntime( 1061): \tat ti.modules.titanium.media.MediaModule$CameraResultHandler.onResult(MediaModule.java:314)\r\nE/AndroidRuntime( 1061): \tat org.appcelerator.titanium.util.TiActivitySupportHelper$1.onResult(TiActivitySupportHelper.java:51)\r\nE/AndroidRuntime( 1061): \tat org.appcelerator.titanium.util.TiActivitySupportHelper.onActivityResult(TiActivitySupportHelper.java:67)\r\nE/AndroidRuntime( 1061): \tat org.appcelerator.titanium.TiBaseActivity.onActivityResult(TiBaseActivity.java:459)\r\nE/AndroidRuntime( 1061): \tat android.app.Activity.dispatchActivityResult(Activity.java:3908)\r\nE/AndroidRuntime( 1061): \tat android.app.ActivityThread.deliverResults(ActivityThread.java:2532)\r\nE/AndroidRuntime( 1061): \t... 11 more\r\nW/ActivityManager( 137): Force finishing activity com.appcelerator.titanium/org.appcelerator.titanium.TiActivity\r\nE/ ( 137): Dumpstate > /data/log/dumpstate_app_error\r\nD/PowerManagerService( 137): onSensorChanged: light value: 9000\r\nI/dumpstate( 1298): begin\r\nW/ActivityManager( 137): Activity pause timeout for HistoryRecord{408c7e68 com.appcelerator.titanium/org.appcelerator.titanium.TiActivity}\r\nD/AudioHardwareALSA( 86): Inside AudioStreamOutALSA::standby\r\nV/AudioHardwareALSA( 86): ALSAStreamOps::close()\r\nI/AudioHardwareALSA( 86): Output standby called!!. Turn off PCM device.\r\nD/VoldCmdListener( 78): asec list\r\nW/PowerManagerService( 137): Timer 0x7->0x3|0x0\r\nI/PowerManagerService( 137): Ulight 7->3|0\r\nD/LightsService( 137): BUTTON : 0\r\nI/dumpstate( 1298): done\r\n{code}\r\n\r\nIt crashes when you take a picture in kitchen sink. Tried it using the latest 2.0.0 CI build. This problem now occurs on a Samsung Exhibit 4G and a Droid Bionic. They both are running Android 2.3.x. \r\n\r\nIf there's any other information you need from me, please let me know ASAP. Thanks.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-03-01T09:38:36.000+0000", "updated": "2012-03-01T09:38:36.000+0000" }, { "id": "184783", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Closed for now since we don't have a device in the office to reproduce.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-03-01T11:07:46.000+0000", "updated": "2012-03-01T11:07:46.000+0000" }, { "id": "184784", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Will open again once I found a device in the office.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-03-01T11:08:28.000+0000", "updated": "2012-03-01T11:08:28.000+0000" }, { "id": "184786", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We cannot reproduce this issue based on all the devices we have.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-01T11:33:29.000+0000", "updated": "2012-03-01T11:33:29.000+0000" }, { "id": "184837", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "From the client: \r\n\r\nThe Samsung Exhibit 4G worked multiple times. The Motorola Droid Bionic crashed on the first attempt.\r\n\r\nLog for Exhibit 4G:\r\nhttp://pastebin.com/nxsF2vGj\r\n\r\nLog for Droid Bionic:\r\nhttp://pastebin.com/rQVAGSBS", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-03-01T15:34:08.000+0000", "updated": "2012-03-01T15:34:08.000+0000" }, { "id": "185854", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This might be due to getActivity() on MediaModule returning null.\r\nCannot reproduce this issue on any of my testing devices to verify\r\nthis is the cause of the bug.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-09T17:37:38.000+0000", "updated": "2012-03-09T17:37:38.000+0000" }, { "id": "185881", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This ticket was opened for Samsung Galaxy S2 and this issue has been fixed. Please open another ticket for Droid Bionic device.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-10T23:44:17.000+0000", "updated": "2012-03-10T23:44:17.000+0000" }, { "id": "187168", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with 2.0.0.v20120319003254 and Titanium Studio, build: 2.0.0.201203182248 on Samsung Galaxy S2. Verified with KS from master branch.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T13:25:29.000+0000", "updated": "2012-03-19T13:25:29.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }