Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Aborted" error on custom build of scrcpy on Fedora 31 GNOME X.org (ADB Over Wifi) #953

Closed
cyfrost opened this issue Nov 26, 2019 · 8 comments

Comments

@cyfrost
Copy link

cyfrost commented Nov 26, 2019

Hi,

I've followed the build instructions from the README.md of this project and successfully built and installed scrcpy on my Fedora 31 Workstation running GNOME 3.34 on X.org.

My device is a Asus Zenfone Max Pro M1 running LineageOS 16 (Android 9 Pie) official build. I've enabled ADB Over Wifi under development settings and connected my laptop using adb connect <android_ip>:5555. The connection was successful and I was able to do adb logcat and stuff.

I run scrcpy on my laptop and it fails with the Aborted error immediately after launch like this:

image

Here is the relevant part of adb logcat debugging:

11-26 21:36:05.547  3815  3815 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
11-26 21:36:05.664  3815  3815 E appproc : ERROR: could not find class 'com.genymobile.scrcpy.Server'
11-26 21:36:05.665  3815  3815 F app_process: thread.cc:2148] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.genymobile.scrcpy.Server" on path: DexPathList[[directory "/data/local/tmp/scrcpy-server"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
11-26 21:36:05.665  3815  3815 F app_process: thread.cc:2148]   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
11-26 21:36:05.665  3815  3815 F app_process: thread.cc:2148]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
11-26 21:36:05.665  3815  3815 F app_process: thread.cc:2148]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
11-26 21:36:05.665  3815  3815 F app_process: thread.cc:2148] 
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] Runtime aborting...
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] Dumping all threads without appropriate locks held: thread list lock
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] All threads:
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] DALVIK THREADS (7):
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] "main" prio=5 tid=1 Runnable
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | group="" sCount=0 dsCount=0 flags=0 obj=0x12c01f88 self=0x7634614c00
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | sysTid=3815 nice=0 cgrp=default sched=0/0 handle=0x76ba0af548
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | state=R schedstat=( 392359785 3940678 44 ) utm=28 stm=11 core=4 HZ=100
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | stack=0x7ffa9c8000-0x7ffa9ca000 stackSize=8MB
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | held mutexes= "abort lock" "mutator lock"(shared held)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #00 pc 00000000003c8d44  /system/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+220)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #01 pc 0000000000498c10  /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+352)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #02 pc 00000000004b2a24  /system/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+828)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #03 pc 00000000004ab7a0  /system/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+476)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #04 pc 00000000004aa9dc  /system/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+500)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #05 pc 000000000046d8e0  /system/lib64/libart.so (art::Runtime::Abort(char const*)+392)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #06 pc 0000000000008d08  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+720)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #07 pc 000000000049de14  /system/lib64/libart.so (art::Thread::AssertNoPendingException() const+1140)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #08 pc 000000000011ca14  /system/lib64/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+64)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #09 pc 000000000032ef88  /system/lib64/libart.so (art::JNI::FindClass(_JNIEnv*, char const*)+1424)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #10 pc 00000000000023f8  /system/lib64/libnativehelper.so (jniRegisterNativeMethods+60)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #11 pc 00000000000b4be4  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::startReg(_JNIEnv*)+112)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #12 pc 00000000000b4870  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+336)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #13 pc 000000000000219c  /system/bin/app_process64 (main+1200)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #14 pc 00000000000b184c  /system/lib64/libc.so (__libc_init+88)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   (no managed stack frames)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] 
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558] "Jit thread pool worker thread 0" prio=5 tid=2 Native
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | group="" sCount=1 dsCount=0 flags=1 obj=0x12c40030 self=0x762de0d000
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | sysTid=3816 nice=9 cgrp=default sched=0/0 handle=0x762e24a4f0
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | state=S schedstat=( 1830884 1361459 2 ) utm=0 stm=0 core=0 HZ=100
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | stack=0x762e14c000-0x762e14e000 stackSize=1021KB
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   | held mutexes=
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   kernel: (couldn't read /proc/self/task/3816/stack)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #00 pc 000000000001eeec  /system/lib64/libc.so (syscall+28)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #01 pc 00000000000d72a8  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
11-26 21:36:05.710  3815  3815 F app_process: runtime.cc:558]   native: #02 pc 00000000004b4278  /system/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+260)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558]   (no managed stack frames)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558] Pending exception java.lang.ClassNotFoundException: Didn't find class "com.genymobile.scrcpy.Server" on path: DexPathList[[directory "/data/local/tmp/scrcpy-server"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558]   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:558] 
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.genymobile.scrcpy.Server" on path: DexPathList[[directory "/data/local/tmp/scrcpy-server"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566]   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566] 
11-26 21:36:05.711  3815  3815 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 3815 (main), pid 3815 (main)
11-26 21:36:05.711  3815  3815 F app_process: runtime.cc:566] 
11-26 21:36:05.800  3824  3824 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
11-26 21:36:05.800   937   937 I /system/bin/tombstoned: received crash request for pid 3815
11-26 21:36:05.802  3824  3824 I crash_dump64: performing dump of process 3815 (target tid = 3815)
11-26 21:36:05.816  3824  3824 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-26 21:36:05.817  3824  3824 F DEBUG   : LineageOS Version: '16.0-20191123-NIGHTLY-X00TD'
11-26 21:36:05.817  3824  3824 F DEBUG   : Build fingerprint: 'asus/WW_X00TD/ASUS_X00T_3:9/PKQ1/16.2017.1903.050-20190401:user/release-keys'
11-26 21:36:05.817  3824  3824 F DEBUG   : Revision: '0'
11-26 21:36:05.817  3824  3824 F DEBUG   : ABI: 'arm64'
11-26 21:36:05.817  3824  3824 F DEBUG   : pid: 3815, tid: 3815, name: main  >>> app_process <<<
11-26 21:36:05.817  3824  3824 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-26 21:36:05.817  3824  3824 F DEBUG   : Abort message: 'thread.cc:2148] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.genymobile.scrcpy.Server" on path: DexPathList[[directory "/data/local/tmp/scrcpy-server"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]'
11-26 21:36:05.817  3824  3824 F DEBUG   :     x0  0000000000000000  x1  0000000000000ee7  x2  0000000000000006  x3  0000000000000008
11-26 21:36:05.817  3824  3824 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000080808080
11-26 21:36:05.817  3824  3824 F DEBUG   :     x8  0000000000000083  x9  42e3abcc26f1f61c  x10 fffffff87ffffbdf  x11 fffffffc7ffffbdf
11-26 21:36:05.817  3824  3824 F DEBUG   :     x12 0101010101010101  x13 0000000000000020  x14 ffffffffffffffff  x15 0029f444b1ffd6fd
11-26 21:36:05.817  3824  3824 F DEBUG   :     x16 00000076b932f2a8  x17 00000076b926d4dc  x18 0000007ffb1c3580  x19 0000000000000ee7

Can you tell me why this has happened and possibly how to fix it? Thanks!

@rom1v
Copy link
Collaborator

rom1v commented Nov 26, 2019

Does it work with v1.10 or dev branch?

Might be related to #944 (but maybe not).

@rom1v
Copy link
Collaborator

rom1v commented Nov 27, 2019

Oh, in fact it's #268 !

@cyfrost
Copy link
Author

cyfrost commented Nov 27, 2019

Thanks for the hint to try out dev branch, it actually worked!

So compiling and running the binaries from dev branch sources worked flawlessly, I don't understand what's so radically different between them but will stick with these binaries until a new release is out!

Thanks @rom1v !

@cyfrost cyfrost closed this as completed Nov 27, 2019
@rom1v
Copy link
Collaborator

rom1v commented Nov 27, 2019

Thanks for the hint to try out dev branch, it actually worked!

That's just a side-effect.

The real cause is probably that in /data/local/tmp you have a folder named scrcpy-server (not a file). It is not a problem on dev since it now uses scrcpy-server.jar on the device-side (83ace84).

See #268.

So if you adb shell rm -rf /data/local/tmp/scrcpy-server, v1.10 should work too.

@cyfrost
Copy link
Author

cyfrost commented Nov 27, 2019

Oh you might be totally on spot there because I do remember seeing scrcpy-server as a folder and I wondered if that's the way it should be (instead of a jar file). Then I tried different things and ultimately messed up the setup before finally raising this issue but I can see why this would happen. Anyway, since you already are aware of this it's no big deal :)

@rom1v
Copy link
Collaborator

rom1v commented Nov 27, 2019

If you're interested in fixing the problem: #956 😉

@theotheroracle
Copy link

i had a similar issue, but got a different error

12-02 17:14:10.993 F/art (25609): art/runtime/utils.cc:1304] Check failed: '.' == odex_location[dot_index] ('.'=., odex_location[dot_index]=r) /data/local/tmp/scrcpy-server

it just said aborted in the output. should i make a separate issue?

@rom1v
Copy link
Collaborator

rom1v commented Dec 3, 2019

@SaturnSoftware See #944.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants