On Aug 16, 11:07 pm, Mark Gjøl <bitflips...@gmail.com> wrote:

> My drawing loop is strictly single threaded (fed data by
> several other threads, obviously)

I didn't mean that you had multiple drawing threads; I don't either,
really. But like you, I do have several threads, that "feed" the
drawing thread. And then OpenGL has a thread of its own, maintained by
the system.

It's only a hunch on my part that it's a multithreading issue, really.
In addition to the error message you posted, the other one I've been
able to capture from logcat when the phone locks up is:

W/SurfaceComposerClient(11811): lock_layer timed out (is the CPU
pegged?) layer=0, lcblk=0x420a4020, state=0000000e (was 0000000e)

Both messages talk about locking, which says "multithreading" to me.
And I THINK my incidence decreased when I added all the thread-safe
code. But it's so intermittent that I can't be sure, and in any case
it apparently hasn't gone away completely. So that's not the whole
issue.

> My app has been on the Market for almost a year now, and hasn't had
> these problems until now. I recently changed a couple of things, the
> most noteworthy being the ability to use 256x256 textures rather than
> 128x128. As the crashes are completely random, I cannot be completely
> certain if this is the problem, but I don't seem to be getting the
> crashes when sticking to 128x128 textures, so maybe I'm exceeding some
> secret limit? For the record, aside from some 6 UI buttons at 64x64,
> I'm using about 9 256x256 textures and a single 1024x1024 texture. I
> am aware that this can be optimized to use less textures, and that may
> well be the fix to stop the phone from crashing.

Now THAT'S interesting. Like you, my app didn't used to do this, but
I'm not entirely sure when it started. It might have been about the
time I added a few more textures... mine mostly uses just a few big
ones. It's always used two at 1024x512, but this may have started at
the same time I added another object with a 512x256 texture. I might
try downgrading that one and see how it goes.

If you can get away with 128x128 textures, and that solves the problem
for you, then I'd say do it. I know, the appearance won't be as good,
but trust me... users are far more likely to downrate you for crashing
their phone.

String

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to