Skip to content

Commit

Permalink
Lockscreen visualizer: fix SystemUI FC when using Pulse
Browse files Browse the repository at this point in the history
11-13 20:00:00.527 10645 10645 I crash_dump64: performing dump of process 1467 (target tid = 10124)
11-13 20:00:00.538 10645 10645 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-13 20:00:00.539 10645 10645 F DEBUG   : Build fingerprint: 'HONOR/BKL-L09/HWBKL:8.0.0/HUAWEIBKL-L09S/172(C432):user/release-keys'
11-13 20:00:00.539 10645 10645 F DEBUG   : Revision: '0'
11-13 20:00:00.539 10645 10645 F DEBUG   : ABI: 'arm64'
11-13 20:00:00.539 10645 10645 F DEBUG   : pid: 1467, tid: 10124, name: Visualizer  >>> com.android.systemui <<<
11-13 20:00:00.539 10645 10645 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-13 20:00:00.539 10645 10645 F DEBUG   : Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7c633df0f4)'
11-13 20:00:00.539 10645 10645 F DEBUG   :     x0  0000000000000000  x1  000000000000278c  x2  0000000000000006  x3  0000000000000008
11-13 20:00:00.539 10645 10645 F DEBUG   :     x4  0000000000008080  x5  0000000000008080  x6  0000000000008080  x7  0000000000000038
11-13 20:00:00.539 10645 10645 F DEBUG   :     x8  0000000000000083  x9  40ef6d32d31c854a  x10 0000000000000000  x11 fffffffc7ffffbdf
11-13 20:00:00.539 10645 10645 F DEBUG   :     x12 0000000000000001  x13 000000005beb1f30  x14 0005a1f49bc3a000  x15 0000112f9e154a12
11-13 20:00:00.539 10645 10645 F DEBUG   :     x16 0000007cffb6f2c8  x17 0000007cffaad0d0  x18 00000000fffbfffe  x19 00000000000005bb
11-13 20:00:00.539 10645 10645 F DEBUG   :     x20 000000000000278c  x21 0000007d000d96d0  x22 0000000000000001  x23 0000000000000035
11-13 20:00:00.539 10645 10645 F DEBUG   :     x24 0000007d000c6fc8  x25 0000007d000c7680  x26 0000007c52a14588  x27 0000000000000000
11-13 20:00:00.539 10645 10645 F DEBUG   :     x28 0000000000000005  x29 0000007c52a141a0
11-13 20:00:00.539 10645 10645 F DEBUG   :     sp  0000007c52a14160  lr  0000007cffaa1bfc  pc  0000007cffaa1c24
11-13 20:00:00.564 10645 10645 F DEBUG   :
11-13 20:00:00.564 10645 10645 F DEBUG   : backtrace:
11-13 20:00:00.564 10645 10645 F DEBUG   :     #00 pc 0000000000021c24  /system/lib64/libc.so (abort+116)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #1 pc 0000000000082f04  /system/lib64/libc.so (__fortify_fatal(char const*, ...)+120)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #2 pc 0000000000082600  /system/lib64/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+52)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #3 pc 00000000000824b4  /system/lib64/libc.so (pthread_mutex_lock+228)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #4 pc 00000000000a8c54  /system/lib64/libmedia.so (android::Visualizer::periodicCapture()+56)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #5 pc 00000000000a8aac  /system/lib64/libmedia.so (android::Visualizer::CaptureThread::threadLoop()+88)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #6 pc 000000000000f9d8  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #7 pc 00000000000b4980  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #8 pc 0000000000081938  /system/lib64/libc.so (__pthread_start(void*)+36)
11-13 20:00:00.564 10645 10645 F DEBUG   :     #9 pc 0000000000023478  /system/lib64/libc.so (__start_thread+68)
Change-Id: Ic7f9788df8a38084c3b150eaa22d67f869085ca2
  • Loading branch information
ezio84 authored and eldainosor committed Mar 21, 2020
1 parent 963620b commit d048590
Showing 1 changed file with 12 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,29 +123,19 @@ public void run() {
}
};

private final Runnable mAsyncUnlinkVisualizer = new Runnable() {
@Override
public void run() {
AsyncTask.execute(mUnlinkVisualizer);
private void unlink() {
if (DEBUG) {
Log.w(TAG, "+++ mUnlinkVisualizer run(), mVisualizer: " + mVisualizer);
}
};

private final Runnable mUnlinkVisualizer = new Runnable() {
@Override
public void run() {
if (DEBUG) {
Log.w(TAG, "+++ mUnlinkVisualizer run(), mVisualizer: " + mVisualizer);
}
if (mVisualizer != null) {
mVisualizer.setEnabled(false);
mVisualizer.release();
mVisualizer = null;
}
if (DEBUG) {
Log.w(TAG, "--- mUnlinkVisualizer run()");
}
if (mVisualizer != null) {
mVisualizer.setEnabled(false);
mVisualizer.release();
mVisualizer = null;
}
};
if (DEBUG) {
Log.w(TAG, "--- mUninkVisualizer run()");
}
}

public VisualizerView(Context context) {
this(context, null, 0);
Expand Down Expand Up @@ -392,16 +382,15 @@ private void checkStateChanged() {
}
} else {
if (mDisplaying) {
unlink();
mDisplaying = false;
if (mVisible && !mAmbientVisualizerEnabled) {
animate()
.alpha(0f)
.withEndAction(mAsyncUnlinkVisualizer)
.setDuration(600);
} else {
animate().
alpha(0f)
.withEndAction(mAsyncUnlinkVisualizer)
.setDuration(0);
}
}
Expand Down

0 comments on commit d048590

Please sign in to comment.