OSDN Git Service

Add debug dump if about to segfault
authorPablo Ceballos <pceballos@google.com>
Mon, 21 Mar 2016 23:54:08 +0000 (16:54 -0700)
committerThe Android Automerger <android-build@google.com>
Tue, 22 Mar 2016 17:56:28 +0000 (10:56 -0700)
Bug 27674961

Change-Id: I82242d2c1b7cc9646d233bab896f718652e9ce2c

libs/gui/GLConsumer.cpp

index 149f5bd..29d5268 100644 (file)
@@ -393,6 +393,21 @@ status_t GLConsumer::updateAndReleaseLocked(const BufferItem& item,
         return err;
     }
 
+    // For investigating b/27674961
+      if (mEglSlots[slot].mEglImage == nullptr) {
+          ALOGE("If you see this message in a log please post the log to "
+              "b/27674961");
+          ALOGE("slot = %d, mCurrentTexture = %d, mCurrentTextureImage = %p",
+                  slot, mCurrentTexture, mCurrentTextureImage.get());
+          for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) {
+              ALOGE("mEglSlots[%d].mEglImage = %p", i,
+                      mEglSlots[i].mEglImage.get());
+          }
+          String8 dump;
+          dumpLocked(dump, "");
+          ALOGE("%s", dump.string());
+      }
+
     // Ensure we have a valid EglImageKHR for the slot, creating an EglImage
     // if nessessary, for the gralloc buffer currently in the slot in
     // ConsumerBase.