I posted a message a while ago saying that my mysterious problems went away 
after "unrooting" the phone and restoring it to factory conditions.  Turns out 
that was premature.  

After playing with the app for a bit I finally got a hang.  What is strange is 
that now I once again get the hangs soon (sometimes immediately) after starting 
the app.  Rebooting the phone doesn't help.  As weird as it sounds, it seems 
that after running the app for awhile on a "fresh" phone, the problem gets 
worse.

Other information that may or may not be relevant.  The bulk of the app is 
written in C/C++.  There are a substantial number of JNI methods (maybe 120) 
that serve as the glue between the Java and C++ code.  The vast bulk of the C++ 
code as runs on the iPhone so I'm pretty sure it is not causing the grief.  Is 
it even possible that some memory smash in the C code could cause a problem 
where OpenGL would deadlock after garbage collection?

Thanks for any help anyone can provide.

Bill


On Feb 16, 2011, at 9:07 AM, Bill Tschumy wrote:

> I've been battling a hang (deadlock) in OpenGL for the past week.  I've 
> finally realized that the system hangs after the garbage collector runs.  
> Here is an example from LogCat:
> 
> 02-16 08:49:32.609: INFO/ActivityManager(98): Displayed activity 
> com.southernstars.skysafari/.SkySafariActivity: 2219 ms (total 2219 ms)
> 02-16 08:49:37.369: DEBUG/dalvikvm(1863): GC_FOR_MALLOC freed 4144 objects / 
> 387544 bytes in 46ms
> 02-16 08:49:37.389: ERROR/Adreno200-ES20(1863): gsl_device_waittimestamp 
> failed in rb_timestamp_wait_on_timestamp
> 02-16 08:49:38.516: WARN/SharedBufferStack(1863): 
> waitForCondition(LockCondition) timed out (identity=157, status=0). CPU may 
> be pegged. trying again.
> ...
> ...
> 
> Anytime the LogCat shows a GC_FOR_MALLOC or a GC_EXTERNAL_ALLOC, the app 
> hangs with OpenGL in this LockCondition.  It appears that GC_EXPLICT, for the 
> most part, does not cause a problem (maybe these are smaller allocs, I don't 
> know).
> 
> Searching the internet, it seems that people are reporting things like this 
> on the HTC phones.  Usually they say the problem is very sporadic and hard to 
> reproduce.  I can reproduce it easily by simply putting a System.gc() call 
> into my application flow or by doing something that allocates a chunk of 
> memory forcing the GC to run.
> 
> I have this problem on an HTC Evo.  My development partner has a different 
> phone and is not seeing this.
> 
> I'm totally at a loss what to do next.  Has anyone seen anything like this or 
> have a plausible explanation for what is going on?  Is there any way it could 
> be something unusual we are doing in the app?  Or is it just a bug in the HTC 
> system or drivers?
> 
> Thanks for any help.
> 
> -- 
> Bill Tschumy
> Otherwise -- Longmont, CO
> http://www.otherwise.com
> 
> 
> 
> -- 
> 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

-- 
Bill Tschumy
Otherwise -- Longmont, CO
http://www.otherwise.com



-- 
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