{ "id": "64127", "key": "TIMOB-3495", "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": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11249", "name": "Sprint 2011-14", "archived": true, "released": true, "releaseDate": "2011-04-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-03T12:47:27.000+0000", "created": "2011-04-15T03:45:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "2.3", "android", "camera", "crash", "defect", "preview", "release-1.7.0", "reported-1.6", "rplist" ], "versions": [], "issuelinks": [ { "id": "10268", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "64788", "key": "TIMOB-3717", "fields": { "summary": "Confirm TIMOB-3495", "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": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "updated": "2011-05-03T12:47:27.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": "{html}

Nexus S crashes when launching preview. Exception received:

\n
\nE/TiUncaughtHandler(  711): (main) [0,1313] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to resume activity {com.appcelerator.base/ti.modules.titanium.media.TiCameraActivity}: java.lang.NullPointerException; Titanium 1.0,N/A,N/A\nE/TiUncaughtHandler(  711): java.lang.RuntimeException: Unable to resume activity {com.appcelerator.base/ti.modules.titanium.media.TiCameraActivity}: java.lang.NullPointerException\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2095)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2110)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1643)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:2796)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.access$1600(ActivityThread.java:117)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:932)\nE/TiUncaughtHandler(  711):   at android.os.Handler.dispatchMessage(Handler.java:99)\nE/TiUncaughtHandler(  711):   at android.os.Looper.loop(Looper.java:123)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.main(ActivityThread.java:3647)\nE/TiUncaughtHandler(  711):   at java.lang.reflect.Method.invokeNative(Native Method)\nE/TiUncaughtHandler(  711):   at java.lang.reflect.Method.invoke(Method.java:507)\nE/TiUncaughtHandler(  711):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\nE/TiUncaughtHandler(  711):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\nE/TiUncaughtHandler(  711):   at dalvik.system.NativeStart.main(Native Method)\nE/TiUncaughtHandler(  711): Caused by: java.lang.NullPointerException\nE/TiUncaughtHandler(  711):   at ti.modules.titanium.media.TiCameraActivity.onResume(TiCameraActivity.java:89)\nE/TiUncaughtHandler(  711):   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)\nE/TiUncaughtHandler(  711):   at android.app.Activity.performResume(Activity.java:3833)\nE/TiUncaughtHandler(  711):   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2085)\nE/TiUncaughtHandler(  711):   ... 13 more\nE/jdwp    (  738): Failed sending reply to debugger: Broken pipe\nD/dalvikvm(  738): Debugger has detached; object registry had 1 entries\nE/AndroidRuntime(  711): FATAL EXCEPTION: main\nE/AndroidRuntime(  711): java.lang.RuntimeException: Unable to resume activity {com.appcelerator.base/ti.modules.titanium.media.TiCameraActivity}: java.lang.NullPointerException\nE/AndroidRuntime(  711):   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2095)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2110)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1643)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:2796)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.access$1600(ActivityThread.java:117)\nE/AndroidRuntime(  711):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:932)\nE/AndroidRuntime(  711):   at android.os.Handler.dispatchMessage(Handler.java:99)\nE/AndroidRuntime(  711):   at android.os.Looper.loop(Looper.java:123)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.main(ActivityThread.java:3647)\nE/AndroidRuntime(  711):   at java.lang.reflect.Method.invokeNative(Native Method)\nE/AndroidRuntime(  711):   at java.lang.reflect.Method.invoke(Method.java:507)\nE/AndroidRuntime(  711):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\nE/AndroidRuntime(  711):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\nE/AndroidRuntime(  711):   at dalvik.system.NativeStart.main(Native Method)\nE/AndroidRuntime(  711): Caused by: java.lang.NullPointerException\nE/AndroidRuntime(  711):   at ti.modules.titanium.media.TiCameraActivity.onResume(TiCameraActivity.java:89)\nE/AndroidRuntime(  711):   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)\nE/AndroidRuntime(  711):   at android.app.Activity.performResume(Activity.java:3833)\nE/AndroidRuntime(  711):   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2085)\nE/AndroidRuntime(  711):   ... 13 more\nW/ActivityManager(  114):   Force finishing activity com.appcelerator.base/ti.modules.titanium.media.TiCameraActivity\nW/ActivityManager(  114):   Force finishing activity com.appcelerator.base/.BaseActivity\n
{html}\n\n{code}\nvar overlay = Titanium.UI.createView();\nvar tag = Titanium.UI.createView({\n backgroundColor: '#fff',\n borderColor: '#000',\n height: 50,\n width: 150,\n top: 100,\n left: 25\n});\nvar tag_text = Titanium.UI.createLabel({\n text: tag.left,\n color: '#000',\n textAlign: 'center',\n width: 140,\n height: 'auto'\n });\nvar button = Titanium.UI.createButton({\n bottom: 0,\n color: '#000',\n height: 50,\n title: 'Test',\n width: 100\n});\n \nbutton.addEventListener('click', function (event)\n{\n tag.left = tag.left + 50;\n tag_text.text = tag.left;\n});\n \ntag.add(tag_text);\noverlay.add(tag);\noverlay.add(button);\n \nTitanium.Media.showCamera({\n overlay: overlay,\n showControls: false,\n mediaTypes: Titanium.Media.MEDIA_TYPE_PHOTO,\n autohide: false\n});\n{code}", "attachment": [], "flagged": false, "summary": "Android: exception occurs when opening preview on Nexus S 2.3", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "130719", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

(from [e12c3155c16d09a523c86a1b70f335fac7868838])\n[#3494 state:in-progress][#3495\nstate:in-progress] manually specify camera preview size

\n

when using custom overlay camera preview, manually set preview\nsize to largest supported preview size for that device
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/e12c3155c16d...

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:45:54.000+0000", "updated": "2011-04-15T03:45:54.000+0000" }, { "id": "130720", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Issue resolved by latest update to #1781

\n

\nhttps://github.com/appcelerator/titanium_mobile/commit/976a1fae259e...

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:45:55.000+0000", "updated": "2011-04-15T03:45:55.000+0000" }, { "id": "133099", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Nexus One 2.3.3", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-03T12:47:27.000+0000", "updated": "2011-05-03T12:47:27.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }