Re: [android-developers] Re: Rendering off UI thread causes ANR on Samsung Note
I added a log statement into the while loop. Based on this statement, the while loop continues after the UI has frozen.
On Tuesday, 1 May 2012 17:36:25 UTC-4, Mark Murphy (a Commons Guy) wrote:
On Tue, May 1, 2012 at 5:26 PM, abe oppenheim <abe.oppenheim@gmail.com> wrote:--
>> Well, try adding a sleep first and then check your results again.
>
> Ok, I added Thread.sleep(100) (at the end of every iteration of the while
> loop), and I still see the ANR. Any ideas as to why drawing in a non-ui
> thread would cause the UI thread to become stuck?
In theory, it shouldn't, unless Samsung mucked around with the innards
somewhere that they shouldn't have.
Which, of course, has happened before, with pretty much every OEM out there.
That being said, nothing from that thread seems to have any visible
output -- you're not using the resulting Canvas anywhere that I can
see. Is it actually looping on the Note? Or are you hitting some sort
of deadlock, where you and the main application thread get stuck? If
you don't know, dropping in some Log statements should determine that.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android App Developer Books: http://commonsware.com/books
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home