{ "id": "62604", "key": "TIMOB-1972", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-18T23:10:14.000+0000", "created": "2011-04-15T03:06:56.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "emulator" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-18T23:10:14.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}

Adding a click event inside another click event causes an\nexception.

\n

I have just found this bug in the latest build, 1.4.2 /\n30.09.2010. The 1.4.2 CI build released 21.09.2010 did not have\nthis issue.

\n

To see the issue in action, replace\nResources/examples/animation.js in the KitchenSink with the\nfollowing code:

\n

Resources/examples/animation.js

\n

Here is the error output:

\n
\n2087           KrollContext  D  (kroll$4) [550,44126] eval file: app://examples/animation.js\n2087               dalvikvm  D  GC_FOR_MALLOC freed 4800 objects / 266512 bytes in 124ms\n60     InputManagerService  W  Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fc6370\n60     InputManagerService  W  Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44fa11c0\n2087          KrollCallback  E  (kroll$4) [23525,67651] Error evaluating source: Wrapped java.lang.NullPointerException (app://examples/animation.js#40)\n2087          KrollCallback  E  org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (app://examples/animation.js#40)\n2087          KrollCallback  E      at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)\n2087          KrollCallback  E      at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:96)\n2087          KrollCallback  E      at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)\n2087          KrollCallback  E      at script(app://examples/animation.js:40)\n2087          KrollCallback  E      at org.mozilla.javascript.Interpreter.interpret(Unknown Source)\n2087          KrollCallback  E      at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)\n2087          KrollCallback  E      at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)\n2087          KrollCallback  E      at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)\n2087          KrollCallback  E      at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)\n2087          KrollCallback  E      at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:70)\n2087          KrollCallback  E      at android.os.Handler.handleCallback(Handler.java:587)\n2087          KrollCallback  E      at android.os.Handler.dispatchMessage(Handler.java:92)\n2087          KrollCallback  E      at android.os.Looper.loop(Looper.java:123)\n2087          KrollCallback  E      at android.os.HandlerThread.run(HandlerThread.java:60)\n2087          KrollCallback  E  Caused by: java.lang.NullPointerException\n2087          KrollCallback  E      at org.appcelerator.titanium.proxy.TiViewProxy.setClickable(TiViewProxy.java:589)\n2087          KrollCallback  E      at org.appcelerator.titanium.proxy.TiViewProxy.eventListenerAdded(TiViewProxy.java:569)\n2087          KrollCallback  E      at org.appcelerator.titanium.TiContext.dispatchOnEventChange(TiContext.java:362)\n2087          KrollCallback  E      at org.appcelerator.titanium.TiContext.addEventListener(TiContext.java:409)\n2087          KrollCallback  E      at org.appcelerator.titanium.TiProxy.addEventListener(TiProxy.java:232)\n2087          KrollCallback  E      at java.lang.reflect.Method.invokeNative(Native Method)\n2087          KrollCallback  E      at java.lang.reflect.Method.invoke(Method.java:521)\n2087          KrollCallback  E      at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:84)\n2087          KrollCallback  E      ... 11 more\n
{html}", "attachment": [], "flagged": false, "summary": "click event inside tableview click event causes exception", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "127127", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Oh I forgot to mention what will result when running the usecase\ncode:

\n

In KS, open the BaseUI tab, click Animation, then click Basic\n(or any of the table rows), and an exception will result before\nshowing the alert dialog

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:57.000+0000", "updated": "2011-04-15T03:06:57.000+0000" }, { "id": "127128", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [25b72fafef8cfa461ae2f4d3b2c6d844e9c9f2a6])\n[#1972 state:fixed-in-qa] Assumed the nativeView\nwas set and shouldn't have. \nhttp://github.com/appcelerator/titanium_mobile/commit/25b72fafef8cf...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:57.000+0000", "updated": "2011-04-15T03:06:57.000+0000" }, { "id": "127129", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Don
\nI can confirm that this resolved the problems I was having.
\nThanks for fixing so quickly!
\nHal

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:58.000+0000", "updated": "2011-04-15T03:06:58.000+0000" }, { "id": "127130", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

1.4.2.4ce7ff G1 running 1.6, 2.2 simulator

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:58.000+0000", "updated": "2011-04-15T03:06:58.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }