Status Update
Comments
ks...@google.com <ks...@google.com>
la...@google.com <la...@google.com> #2
thanks for the report. It sounds like the debugger is having problems finding the symbol files from the other projects.
To help us understand the issue, it would be best if you could create a sample test project demonstrating the problem. Could you create a zip with a small test project?
be...@gmail.com <be...@gmail.com> #3
be...@gmail.com <be...@gmail.com> #4
la...@google.com <la...@google.com> #5
la...@google.com <la...@google.com> #6
Jomo: do you have an idea why is this happening?
gf...@google.com <gf...@google.com> #8
1) in app's build.gradle, change dependency to
compile project(path: ':layerlib', configuration: 'debug')
so debug lib build will be used
2) on lib's build.gradle, enable debug version lib to be built and copied (published) to apk
android.publishNonDefault true
added to vulkan validation's layer build:
be...@gmail.com <be...@gmail.com> #9
be...@gmail.com <be...@gmail.com> #10
jo...@google.com <jo...@google.com> #11
xa...@google.com <xa...@google.com> #14
je...@gmail.com <je...@gmail.com> #15
Specifically,
It took me hours of frustration to find this helpful comment. I'm going to open a new bug on Android Studio 3.5.0 accordingly.
Je...@envrmnt.com <Je...@envrmnt.com> #16
em...@google.com <em...@google.com> #17
Thanks for reporting this issue. I am able to reproduce the issue easily.
solodkyy@ Queries for dependent modules returns incorrect results in Chipmunk. Specifically, using the sample project in app
depends on returns empty list, while it should have returned [mylibrary]
.
This causes the following (both P0) problems:
- "Auto" debugger decides to launch Java-only instead of Java+Native
- Native debugger cannot find the debugging symbols of
mylibrary
.
// Note: The links above are Google-internal.
so...@google.com <so...@google.com>
sm...@google.com <sm...@google.com>
em...@google.com <em...@google.com> #18
This issue (about missing debug symbols for library modules) has been fixed and the fix will be included in Chipmunk Patch 2.
ve...@google.com <ve...@google.com> #19
Scenario-1:
1. Release Version abi's are displaying in debug apk too.
Scenario-2:
1. While trying to debug the sample project with breakpoints in both library and app modules , App is crashed with java.lang.UnsatisfiedLinkError
stack trace:
2022-07-27 14:28:20.537 7370-7370/com.example.hellojni E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.hellojni, PID: 7370
java.lang.UnsatisfiedLinkError: dlopen failed: library "libhello-jni.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1656)
at com.example.hellojni.HelloJni.<clinit>(HelloJni.java:59)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3578)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
em...@google.com <em...@google.com> #20
If the issue reproduces in Chipmunk Patch 2, we need more detailed instructions on how to reproduce it. This bug diverged from its original title, so I suggest filing a separate bug, and include full instructions on how to create a project that reproduces it, or even better, attach a project that reproduces the issue (or issues).
Based on my efforts to reproduce using Chipmunk Patch 2, debugging (with app=non-native, lib=native) works, and no UnsatisfiedLinkError
s are observed.
dy...@gmail.com <dy...@gmail.com> #22
dy...@gmail.com <dy...@gmail.com> #23
cl...@gmail.com <cl...@gmail.com> #24
ka...@gmail.com <ka...@gmail.com> #25
Android 13
ka...@gmail.com <ka...@gmail.com> #26
Funtouch os13
Description
Setup. 2 projects `app` project and `libModule`. This bug has 2 parts which I think are related so I'm putting both parts here.
**Part 1:** Can't debug library project, setting breakpoints do not work. And when a segfault happens ndk breaks in "unknown function` and nothing useful can be done.
A workaround solution is in the main project do this:
```
// default config
externalNativeBuild {
cmake {
abiFilters'armeabi-v7a'
arguments "-DANDROID_PLATFORM=android-${platformVersion}",
'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_shared'
}
}
// in android {}
externalNativeBuild {
cmake {
path "../libModule/src/main/cpp/CMakeLists.txt"
}
}
```
and I can debug just fine. So far it's fine. This has the disadvantage of compiling everything twice.
**part 2:** Library project always compiles in the release folder `.externalNativeBuild` regardless what has been specified. Interesting though if I do "Build->build APK" in android studio RC2 it builds the debug build.
Some discussion [here](
Some version specifiers
```
Android Studio 2.2 RC 2
Build #AI-145.3253452, built on September 7, 2016
JRE: 1.8.0_76-release-b03 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
classpath 'com.android.tools.build:gradle:2.2.0-rc2'
compileSdkVersion 24
buildToolsVersion "24.0.2"
cmake {
abiFilters'armeabi-v7a'
arguments "-DANDROID_PLATFORM=android-19",
'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_shared'
}
```
Studio Build: RC2
Version of Gradle Plugin: 2.2.0-rc2
Version of Gradle: 2.14.1
Version of Java: 8
OS: Mac
Steps to Reproduce: make a project with app & module. Module is C++ with cmake. Put breakpoint in C++ code or have C++ code purposely crash. Try debugging. You can't debug.