android - What can I do when the BufferQueue has been abandoned? -


i using texture view show preview of camera in android app. noticed, however, every time app gets paused, getting error:

03-18 18:23:44.315: w/bufferqueue(19582): [unnamed-19582-20] cancelbuffer: bufferqueue has been abandoned! 

can tell me what's going on here? when app pauses deinitialize onsurfacetexturedestroyed()

 public boolean onsurfacetexturedestroyed(surfacetexture surface) {     mcamera.setpreviewcallback(null);     mcamera.stoppreview();     mcamera.release();     return true; } 

what you're doing what's written in textureview docs, should work.

the error message means "producer" side of bufferqueue (the camera) grabbed buffer, , trying un-grab (via cancelbuffer()). however, "consumer" side (the surfacetexture) has gone away. because "consumer" side owns queue, bufferqueue considered abandoned, , no further operations possible.

this sounds it's timing issue -- producer trying operations after surfacetexture has been destroyed. doesn't make sense, because you're shutting producer down in onsurfacetexturedestroyed(), , st doesn't released unless , until callback returns true. (it might interesting add log messages @ start , end of callback method, , see if "abandoned" complaint happens before or after them. use logcat -v threadtime see thread ids.)

so i'm not sure why happening. news should not adversely affect application -- producer correctly determine consumer has gone away, , complain not crash. it's noisy not explody.

out of curiosity, see messages device if run "live camera (textureview)" in grafika? activity straight out of textureview docs, , don't see complaints when run on device.

(additional information surfacetexture , bufferqueue can found here.)


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -