I'm writing a game using the drawing method from Chris Pruett's opengl
spritemethodtest demo. The Activity running my opengl view works fine
on initial load, and about half the time after turning off the phone
and turning it back on. However, the other half, it locks up. I'll get
a "lock_layer timed out (is the CPU pegged?)" warning that keeps
repeating. I tried running the debugger to find the exact line that
the error is occurring on, but the strange thing is that this error
won't occur if I'm running the debugger on my G1. It only happens
under normal operating conditions. Any help would be appreciated, as
this bug really has me stumped.

Here are my onPause and onResume activity methods:

    @Override
    public void onPause(){
        super.onPause();
        mGLSurfaceView.onPause();
        Log.w("glmailngame onpause called", "glmaingame onpause called");
    }

    @Override
    public void onResume(){
        super.onResume();
        mGLSurfaceView.onResume();
        Log.w("GLMainGame.onResume called", "GLMainGame.onResume
called");
    }

Here's a stack trace, running from the initial onCreate call to the
lockup (I added some extra Log warnings to illustrate when different
lifecycle methods are being called):


07-13 09:37:41.930: WARN/GLMainGame.onCreate called(3924):
GLMainGame.onCreate called
07-13 09:37:42.090: DEBUG/dalvikvm(3924): GC freed 1154 objects /
49992 bytes in 141ms
07-13 09:37:42.580: DEBUG/SurfaceFlinger(62): pid 3924 requesting gpu
core (owner = -1)
07-13 09:37:42.690: DEBUG/EGL.oem(3924): SMI  region at
virtual=0x4544c000, physical=0x0, size=7340032 offset=0
07-13 09:37:42.690: DEBUG/EGL.oem(3924): EBI1 region at
virtual=0x45b4c000, physical=0x16500000, size=8388608 offset=1228800
07-13 09:37:42.690: DEBUG/EGL.oem(3924): REGS region at
virtual=0x450b0000, physical=0xa0000000, size=1048576, offset=0
07-13 09:37:42.800: DEBUG/dalvikvm(3924): GC freed 3299 objects /
204304 bytes in 231ms
07-13 09:37:42.810: WARN/GUARDED RUN CALLED(3924): GUARDED RUN CALLED
07-13 09:37:42.810: WARN/GLMainGame.onStart called(3924):
GLMainGame.onStart called
07-13 09:37:42.810: WARN/GLMainGame.onResume called(3924):
GLMainGame.onResume called
07-13 09:37:42.820: WARN/attached GLView to window(3924): attached
GLView to window
07-13 09:37:42.860: DEBUG/SurfaceFlinger(62): pid 3924 requesting gpu
surface (current owner = 3924)
07-13 09:37:42.860: DEBUG/SurfaceFlinger(62): gpu surface granted to
pid 3924
07-13 09:37:42.870: DEBUG/SurfaceFlinger(62): pid 3924 requesting gpu
surface (current owner = 3924)
07-13 09:37:42.880: DEBUG/SurfaceFlinger(62): gpu surface granted to
pid 3924
07-13 09:37:44.770: DEBUG/KeyguardViewMediator(62): pokeWakelock(5000)
07-13 09:37:45.020: DEBUG/dalvikvm(62): GC freed 3807 objects / 179968
bytes in 217ms
07-13 09:37:45.040: INFO/WindowManager(62): Setting rotation to 1,
animFlags=0
07-13 09:37:45.050: INFO/WindowManager(62): Config changed:
{ scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/2 nav=3 orien=2 }
07-13 09:37:45.110: INFO/WindowManager(62): Config changed:
{ scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/2 nav=3 orien=2 }
07-13 09:37:45.260: DEBUG/StatusBar(62): updateResources
07-13 09:37:45.260: WARN/gl strings(3924): glAvailableExtensions:
GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat
GL_ARB_vertex_buffer_object
GL_ATI_extended_texture_coordinate_data_formats GL_ATI_imageon_misc
GL_ATI_texture_compression_atitc GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract
GL_EXT_stencil_wrap GL_OES_byte_coordinates
GL_OES_compressed_paletted_texture GL_OES_draw_texture
GL_OES_fixed_point GL_OES_matrix_palette GL_OES_point_size_array
GL_OES_point_sprite GL_OES_read_format GL_OES_single_precision
GL_OES_vertex_buffer_object GL_QUALCOMM_vertex_buffer_object
GL_QUALCOMM_direct_texture
07-13 09:37:45.320: WARN/glmailngame onpause called(3924): glmaingame
onpause called
07-13 09:37:45.330: WARN/glmaingame onstop called(3924): glmaingame
onstop called
07-13 09:37:46.350: ERROR/SpriteMethodTest(3924): Texture Load
GLError: 1281
07-13 09:37:46.360: ERROR/SpriteMethodTest(3924): Texture Load
GLError: 1281
07-13 09:37:50.060: WARN/SurfaceFlinger(62): timeout expired
mFreezeDisplay=1, mFreezeCount=0
07-13 09:37:50.195: WARN/WindowManager(62): App freeze timeout
expired.
07-13 09:37:50.195: WARN/WindowManager(62): Force clearing freeze:
AppWindowToken{432b7c08 token=HistoryRecord{432c4848
{com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame}}}
07-13 09:37:51.298: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:52.300: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:52.420: DEBUG/dalvikvm(62): GC freed 2232 objects / 130224
bytes in 222ms
07-13 09:37:53.301: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:54.306: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:55.209: WARN/WindowManager(62): Key dispatching timed out
sending to com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame
07-13 09:37:55.209: WARN/WindowManager(62): Dispatch state: {{KeyEvent
{action=1 code=82 repeat=0 meta=0 scancode=139 mFlags=8} to Window
{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false} @ 1247492270206
lw=Window{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false}
lb=android.os.binderpr...@4342df18 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false}}}
07-13 09:37:55.209: WARN/WindowManager(62): Current state:  {{KeyEvent
{action=0 code=82 repeat=0 meta=0 scancode=139 mFlags=8} to Window
{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false} @ 1247492275216
lw=Window{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false}
lb=android.os.binderpr...@4342df18 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{4328b068 com.steeliconvalley.slingcity/
com.steeliconvalley.slingcity.GLMainGame paused=false}}}
07-13 09:37:55.250: INFO/ActivityManager(62): ANR (application not
responding) in process: com.steeliconvalley.slingcity
07-13 09:37:55.250: INFO/ActivityManager(62): Annotation:
keyDispatchingTimedOut
07-13 09:37:55.250: INFO/ActivityManager(62): CPU usage:
07-13 09:37:55.250: INFO/ActivityManager(62): Load: 4.5 / 4.58 / 3.98
07-13 09:37:55.250: INFO/ActivityManager(62): CPU usage from 10474ms
to 32ms ago:
07-13 09:37:55.250: INFO/ActivityManager(62):   system_server: 13% =
11% user + 2% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):
com.steeliconvalley.slingcity: 11% = 10% user + 1% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   adbd: 0% = 0% user +
0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   android.process.acore:
0% = 0% user + 0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   tiwlan_wifi_wq: 0% =
0% user + 0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):
com.android.inputmethod.latin: 0% = 0% user + 0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   kondemand/0: 0% = 0%
user + 0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   wpa_supplicant: 0% =
0% user + 0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62):   logcat: 0% = 0% user +
0% kernel
07-13 09:37:55.250: INFO/ActivityManager(62): TOTAL: 24% = 19% user +
4% kernel
07-13 09:37:55.260: INFO/ActivityManager(62): Removing old ANR trace
file from /data/anr/traces.txt
07-13 09:37:55.260: INFO/Process(62): Sending signal. PID: 3924 SIG: 3
07-13 09:37:55.260: INFO/dalvikvm(3924): threadid=7: reacting to
signal 3
07-13 09:37:55.270: INFO/Process(62): Sending signal. PID: 115 SIG: 3
07-13 09:37:55.270: INFO/dalvikvm(115): threadid=7: reacting to signal
3
07-13 09:37:55.270: INFO/Process(62): Sending signal. PID: 3865 SIG: 3
07-13 09:37:55.270: INFO/dalvikvm(3865): threadid=7: reacting to
signal 3
07-13 09:37:55.270: INFO/Process(62): Sending signal. PID: 294 SIG: 3
07-13 09:37:55.270: INFO/dalvikvm(294): threadid=7: reacting to signal
3
07-13 09:37:55.280: INFO/Process(62): Sending signal. PID: 62 SIG: 3
07-13 09:37:55.280: INFO/dalvikvm(62): threadid=7: reacting to signal
3
07-13 09:37:55.300: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:55.370: INFO/dalvikvm(3924): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:55.720: INFO/dalvikvm(62): Wrote stack trace to '/data/anr/
traces.txt'
07-13 09:37:55.730: INFO/dalvikvm(115): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:55.730: INFO/Process(62): Sending signal. PID: 111 SIG: 3
07-13 09:37:55.730: INFO/dalvikvm(111): threadid=7: reacting to signal
3
07-13 09:37:55.730: INFO/Process(62): Sending signal. PID: 225 SIG: 3
07-13 09:37:55.730: INFO/dalvikvm(225): threadid=7: reacting to signal
3
07-13 09:37:55.970: INFO/dalvikvm(225): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:55.980: INFO/dalvikvm(294): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:56.000: INFO/dalvikvm(111): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:56.100: INFO/ActivityManager(62): Start proc
com.android.bugreport for broadcast
com.android.bugreport/.BugReportReceiver: pid=3940 uid=10046 gids=
{1007}
07-13 09:37:56.120: INFO/dalvikvm(3865): Wrote stack trace to '/data/
anr/traces.txt'
07-13 09:37:56.270: INFO/dalvikvm(3940): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
07-13 09:37:56.320: INFO/dalvikvm(3940): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=46)
07-13 09:37:58.122: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:37:59.125: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:38:01.055: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)
07-13 09:38:02.059: WARN/SurfaceComposerClient(3924): lock_layer timed
out (is the CPU pegged?) layer=1, lcblk=0x41f240a0, state=0000000a
(was 0000000a)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to