Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Android] dequeueBuffer : BufferQueue has been abandoned  (Read 5185 times)

0 Members and 1 Guest are viewing this topic.

darrit

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
[Android] dequeueBuffer : BufferQueue has been abandoned
« on: August 16, 2015, 07:57:46 pm »
Hi guys,

Device: Samsung Galaxy S4

After i added a Adview to my project like this:

public class GameActivity extends NativeActivity {

        private static final String advStart = "xxxxxxxxxxxxxxxxxxxxxx";
       
        AdView startAD;

        PopupWindow popUp;

        GameActivity _activity;

        LinearLayout layout;

        LinearLayout mainLayout;

        boolean adsinited = false;

        public void onCreate(Bundle savedInstanceState) {

                super.onCreate(savedInstanceState);

                getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
               
                _activity = this;
               
                startAD = new AdView(this);
                startAD.setAdSize(AdSize.SMART_BANNER);
                startAD.setAdUnitId(advStart);
                startAD.setVisibility(View.VISIBLE);
                startAD.refreshDrawableState();
               
        }

        public void showAdPopup()
        {
                if (adsinited)
                {
                        return;
                }

                if (startAD != null) {

                        _activity.runOnUiThread(new Runnable() {

                                @Override
                                public void run() {

                                        adsinited = true;

                                        popUp = new PopupWindow(_activity);

                                        popUp.setHeight(50);

                                        popUp.setWindowLayoutMode(LayoutParams.WRAP_CONTENT,
                                                        LayoutParams.WRAP_CONTENT);

                                        popUp.setClippingEnabled(false);

                                        layout = new LinearLayout(_activity);

                                        mainLayout = new LinearLayout(_activity);

                                        layout.setPadding(-5, -5, -5, -5);

                                        MarginLayoutParams params = new MarginLayoutParams(
                                                        LayoutParams.WRAP_CONTENT,
                                                        LayoutParams.WRAP_CONTENT);

                                        params.setMargins(0, 0, 0, 0);

layout.setOrientation(LinearLayout.VERTICAL);

if(startAD.getParent() != null)
((ViewGroup)startAD.getParent()).removeView(startAD);
                                       
                                        layout.addView(startAD, params);

                                        popUp.setContentView(layout);

                                        _activity.setContentView(mainLayout, params);

                                        AdRequest.Builder aB = new Builder();

                                        aB.addTestDevice("B6F0C02A66C0C639398CDD1C6DEA026E");

                                        _activity.startAD.loadAd(aB.build());
                                       
                                        new Handler().postDelayed(new Runnable() {
                                            public void run() {
                                                        popUp.showAtLocation(mainLayout, Gravity.TOP, 0, 0);
                                            }
                                        }, 100);
                                        popUp.update();
                                }
                        });

                }

               
        }
        @Override
        public void onDestroy() {
                if (startAD != null) {
                        startAD.destroy();
                }
                super.onDestroy();
        }
 

sometimes I get a error or a warning like this:


08-15 22:50:37.441: W/Adreno-EGLSUB(12948): <DequeueBuffer:736>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
08-15 22:50:37.441: W/Adreno-EGLSUB(12948): <DequeueBuffer:736>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
08-15 22:50:37.441: W/Adreno-EGL(12948): <qeglDrvAPI_eglSwapBuffers:3702>: EGL_BAD_SURFACE
08-15 22:50:37.441: W/Adreno-EGLSUB(12948): <DequeueBuffer:736>: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
08-15 22:50:37.441: W/Adreno-EGL(12948): <qeglDrvAPI_eglSwapBuffers:3702>: EGL_BAD_SURFACE
08-15 22:50:37.451: W/Adreno-GSL(12948): <sharedmem_gpumem_alloc_id:1498>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
08-15 22:50:37.451: E/Adreno-GSL(12948): <gsl_memory_alloc_pure:2044>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.

08 - 16 17:10 : 23.984 : W / Adreno - EGL(22021) : <qeglDrvAPI_eglSwapBuffers : 3702> : EGL_BAD_SURFACE
08 - 16 17 : 10 : 23.984 : E / BufferQueueProducer(281) : [packageName / packageName.GameActivity] dequeueBuffer : BufferQueue has been abandoned
08 - 16 17 : 10 : 23.984 : W / Adreno - EGLSUB(22021) : <DequeueBuffer : 736> : dequeue native buffer fail : No such device, buffer = 0x0, handle = 0x0
08 - 16 17 : 10 : 23.984 : W / Adreno - EGL(22021) : <qeglDrvAPI_eglSwapBuffers : 3702> : EGL_BAD_SURFACE



Please can anyone help me with this Problem or can tell me a solution ?

darrit

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: [Android] dequeueBuffer : BufferQueue has been abandoned
« Reply #1 on: August 16, 2015, 08:27:31 pm »
When do you get the error message, sometimes is not very precise? After the call of the showAdPopup or without calling the showAdPopup at all? You need to be exact at your problem definition to get any help. Just throwing in the source and the logcat with one sentence is not enough (for most cases).

Are you sure it's related to the AdView, because on my old Galaxy S1 (android 2.3.4) SFML example app crashes with nearly the exact same error message.




AlexUT

darrit

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: [Android] dequeueBuffer : BufferQueue has been abandoned
« Reply #2 on: August 16, 2015, 08:54:33 pm »
Hmmm ... you are right Alex.
I think i should delete this topic, because i have really to less informations about this problem. If I have more informations, I will ask again.

darrit

 

anything