Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.3k stars 10.8k forks source link

Crash - "invalid device id" and "inconsistent event" errors #5477

Open danmasterboss opened 2 weeks ago

danmasterboss commented 2 weeks ago

Environment

Describe the bug

When using scrcpy with Klickr (auto clicker), device will crash and restart

No errors in scrcpy log.

logcat attached logcatclickcrash.txt

rom1v commented 2 weeks ago

Looks like a native crash in the system in libinputflinger:

11-12 12:35:18.519 28834 28834 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-12 12:35:18.519 28834 28834 F DEBUG   : Build fingerprint: 'google/raven/raven:15/AP3A.241105.007/12470370:user/release-keys'
11-12 12:35:18.519 28834 28834 F DEBUG   : Revision: 'MP1.0'
11-12 12:35:18.519 28834 28834 F DEBUG   : ABI: 'arm64'
11-12 12:35:18.519 28834 28834 F DEBUG   : Timestamp: 2024-11-12 12:35:17.706154097+0000
11-12 12:35:18.519 28834 28834 F DEBUG   : Process uptime: 629s
11-12 12:35:18.519 28834 28834 F DEBUG   : Cmdline: system_server
11-12 12:35:18.519 28834 28834 F DEBUG   : pid: 11668, tid: 11835, name: InputDispatcher  >>> system_server <<<
11-12 12:35:18.519 28834 28834 F DEBUG   : uid: 1000
11-12 12:35:18.519 28834 28834 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
11-12 12:35:18.519 28834 28834 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-12 12:35:18.519 28834 28834 F DEBUG   : Abort message: 'addPointers - overlap with incoming pointers 00000000000000000000000000000001 in {connection=cf87de1 com.buzbuz.smartautoclicker (server), windowHandle=cf87de1 com.buzbuz.smartautoclicker, dispatchMode=OUTSIDE, targetFlags=0x0, pointers
=
11-12 12:35:18.519 28834 28834 F DEBUG   :         default (ROT_270) (ROTATE TRANSLATE)
11-12 12:35:18.519 28834 28834 F DEBUG   :             0.0000  1.0000  -1096.0000
11-12 12:35:18.519 28834 28834 F DEBUG   :             -1.0000  0.0000  1066.0000
11-12 12:35:18.519 28834 28834 F DEBUG   :             0.0000  0.0000  1.0000
11-12 12:35:18.519 28834 28834 F DEBUG   : }'
11-12 12:35:18.519 28834 28834 F DEBUG   :     x0  0000000000000000  x1  0000000000002e3b  x2  0000000000000006  x3  0000007aeffeae80
11-12 12:35:18.519 28834 28834 F DEBUG   :     x4  fefefefefefefeff  x5  fefefefefefefeff  x6  fefefefefefefeff  x7  7f7f7f7f7f7f7f7f
11-12 12:35:18.519 28834 28834 F DEBUG   :     x8  00000000000000f0  x9  0000007f03e993a8  x10 0000000000000001  x11 0000007f03eea6f0
11-12 12:35:18.519 28834 28834 F DEBUG   :     x12 0000007aeffe9bc0  x13 00000000000001ee  x14 0000007aeffe9c70  x15 0000019415a16ba1
11-12 12:35:18.519 28834 28834 F DEBUG   :     x16 0000007f03f51fd0  x17 0000007f03f3e040  x18 0000007aed658000  x19 0000000000002d94
11-12 12:35:18.519 28834 28834 F DEBUG   :     x20 0000000000002e3b  x21 00000000ffffffff  x22 000000000000000b  x23 0000007aeffeba80
11-12 12:35:18.519 28834 28834 F DEBUG   :     x24 000000000000018f  x25 b400007dd90ecbb0  x26 0000000000000000  x27 0000000000000000
11-12 12:35:18.519 28834 28834 F DEBUG   :     x28 b400007e590d0450  x29 0000007aeffeaf00
11-12 12:35:18.519 28834 28834 F DEBUG   :     lr  0000007f03ed3a58  sp  0000007aeffeae60  pc  0000007f03ed3a84  pst 0000000000001000
11-12 12:35:18.519 28834 28834 F DEBUG   : 14 total frames
11-12 12:35:18.519 28834 28834 F DEBUG   : backtrace:
11-12 12:35:18.519 28834 28834 F DEBUG   :       #00 pc 000000000005da84  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: a923caae2e75861e7a06a23f740068a5)
11-12 12:35:18.519 28834 28834 F DEBUG   :       #01 pc 000000000093075c  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+344) (BuildId: 3f7d5a016e08d528f129bdd336d81168)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #02 pc 00000000000160fc  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 42d41ca7c77853791d096606e7186547)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #03 pc 0000000000013ed0  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+512) (BuildId: c80a088e53b9a915a7740e70d7a0c5e7)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #04 pc 000000000013bd04  /system/lib64/libinputflinger.so (android::inputdispatcher::InputDispatcher::addPointerWindowTargetLocked(android::sp<android::gui::WindowInfoHandle> const&, android::inputdispatcher::InputTarget::DispatchMode, android::f
tl::Flags<android::inputdispatcher::InputTargetFlags>, std::__1::bitset<32ul>, std::__1::optional<long>, std::__1::vector<android::inputdispatcher::InputTarget, std::__1::allocator<android::inputdispatcher::InputTarget>>&) const+1572) (BuildId: a388c16b4d160a11f14da285841420d4)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #05 pc 0000000000141c54  /system/lib64/libinputflinger.so (android::inputdispatcher::InputDispatcher::findTouchedWindowTargetsLocked(long, android::inputdispatcher::MotionEntry const&, android::os::InputEventInjectionResult&)+8564) (BuildId: a388
c16b4d160a11f14da285841420d4)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #06 pc 0000000000139780  /system/lib64/libinputflinger.so (android::inputdispatcher::InputDispatcher::dispatchMotionLocked(long, std::__1::shared_ptr<android::inputdispatcher::MotionEntry const>, android::inputdispatcher::InputDispatcher::DropRea
son*, long&)+272) (BuildId: a388c16b4d160a11f14da285841420d4)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #07 pc 0000000000136010  /system/lib64/libinputflinger.so (android::inputdispatcher::InputDispatcher::dispatchOnceInnerLocked(long&)+1392) (BuildId: a388c16b4d160a11f14da285841420d4)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #08 pc 00000000001359f0  /system/lib64/libinputflinger.so (android::inputdispatcher::InputDispatcher::dispatchOnce()+80) (BuildId: a388c16b4d160a11f14da285841420d4)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #09 pc 000000000000b9e8  /system/lib64/libinputflinger_base.so (android::(anonymous namespace)::InputThreadImpl::threadLoop()+24) (BuildId: 538c412773ef52ac8d9ba15ae865f6dc)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #10 pc 0000000000014c90  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+368) (BuildId: 19a960da3412055fc445e984fa2c341b)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #11 pc 00000000000eba6c  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) (BuildId: c559ffcaae00ff3a4812c962353fdf53)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #12 pc 000000000006f718  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+200) (BuildId: a923caae2e75861e7a06a23f740068a5)
11-12 12:35:18.520 28834 28834 F DEBUG   :       #13 pc 0000000000060e00  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: a923caae2e75861e7a06a23f740068a5)