- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我在 android 8.1.0 中遇到了 opensl es 崩溃。
相关代码:
TEResult SLESAudioEngine::release(TEMsg *pMsg) {
TEResult ret;
SLuint32 playState = 0;
(*bqPlayerPlay)->GetPlayState(bqPlayerPlay, &playState);
LOGE(LOG_TAG, "%s, %d, %d", __FUNCTION__, __LINE__, playState);
if (bqPlayerPlay != nullptr) {
SLresult slRet = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_STOPPED);
if (slRet != SL_RESULT_SUCCESS) {
LOGE(LOG_TAG, "%s,%d SetPlayState failed %d", __FUNCTION__, __LINE__, ret);
return slRet;
}
bqPlayerPlay = nullptr;
}
if (bqPlayerBufferQueue != nullptr) {
SLresult slRet = (*bqPlayerBufferQueue)->Clear(bqPlayerBufferQueue);
if (slRet != SL_RESULT_SUCCESS) {
LOGE(LOG_TAG, "GetInterface BufferQueueItf failed %d", ret);
return slRet;
}
bqPlayerBufferQueue = nullptr;
}
if (bqPlayerObject != nullptr) {
(*bqPlayerObject)->Destroy(bqPlayerObject);
bqPlayerObject = nullptr;
}
if (outputMixObject != NULL) {
(*outputMixObject)->Destroy(outputMixObject);
outputMixObject = NULL;
}
LOGE(LOG_TAG, "%s %d Destroy", __FUNCTION__, __LINE__);
// destroy engine object, and invalidate all associated interfaces
if (engineObject != NULL) {
(*engineObject)->Destroy(engineObject);
engineObject = NULL;
}
return ret;
}
相关日志:
11-05 15:17:58.270 F/DEBUG ( 5887): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-05 15:17:58.270 F/DEBUG ( 5887): Build fingerprint: 'vivo/PD1806/PD1806:8.1.0/OPM1.171019.019/compil08312141:user/release-keys'
11-05 15:17:58.270 F/DEBUG ( 5887): Revision: '0'
11-05 15:17:58.270 F/DEBUG ( 5887): ABI: 'arm'
11-05 15:17:58.270 F/DEBUG ( 5887): pid: 5609, tid: 5835, name: jerikc.demo.app >>> com.jerikc.demo.app <<<
11-05 15:17:58.270 F/DEBUG ( 5887): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
11-05 15:17:58.270 F/DEBUG ( 5887): Cause: null pointer dereference
11-05 15:17:58.270 F/DEBUG ( 5887): r0 fffffffe r1 00000000 r2 c164d407 r3 f18e1e30
11-05 15:17:58.270 F/DEBUG ( 5887): r4 00002282 r5 f18e1da9 r6 f3e66dfc r7 00000000
11-05 15:17:58.270 F/DEBUG ( 5887): r8 f3a66704 r9 000015e9 sl d148808d fp ced2aa80
11-05 15:17:58.270 F/DEBUG ( 5887): ip 00000001 sp c9b95550 lr f18e1e07 pc f3dd0482 cpsr 880f0030
11-05 15:17:58.310 F/DEBUG ( 5887):
11-05 15:17:58.310 F/DEBUG ( 5887): backtrace:
11-05 15:17:58.310 F/DEBUG ( 5887): #00 pc 000bc482 /system/lib/libandroid_runtime.so (android::proxy_cleanup(void const*, void*, void*)+65)
11-05 15:17:58.310 F/DEBUG ( 5887): #01 pc 00040787 /system/lib/libbinder.so (android::BpBinder::ObjectManager::kill()+30)
11-05 15:17:58.310 F/DEBUG ( 5887): #02 pc 00040745 /system/lib/libbinder.so (android::BpBinder::ObjectManager::~ObjectManager()+4)
11-05 15:17:58.310 F/DEBUG ( 5887): #03 pc 000410b9 /system/lib/libbinder.so (android::BpBinder::~BpBinder()+124)
11-05 15:17:58.310 F/DEBUG ( 5887): #04 pc 00041125 /system/lib/libbinder.so (android::BpBinder::~BpBinder()+12)
11-05 15:17:58.310 F/DEBUG ( 5887): #05 pc 00040547 /system/lib/libbinder.so (android::BpRefBase::~BpRefBase()+46)
11-05 15:17:58.310 F/DEBUG ( 5887): #06 pc 00004633 /system/lib/libaudiomanager.so (_ZTv0_n12_N7android14BpAudioManagerD0Ev+22)
11-05 15:17:58.310 F/DEBUG ( 5887): #07 pc 0000dc5f /system/lib/libwilhelm.so (android::sp<android::TrackPlayerBase>::clear()+18)
11-05 15:17:58.310 F/DEBUG ( 5887): #08 pc 00016a2f /system/lib/libwilhelm.so (CEngine_Destroy(void*)+198)
11-05 15:17:58.310 F/DEBUG ( 5887): #09 pc 0001b975 /system/lib/libwilhelm.so (IObject_Destroy(SLObjectItf_ const* const*)+204)
11-05 15:17:58.310 F/DEBUG ( 5887): #10 pc 001c197f /data/app/com.jerikc.demo.app-4ZSXR9PUHNOeJT-UudwsOQ==/lib/arm/libaudioenginedemo.so (SLESAudioEngine::release(TEMsg*)+486)
11-05 15:17:59.130 V/AudioFlinger( 1002): 5609 died, releasing its sessions
最佳答案
将 OpenSL 代码移至单独的线程后遇到同样的问题。幸运的是,Android OS sources给出了一个快速的答案:
static void proxy_cleanup(const void* id, void* obj, void* cleanupCookie)
{
android_atomic_dec(&gNumProxyRefs);
JNIEnv* env = javavm_to_jnienv((JavaVM*)cleanupCookie);
env->DeleteGlobalRef((jobject)obj);
}
长话短说,OpenSLES 引擎现在由 Java 对象支持,因此它需要有效的 JavaVM 引用才能运行。这基本上意味着,它应该从 JVM 附加线程创建(不确定破坏,但我猜 cleanupCookie
是出于某种原因传递的)。
关于android - 销毁引擎对象时如何避免android opensl es崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53150086/
以下代码: if (!(ep = engOpen("\0"))) { fprintf(stderr, "\nCan't start MATLAB engine\n");
我在谈论一些网络事物,例如 http://uservoice.com/ 你能推荐任何其他类似的服务、网站,或者可能是(甚至更好)一个现成的引擎来部署在自己的服务器上? 实际上,更多关于系统的问题,可以
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我正在寻找一个矩阵表达式解析器/引擎。例如, 3 * A + B * C 其中 A、B、C 是矩阵是一个典型的表达式。这应该类似于(单值)数学表达式解析器/引擎,但应该处理矩阵值和变量。我已经用谷歌搜
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 5年前关闭。 Improve this qu
是否有基于 .net 的 cometd 引擎?比如 Ajax 推送引擎 那是免费和开源的吗? 最佳答案 轨道式 Orbited是一个 HTTP 守护进程,针对长期 cometd 连接进行了优化。它旨在
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我正在寻找支持以下功能的 haml javascript“端口”: 存储在文件中的模板。 JSON 输入。 支持“集合”[{Booking},{Booking},{Booking}] 进行迭代处理。
我在 IronPython 中托管 IronPython。我没有找到使用等效的命令行参数初始化它的方法:-X:FullFrames . 我的代码有点像这样: import clr clr.AddRef
我想将我工作的公司的所有松散信息整合到一个知识库中。 Wiki 似乎是一种可行的方法,但大部分相关信息都隐藏在 PST 文件中,并且需要很长时间才能说服人们将他们的电子邮件(包括附件)手动翻译成 Wi
我已经使用缓存的 flutter 引擎 flutter 到现有的 native 应用程序(添加到应用程序)中。 override fun onCreate(savedInstanceState: Bu
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我正在使用 Django Cassandra我已经定义了我的模型,我可以用它来命名一个表: class Meta: db_table = "table_name" 但是,Cassand
类似于 NoSQL 数据库,但适用于 OLAP。当然是开源的:) 编辑: OLAP 引擎在幕后使用关系数据库。例如 SAPBW 可以使用 Oracle 等。我的意思是一个没有这个底层关系数据库的 OL
我正在使用以下片段来 enable Razor templating in my solution (在 ASP.NET MVC3 之外)。是否可以轻松实现布局? 背景资料: 我在这一点上(模板编译成
我们目前使用闭源知识库解决方案,所见即所得创建文章是TinyMCE(看起来可能是修改/简化的)。 他们目前根本不允许更改它(添加插件等,除非您可以以某种方式注入(inject)插件)。 我确实拥有对
我正在评估我们的高性能电信应用程序的 BPEL 引擎,但性能似乎很差。我们评估了 Apache Ode、SunBPEL 引擎、Active BPEL 等。您知道任何更快的 BPEL 引擎实现或 C/C
Elastic / Lucene真的需要在文档中存储所有索引数据吗?您难道不就通过通过传递数据,以便Lucene may index the words into its hash table并为每个
我是 3D 游戏新手?我正在使用 Libgdx。如何计算像 Tetromino Revolution 游戏这样的透视相机的参数?请给我任何想法。 看图片:http://www.terminalstud
我是一名优秀的程序员,十分优秀!