Incorrect engine resuming after preview? Frozen wallpaper.

67 views
Skip to first unread message

Martin

unread,
Mar 20, 2012, 5:12:32 PM3/20/12
to GLWallpaperService
I have this bug that I don't know how to solve... spent ages looking
at it, but it seems to be in base GLWallpaperService code that is in
control of this stuff, and not my code.

I have given my engines unique ID's as the system asks for them to be
created with onCreateEngine, so that I can print out log messages to
see the order of functions called.

This is what I do:

1. My wallpaper is already running, with Engine0 being in control.
2. I then go to the Personalize->Wallpaper menu and select my same
wallpaper again.
3. At this point Engine0 is paused, and Engine1 is created (for the
preview) and resumed. (I would say this is correct).
4. I then click 'Apply'.
5. The new Engine1 is paused, BUT then Engine1 is resumed again.
Surely this should be the first Engine0?

What I end up with is my wallpaper being frozen after the preview. I
need to turn my screen on and off again for it to unfreeze and resume
Engine0 correctly.

I also tried Adam Ratana's wallpaper:
https://play.google.com/store/apps/details?id=com.ratana.jazzcat.biomechanicalbogfree
and it suffers from the same issue. Again, you must have your
wallpaper running already and then go and preview it again and apply
for the issue to manifest.

If the wallpaper is not running first, then it is fine... but still
there are some resumes in the log that are for the preview engine
after you are back on the home page. Is this a known issue? Is there
a fix? Is there some way to remove the preview engine from the list
of active engines after you apply perhaps?

Any ideas??? :)

MD

unread,
Mar 20, 2012, 6:10:58 PM3/20/12
to glwallpap...@googlegroups.com
Hi Martin,

I did some debugging on this a few days ago, so can't remember in detail the order of functions as they are called. But I think that after you click 'Apply' ( your step 4), the onDestroy() method of the wallpaper service is called. Whenever onDestroy() is called I delete all textures held by the engine. Then subsequent calls to onSurfaceCreated() and onSurfaceChanged() restore the wallpaper as if it's a fresh start.
You can check out my wallpaper here (download on a phone, this won't work on a tablet properly coz I still have to add/fix proper 'screen orientation' handling):

- M.

Martin

unread,
Mar 20, 2012, 6:28:33 PM3/20/12
to GLWallpaperService
Thanks for the reply. I downloaded your wallpaper and I'm afraid
yours also suffers from the same problem.

This is not a texture invalidation thing at all (I already handle all
that). This is an engine life cycle related issue. Note, I have an
HTC phone with HTC Sense 3.0, so it could be another thing that HTC
have messed up. :(

But if you follow the steps with your wallpaper it might freeze for
you too. Be sure that the wallpaper is running already, and then go
and apply it again.

Cheers

On Mar 20, 10:10 pm, MD <m.dhank...@gmail.com> wrote:
> Hi Martin,
>
> I did some debugging on this a few days ago, so can't remember in detail
> the order of functions as they are called. But I think that after you click
> 'Apply' ( your step 4), the onDestroy() method of the wallpaper service is
> called. Whenever onDestroy() is called I delete all textures held by the
> engine. Then subsequent calls to onSurfaceCreated() and onSurfaceChanged()
> restore the wallpaper as if it's a fresh start.
> You can check out my wallpaper here (download on a phone, this won't work
> on a tablet properly coz I still have to add/fix proper 'screen
> orientation' handling):https://play.google.com/store/apps/details?id=mashgin.ogl.unrealseasc...
>
> - M.
>
>
>
>
>
>
>
> On Tuesday, March 20, 2012 10:12:32 PM UTC+1, Martin wrote:
>
> > I have this bug that I don't know how to solve... spent ages looking
> > at it, but it seems to be in base GLWallpaperService code that is in
> > control of this stuff, and not my code.
>
> > I have given my engines unique ID's as the system asks for them to be
> > created with onCreateEngine, so that I can print out log messages to
> > see the order of functions called.
>
> > This is what I do:
>
> > 1. My wallpaper is already running, with Engine0 being in control.
> > 2. I then go to the Personalize->Wallpaper menu and select my same
> > wallpaper again.
> > 3. At this point Engine0 is paused, and Engine1 is created (for the
> > preview) and resumed.  (I would say this is correct).
> > 4. I then click 'Apply'.
> > 5. The new Engine1 is paused, BUT then Engine1 is resumed again.
> > Surely this should be the first Engine0?
>
> > What I end up with is my wallpaper being frozen after the preview.  I
> > need to turn my screen on and off again for it to unfreeze and resume
> > Engine0 correctly.
>
> > I also tried Adam Ratana's wallpaper:
>
> >https://play.google.com/store/apps/details?id=com.ratana.jazzcat.biom...

Mukul Dhankhar

unread,
Mar 20, 2012, 6:43:32 PM3/20/12
to glwallpap...@googlegroups.com
It gotta be a problem due to HTC Sense. I tested the wallpaper on Nexus One, Sony Xperia Arc, Samsung Galaxy S and LG Optimus. Besides I don't see this issue even when I just launch the wallpaper on the Emulator. Did you try to reproduce this issue on the emulator? 

Martin

unread,
Mar 20, 2012, 7:14:56 PM3/20/12
to GLWallpaperService
Okay, yeah... It's HTC Sense not working correctly. It works fine in
the emulator and with another launcher (Launcher Pro). Damn it HTC! :
(
Reply all
Reply to author
Forward
0 new messages