各位大神,请教一个问题,我在AS下编写C的so库,后来添加了一个依赖库C++的so库,因为调用关系,后来我这边的文件全部改成cpp格式,但是在调用函数时候,出现下面的错误,不定时,不定期,也不是具体的接口导致,也不知道哪里的问题,会使程序崩溃,出现如下错误,请教一个各位,知道的麻烦能不吝赐教A/libc: /usr/local/google/buildbot/src/android/ndk-release-r19/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >" failed
Fatal signal 6 (SIGABRT) at 0x000030b3 (code=-6), thread 12481 (Thread-261)
Fatal signal 6 (SIGABRT) at 0x000030b3 (code=-6), thread 12481 (Thread-261)
异常函数加下面的代码,会有日志出来
if (env->ExceptionOccurred()) {
env->ExceptionDescribe(); // writes to logcat
env->ExceptionClear();
}
谢谢你的回答,你这个打印不出来东西因为我这边是底层是调用C++编写的so库,这个库用来string这个数据类型,我平台运行的时候依赖和调用的系统libc这个库抛出异常了