android - Buffer Queue has been abandoned -
i writing app make lantern lighting led of android device. of time works well, see message "e/bufferqueueproducer﹕ [unnamed-5260-0] queuebuffer: bufferqueue has been abandoned" @ logcat.
after that, app not able light led of device. able gain control of led again when orientation changes... quite weird. have done lots of changes thing manage screw never able light led.
could me issue?
i attach .java file , logcat corresponding problem.
package com.spc.acrux.linterna; import android.content.context; import android.content.intent; import android.content.pm.packagemanager; import android.graphics.surfacetexture; import android.hardware.camera; import android.hardware.camera.parameters; import android.net.uri; import android.os.bundle; import android.support.v7.app.actionbaractivity; import android.util.log; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.textview; import android.widget.toast; import com.apptracker.android.track.apptracker; import com.google.android.gms.ads.adlistener; import com.google.android.gms.ads.adrequest; import com.google.android.gms.ads.adview; import com.google.android.gms.ads.interstitialad; import java.io.ioexception; public class mainactivity extends actionbaractivity { // remove below line after defining own ad unit id. //private static final string toast_text = "test ads being shown. " // + "to show live ads, replace ad unit id in res/values/strings.xml own ad unit id."; private static final int start_level = 1; private int mlevel; private button mnextlevelbutton; private interstitialad minterstitialad; private textview mleveltextview; private camera camera; //flag detect flash on or off private boolean islighon = false; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // leadbolt if(savedinstancestate == null) { // initialize leadbolt sdk api key apptracker.startsession(getapplicationcontext(), "hhxsj6gsjlqcgfqgia7zunbhke5nbx1k"); } // cache leadbolt ad without showing apptracker.loadmoduletocache(getapplicationcontext(),"inapp"); // mostrar un anuncio adview madview = (adview) findviewbyid(r.id.adview); adrequest adrequest = new adrequest.builder().build(); madview.loadad(adrequest); // crear el boton on / off button holaplayerbtn = (button)findviewbyid(r.id.buttononoff); // call when want display leadbolt interstitial apptracker.loadmodule(getapplicationcontext(),"inapp"); context context = this; packagemanager pm = context.getpackagemanager(); // if device support camera? if (!pm.hassystemfeature(packagemanager.feature_camera)) { log.e("err", "device has no camera!"); return; } camera = camera.open(); try { camera.setpreviewtexture(new surfacetexture(0)); } catch (ioexception e) { e.printstacktrace(); } final parameters p = camera.getparameters(); // create next level button, tries show interstitial when clicked. mnextlevelbutton = ((button) findviewbyid(r.id.next_level_button)); mnextlevelbutton.setenabled(false); mnextlevelbutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { showinterstitial(); } }); // create text view show level number. mleveltextview = (textview) findviewbyid(r.id.level); mlevel = start_level; // create interstitialad , set adunitid (defined in values/strings.xml). minterstitialad = new interstitialad(this); minterstitialad.setadunitid(getstring(r.string.interstitial_ad_unit_id)); minterstitialad.setadlistener(new adlistener() { @override public void onadloaded() { mnextlevelbutton.setenabled(true); } @override public void onadfailedtoload(int errorcode) { mnextlevelbutton.setenabled(true); } @override public void onadclosed() { // proceed next level. gotonextlevel(); } }); loadinterstitial(); // toasts test ad message on screen. remove after defining own ad unit id. //toast.maketext(this, toast_text, length_long).show(); //lo que hace el botón "hola" que se usa para encender y apagar la linterna holaplayerbtn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { try { string texto = getstring(r.string.pulsaste); toast.maketext(mainactivity.this, texto, toast.length_long).show(); //aqui hay que activar el flash y la cámara if (islighon) { log.i("info", "torch turn off!"); p.setflashmode(parameters.flash_mode_off); camera.setparameters(p); camera.stoppreview(); islighon = false; } else { log.i("info", "torch turn on!"); p.setflashmode(parameters.flash_mode_torch); camera.setparameters(p); camera.startpreview(); islighon = true; } } catch (exception e) { e.printstacktrace(); } } }); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.menu_main, menu); return true; } @override public boolean onoptionsitemselected(menuitem item) { // handle action bar item clicks here. action bar // automatically handle clicks on home/up button, long // specify parent activity in androidmanifest.xml. switch (item.getitemid()) { case r.id.otras_apps: startactivity(new intent(intent.action_view, uri.parse("market://search?q=pub:\"pedro santangelo\"") ) ); return true; case r.id.salir: // flurryagent.onendsession(this); { if (camera != null) { camera.release(); } this.finish(); return true; } default: return super.onoptionsitemselected(item); } } private void showinterstitial() { // show ad if it's ready. oth<string name="otras_apps">otras aplicaciones</string>oast , reload ad. if (minterstitialad != null && minterstitialad.isloaded()) { minterstitialad.show(); } else { toast.maketext(this, getstring(r.string.aderror), toast.length_short).show(); gotonextlevel(); } } private void loadinterstitial() { // disable next level button , load ad. mnextlevelbutton.setenabled(false); adrequest adrequest = new adrequest.builder().build(); minterstitialad.loadad(adrequest); } private void gotonextlevel() { // show next level , reload ad prepare level after. mleveltextview.settext(getstring(r.string.nivel) + " " + (++mlevel)); loadinterstitial(); } //public void activar() { //activar o desactivar la linterna... no se usa ya. // final string texto = "pulsaste on / off "; // toast.maketext(this, texto, length_long).show(); //} @override protected void ondestroy() { super.ondestroy(); if (camera != null) { camera.release(); } } /* @override public void onpause() { super.onpause(); if (camera != null) { camera.release(); } } @override public void onstop() { super.onstop(); if (camera != null) { camera.release(); } } */ }
===== logcat shown: ========
05-11 19:15:23.515 5260-5260/? i/art﹕ late-enabling -xcheck:jni 05-11 19:15:23.751 5260-5260/com.spc.acrux.linterna i/apptracker﹕ session started. sdk version in use 5.1 05-11 19:15:23.756 5260-5260/com.spc.acrux.linterna w/apptracker﹕ event listener not implemented before startsession called. 05-11 19:15:23.805 5260-5260/com.spc.acrux.linterna i/apptracker﹕ loading module caching enabled location:inapp 05-11 19:15:23.842 5260-5260/com.spc.acrux.linterna w/resourcesmanager﹕ asset path '/system/framework/com.android.media.remotedisplay.jar' not exist or contains no resources. 05-11 19:15:23.842 5260-5260/com.spc.acrux.linterna w/resourcesmanager﹕ asset path '/system/framework/com.android.location.provider.jar' not exist or contains no resources. 05-11 19:15:24.011 5260-5260/com.spc.acrux.linterna i/webviewfactory﹕ loading com.google.android.webview version 42.0.2311.138 (code 2311138) 05-11 19:15:24.038 5260-5260/com.spc.acrux.linterna i/libraryloader﹕ time load native libraries: 3 ms (timestamps 8049-8052) 05-11 19:15:24.038 5260-5260/com.spc.acrux.linterna i/libraryloader﹕ expected native library version number "",actual native library version number "" 05-11 19:15:24.057 5260-5260/com.spc.acrux.linterna v/webviewchromiumfactoryprovider﹕ binding chromium main looper looper (main, tid 1) {23b24f79} 05-11 19:15:24.057 5260-5260/com.spc.acrux.linterna i/libraryloader﹕ expected native library version number "",actual native library version number "" 05-11 19:15:24.058 5260-5260/com.spc.acrux.linterna i/chromium﹕ [info:library_loader_hooks.cc(112)] chromium logging enabled: level = 0, default verbosity = 0 05-11 19:15:24.072 5260-5260/com.spc.acrux.linterna i/browserstartupcontroller﹕ initializing chromium process, singleprocess=true 05-11 19:15:24.073 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:24.075 5260-5260/com.spc.acrux.linterna e/sysutils﹕ applicationcontext null in applicationstatus 05-11 19:15:24.098 5260-5348/com.spc.acrux.linterna w/audiomanagerandroid﹕ requires bluetooth permission 05-11 19:15:24.098 5260-5260/com.spc.acrux.linterna w/chromium﹕ [warning:resource_bundle.cc(286)] locale_file_path.empty() 05-11 19:15:24.099 5260-5260/com.spc.acrux.linterna i/chromium﹕ [info:aw_browser_main_parts.cc(63)] load apk succesful, fd=38 off=57784 len=4071 05-11 19:15:24.101 5260-5260/com.spc.acrux.linterna i/chromium﹕ [info:aw_browser_main_parts.cc(76)] loading webviewchromium.pak from, fd:39 off:7953032 len:1161174 05-11 19:15:24.111 5260-5260/com.spc.acrux.linterna i/adreno-egl﹕ <qegldrvapi_eglinitialize:379>: qualcomm build: 01/14/15, ab0075f, id3510ff6dc 05-11 19:15:24.178 5260-5260/com.spc.acrux.linterna i/ads﹕ csireporterfactory: csi not enabled. no csi reporter created. 05-11 19:15:24.186 5260-5260/com.spc.acrux.linterna i/ads﹕ starting ad request. 05-11 19:15:24.189 5260-5260/com.spc.acrux.linterna i/ads﹕ use adrequest.builder.addtestdevice("46b876313bcc4b37c16a2b0f9eccad83") test ads on device. 05-11 19:15:24.209 5260-5260/com.spc.acrux.linterna i/apptracker﹕ loading module location:inapp 05-11 19:15:24.213 5260-5260/com.spc.acrux.linterna w/apptracker﹕ no ad available location inapp. please run loadmoduletocache first 05-11 19:15:24.213 5260-5260/com.spc.acrux.linterna e/apptracker﹕ module inapp failed load:ad not ready 05-11 19:15:24.400 5260-5260/com.spc.acrux.linterna i/ads﹕ starting ad request. 05-11 19:15:24.400 5260-5260/com.spc.acrux.linterna i/ads﹕ use adrequest.builder.addtestdevice("46b876313bcc4b37c16a2b0f9eccad83") test ads on device. 05-11 19:15:24.423 5260-5428/com.spc.acrux.linterna d/openglrenderer﹕ use egl_swap_behavior_preserved: true 05-11 19:15:24.434 5260-5260/com.spc.acrux.linterna d/atlas﹕ validating map... 05-11 19:15:24.475 5260-5428/com.spc.acrux.linterna i/openglrenderer﹕ initialized egl, version 1.4 05-11 19:15:24.481 5260-5428/com.spc.acrux.linterna d/openglrenderer﹕ enabling debug mode 0 05-11 19:15:26.050 5260-5260/com.spc.acrux.linterna i/apptracker﹕ module inapp cached successfully. 05-11 19:15:27.554 5260-5361/com.spc.acrux.linterna w/chromium﹕ [warning:data_reduction_proxy_config.cc(150)] spdy proxy off @ startup 05-11 19:15:27.573 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.590 5260-5260/com.spc.acrux.linterna w/awcontents﹕ ondetachedfromwindow called when detached. ignoring 05-11 19:15:27.608 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.608 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.730 5260-5260/com.spc.acrux.linterna w/bindingmanager﹕ cannot call determinedvisibility() - never saw connection pid: 5260 05-11 19:15:27.807 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.809 5260-5260/com.spc.acrux.linterna w/awcontents﹕ ondetachedfromwindow called when detached. ignoring 05-11 19:15:27.820 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.820 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:15:27.871 5260-5260/com.spc.acrux.linterna w/bindingmanager﹕ cannot call determinedvisibility() - never saw connection pid: 5260 05-11 19:15:29.284 5260-5260/com.spc.acrux.linterna i/ads﹕ ad finished loading. 05-11 19:15:30.291 5260-5260/com.spc.acrux.linterna i/ads﹕ scheduling ad refresh 30000 milliseconds now. 05-11 19:15:30.300 5260-5260/com.spc.acrux.linterna i/ads﹕ ad finished loading. 05-11 19:15:50.616 5260-5260/com.spc.acrux.linterna i/info﹕ torch turn on! 05-11 19:15:50.732 5260-5428/com.spc.acrux.linterna v/renderscript﹕ application requested cpu execution 05-11 19:15:50.742 5260-5428/com.spc.acrux.linterna v/renderscript﹕ 0x9c94c800 launching thread(s), cpus 4 05-11 19:15:58.265 5260-5260/com.spc.acrux.linterna i/info﹕ torch turn off! 05-11 19:15:58.808 5260-5260/com.spc.acrux.linterna i/choreographer﹕ skipped 32 frames! application may doing work on main thread. 05-11 19:16:00.292 5260-5260/com.spc.acrux.linterna i/ads﹕ starting ad request. 05-11 19:16:00.293 5260-5260/com.spc.acrux.linterna i/ads﹕ use adrequest.builder.addtestdevice("46b876313bcc4b37c16a2b0f9eccad83") test ads on device. 05-11 19:16:01.011 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:16:01.016 5260-5260/com.spc.acrux.linterna w/awcontents﹕ ondetachedfromwindow called when detached. ignoring 05-11 19:16:01.030 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:16:01.030 5260-5260/com.spc.acrux.linterna w/art﹕ attempt remove local handle scope entry irt, ignoring 05-11 19:16:01.096 5260-5260/com.spc.acrux.linterna w/bindingmanager﹕ cannot call determinedvisibility() - never saw connection pid: 5260 05-11 19:16:01.687 5260-5260/com.spc.acrux.linterna i/ads﹕ scheduling ad refresh 30000 milliseconds now. 05-11 19:16:01.690 5260-5260/com.spc.acrux.linterna i/ads﹕ ad finished loading. 05-11 19:16:01.747 5260-5260/com.spc.acrux.linterna w/bindingmanager﹕ cannot call determinedvisibility() - never saw connection pid: 5260 05-11 19:16:08.705 5260-5260/com.spc.acrux.linterna i/info﹕ torch turn on! 05-11 19:16:10.141 5260-5278/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] queuebuffer: bufferqueue has been abandoned 05-11 19:16:10.146 5260-6865/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.146 5260-5279/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.147 5260-5278/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.147 5260-6865/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.148 5260-5279/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.148 5260-5278/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned 05-11 19:16:10.149 5260-6865/com.spc.acrux.linterna e/bufferqueueproducer﹕ [unnamed-5260-0] dequeuebuffer: bufferqueue has been abandoned
Comments
Post a Comment