{ "id": "79126", "key": "AC-3141", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2011-09-07T07:22:15.000+0000", "created": "2011-08-10T14:43:02.000+0000", "labels": [ "1.6.2", "android", "httpclient" ], "versions": [], "issuelinks": [], "assignee": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updated": "2016-03-08T07:48:12.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": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "When trying to reuse same httpclient (in function for sync server).\r\nfirst time work, after first time i got this error.\r\nConsole:\r\n\r\nE/TiBaseActivity( 299): (main) [1089,69978] Layout cleanup.\r\nD/dalvikvm( 299): GC_FOR_MALLOC freed 15445 objects / 734008 bytes in 175ms\r\nI/TiAPI ( 299): (kroll$5: app://combobox.js) [4560,74538] Sync - uid: 36 date: 2011-5-2\r\nD/dalvikvm( 299): GC_FOR_MALLOC freed 7275 objects / 298704 bytes in 175ms\r\nD/TiHttpClient( 299): (TiHttpClient-2) [1133,75671] Setting ready state to 2\r\nD/TiHttpClient( 299): (TiHttpClient-2) [2,75673] Setting ready state to 3\r\nD/TiHttpClient( 299): (TiHttpClient-2) [6,75679] Setting ready state to 4\r\nW/MessageQueue( 299): Handler{43f203a0} sending message to a Handler on a dead thread\r\nW/MessageQueue( 299): java.lang.RuntimeException: Handler{43f203a0} sending message to a Handler on a dead thread\r\nW/MessageQueue( 299): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:179)\r\nW/MessageQueue( 299): at android.os.Handler.sendMessageAtTime(Handler.java:457)\r\nW/MessageQueue( 299): at android.os.Handler.sendMessageDelayed(Handler.java:430)\r\nW/MessageQueue( 299): at android.os.Handler.post(Handler.java:248)\r\nW/MessageQueue( 299): at org.appcelerator.titanium.kroll.KrollCallback.callAsync(KrollCallback.java:162)\r\nW/MessageQueue( 299): at org.appcelerator.titanium.kroll.KrollCallback.callAsync(KrollCallback.java:96)\r\nW/MessageQueue( 299): at org.appcelerator.titanium.kroll.KrollCallback.callAsync(KrollCallback.java:91)\r\nW/MessageQueue( 299): at ti.modules.titanium.network.TiHTTPClient.fireCallback(TiHTTPClient.java:489)\r\nW/MessageQueue( 299): at ti.modules.titanium.network.TiHTTPClient.fireCallback(TiHTTPClient.java:480)\r\nW/MessageQueue( 299): at ti.modules.titanium.network.TiHTTPClient.setReadyState(TiHTTPClient.java:512)\r\nW/MessageQueue( 299): at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1006)\r\nW/MessageQueue( 299): at java.lang.Thread.run(Thread.java:1096)\r\nWhen i try to send again same request to server on android device..", "attachment": [], "flagged": false, "summary": "Android - sending message to a Handler on a dead thread", "creator": { "name": "gizmo_x", "key": "gizmo_x", "displayName": "Emrah Mehmedov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gizmo_x", "key": "gizmo_x", "displayName": "Emrah Mehmedov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "mac osx, titanium studio up to date, SDK 1.6.2, Android (iphone work good).", "comment": { "comments": [ { "id": "162553", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thank you for raising this ticket. In order to progress it, please add the missing information *in the format and places* requested in the guidelines at [Jira Ticket Checklist|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist].\r\n\r\nFor instance, in the environment field:\r\n \r\n* *Titanium SDK version:* number, build date and build hash, copied and pasted from the console at application launch\r\n* *Platform & version:* iOS x.x, Android x.x, Blackberry x.x, OSX x.x, Windows x, Ubuntu x.x\r\n* *Device Details:* iOS simulator, Android emulator or physical device model\r\n* *Host Operating System:* OSX x.x, Windows x, Ubuntu x.x\r\n* *Titanium Studio version:* copied and pasted from Help / About\r\n\r\nIn the description:\r\n\r\n* *a link to the Q&A question*, where you asked the community to verify the observed behavior\r\n* *a* *[simple usecase|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases]**:* working code that demonstrates issue, placed within a \\{code\\} wiki markup block\r\n* *logs:* the console output of any exceptions, placed within a \\{code\\} wiki markup block\r\n\r\n\r\n\r\nMany thanks in advance", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-11T04:32:12.000+0000", "updated": "2011-08-11T04:32:12.000+0000" }, { "id": "162667", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I did notice this kind of error messages number of times, not related to the HTTPclient. I didn't figure out what exactly is happening there (and didn't manage to create simple use-case), but I think that in some cases Titanium doesn't clear all event handlers, so when some thread finishes, Titanium tries to publish event that was left on that thread. I wrote my own event system in which I register and unregister events when window closes by myself. These kind of exceptions disappeared with that approach.\r\n\r\nI think that Titanium framework should check is event published to the dead thread (if that is possible) and if it is raise a warning in console (some kind of link with JS file would be great). That way, these kind of exceptions would disappear.\r\n\r\nThis is just my theory, I hope I didn't miss much. :)", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-08-12T00:32:32.000+0000", "updated": "2011-08-12T00:32:32.000+0000" }, { "id": "165203", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sorry, Ivan, as there has been no response from the owner, I must start the closing process.\n\nIf you are able to reproduce/prove the issue using simple code, you are welcome to raise a new ticket, and then we can get it in front of the core team.\n\nMany thanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-09-07T07:22:15.000+0000", "updated": "2011-09-07T07:22:15.000+0000" }, { "id": "177243", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Ticket resolved and not updated since last curator action.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-27T06:40:48.000+0000", "updated": "2011-12-27T06:40:48.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }