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

Segmentation fault in Android 34 #65

Open
ChanChunSong opened this issue Sep 30, 2024 · 9 comments
Open

Segmentation fault in Android 34 #65

ChanChunSong opened this issue Sep 30, 2024 · 9 comments

Comments

@ChanChunSong
Copy link

What is the issue or idea you have?
I met Segmentation fault when I run it with Android 34.
And I cannot find the file external/MY_minicap/src/minicap_34.cpp when I want to debug it.
So is it a known issue and how can I get the source code.
Have you tried STF?
NO

@JesseCodeBones
Copy link

Any log from it?

@ChanChunSong
Copy link
Author

$ sh run.sh autosize -t

  • experimental/gradlew -p experimental assembleDebug
    WARNING:The specified Android SDK Build Tools version (30.0.2) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.4.2.
    Android SDK Build Tools 30.0.3 will be used.
    To suppress this warning, remove "buildToolsVersion '30.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 443ms
30 actionable tasks: 30 up-to-date

  • ndk-build NDK_DEBUG=1
    Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-21.
    [armeabi-v7a] Install : minicap => libs/armeabi-v7a/minicap
    [armeabi-v7a] Install : minicap-nopie => libs/armeabi-v7a/minicap-nopie
    [armeabi-v7a] Install : minicap.so => libs/armeabi-v7a/minicap.so
    [arm64-v8a] Install : minicap => libs/arm64-v8a/minicap
    [arm64-v8a] Install : minicap-nopie => libs/arm64-v8a/minicap-nopie
    [arm64-v8a] Install : minicap.so => libs/arm64-v8a/minicap.so
    [x86] Install : minicap => libs/x86/minicap
    [x86] Install : minicap-nopie => libs/x86/minicap-nopie
    [x86] Install : minicap.so => libs/x86/minicap.so
    [x86_64] Install : minicap => libs/x86_64/minicap
    [x86_64] Install : minicap-nopie => libs/x86_64/minicap-nopie
    [x86_64] Install : minicap.so => libs/x86_64/minicap.so
    ++ adb shell getprop ro.product.cpu.abi
    ++ tr -d '\r'
  • abi=arm64-v8a
    ++ adb shell getprop ro.build.version.sdk
    ++ tr -d '\r'
  • sdk=34
    ++ adb shell getprop ro.build.version.preview_sdk
    ++ tr -d '\r'
  • pre=0
    ++ adb shell getprop ro.build.version.release
    ++ tr -d '\r'
  • rel=14
  • [[ -n 0 ]]
  • [[ 0 > 0 ]]
  • (( 34 >= 16 ))
  • bin=minicap
  • apk='app_process /system/bin io.devicefarmer.minicap.Main'
  • args=
  • '[' autosize = autosize ']'
  • set +o pipefail
    ++ adb shell dumpsys window
    ++ grep -Eo 'init=[0-9]+x[0-9]+'
    ++ head -1
    ++ cut -d= -f 2
  • size=1440x3120
  • '[' 1440x3120 = '' ']'
  • args='-P 1440x3120@1440x3120/0'
  • set -o pipefail
  • shift
  • dir=/data/local/tmp/minicap-devel
  • adb shell 'mkdir /data/local/tmp/minicap-devel 2>/dev/null || true'
  • adb push libs/arm64-v8a/minicap /data/local/tmp/minicap-devel
    libs/arm64-v8a/minicap: 1 file pushed, 0 skipped. 386.2 MB/s (618672 bytes in 0.002s)
  • '[' -e jni/minicap-shared/aosp/libs/android-14/arm64-v8a/minicap.so ']'
  • '[' -e jni/minicap-shared/aosp/libs/android-34/arm64-v8a/minicap.so ']'
  • adb push jni/minicap-shared/aosp/libs/android-34/arm64-v8a/minicap.so /data/local/tmp/minicap-devel
    jni/minicap-shared/aosp/libs/android-34/arm64-v8a/minicap.so: 1 file pushed, 0 skipped. 422.3 MB/s (135328 bytes in 0.000s)
  • adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x3120@1440x3120/0 -t
    PID: 16451
    INFO: Using projection 1440x3120@1440x3120/0
    INFO: (external/MY_minicap/src/minicap_34.cpp:394) In Android 34
    INFO: (external/MY_minicap/src/minicap_34.cpp:245) Creating SurfaceComposerClient
    INFO: (external/MY_minicap/src/minicap_34.cpp:248) Performing SurfaceComposerClient init check
    INFO: (external/MY_minicap/src/minicap_34.cpp:259) Creating virtual display
    INFO: (external/MY_minicap/src/minicap_34.cpp:266) Creating buffer queue
    INFO: (external/MY_minicap/src/minicap_34.cpp:269) Setting buffer options
    INFO: (external/MY_minicap/src/minicap_34.cpp:273) Creating CPU consumer
    INFO: (external/MY_minicap/src/minicap_34.cpp:277) Creating frame waiter
    INFO: (external/MY_minicap/src/minicap_34.cpp:281) Publishing virtual display
    Segmentation fault
    --
    That's all of the log in my terminal. Do you need other information?
    If so, please also tell me how to get it

@JesseCodeBones
Copy link

did you change any source for compile?

@ChanChunSong
Copy link
Author

ChanChunSong commented Oct 5, 2024 via email

@JesseCodeBones
Copy link

yeah, there is no 34 version, please use 31 for compile

@ChanChunSong
Copy link
Author

ChanChunSong commented Oct 8, 2024 via email

@JesseCodeBones
Copy link

yes, it need the AOSP source code for so build

@1041371971
Copy link

Hello
I also get the same issue. It shows the "Segmentation fault" when I try to do "adb shell LD_LIBRARY_PATH=.....". My target is Android 34, I tried to compile the 31 and push into my target, but it shows "CANNOT LINK EXECUTABLE "/data/local/tmp/minicap/minicap": cannot locate symbol "_ZN7android2ui4Size7INVALIDE" referenced by "/data/local/tmp/minicap/minicap.so"...".
Any one have fixed this issue in Android 34?

@JesseCodeBones
Copy link

Hello I also get the same issue. It shows the "Segmentation fault" when I try to do "adb shell LD_LIBRARY_PATH=.....". My target is Android 34, I tried to compile the 31 and push into my target, but it shows "CANNOT LINK EXECUTABLE "/data/local/tmp/minicap/minicap": cannot locate symbol "_ZN7android2ui4Size7INVALIDE" referenced by "/data/local/tmp/minicap/minicap.so"...". Any one have fixed this issue in Android 34?

#43
please use this source for compile

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