markfguerra / GLWallpaperService

Please submit issues and pull requests to the main repository
https://github.com/GLWallpaperService/GLWallpaperService
Apache License 2.0
218 stars 114 forks source link

onSurfaceCreated() after onSurfaceDestroyed() #23

Closed ghost closed 11 years ago

ghost commented 12 years ago

Where can I release/reupload my objects?

Tryed to destroy in: GLEngine onDestroy Tryed to upload again in: Renderer onSurfaceCreated

when I am in live wallpaper picker and select my wallpaper only the "onSurfaceCreated()" function completed, but before it the "onSurfaceDestroyed" not.

the result when I am in live wallpaper's preview mode, and then SET WALLPAPER again:

LOG: 06-07 14:24:07.530: E/created--(10609): onSurfaceCreated() -->upload all things (meshes, textures) 06-07 14:24:07.955: E/destroyed--(10609): onSurfaceDestroyed -->destroy all things (meshes, textures)

So I get an error. Because onSurfaceDestroyed called last...why? Is it a bug?

tomasskare commented 11 years ago

I also get this, and cannot find any way to avoid it. Running on Android 4.2.2.

This is what I get:

  1. Bring up Live wallpaper picker
  2. Select my GL wallpaper

D/GLWallpaperService( 1929): onSurfaceCreated()

  1. It renders correctly
  2. Press "Set wallpaper"

D/GLWallpaperService( 1929): onSurfaceCreated() D/GLWallpaperService( 1929): onSurfaceDestroyed()

  1. Goes back to the home screen, but the wallpaper is cleared, since Destroy was called
  2. Selecting another wallpaper.

D/GLWallpaperService( 1929): onSurfaceDestroyed()

So, it seems that when the wallpaper is selected, it calls the new Created before the old Destroyed.

Does anyone have any idea how to fix this?

markfguerra commented 11 years ago

This issue is being closed because the project is being moved to the GLWallpaperService GitHub organization

If you're still having this problem, please go there and open new issue or pull request. Don't forget to link back to this page.