Question

I'm having a strange, and very random bug occur within an OpenGL live wallpaper that I'm developing.

My code is structured in such a way that the OpenGL scene 'pauses' and then 'resumes' when the user enters and exits the Preferences screen. Initially it worked wonderfully, but after implementing more features (thus creating a bit more overhead) the live wallpaper occasionally freezes when exiting the Preferences screen. Logcat kicks out the following message (which I've personally never encountered before) and repeats the message every second or so until I manually back out of the wallpaper:

W/SharedBufferStack(10715): waitForCondition(LockCondition) timed out (identity=4902, status=0). CPU may be pegged. trying again.

What's odd is how random it is. Sometimes it doesn't occur for 50 "preference-exits" or more. Other times it happens more frequently. Another oddity is that if I try to re-open the wallpaper right after a experiencing a freeze, logcat will start kicking out the same message and the wallpaper loading screen hangs for about five seconds or so, after which everything resumes normally without any more error messages.

Anyone have any clues on how to fix or bypass this issue?

Was it helpful?

Solution

Well, found the answer to my problem. It's nothing to do with my code after all, but rather a bug in the GLWallpaperService library itself. I should have checked the dev's site sooner:

https://github.com/markfguerra/GLWallpaperService/issues/7

https://github.com/markfguerra/GLWallpaperService/issues/11

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top