Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ISSUE-023

CRIWARE多线程死锁问题

常见表现

加载过程中卡死,程序转圈无响应。

原因分析

CRIWARE启用SonicSYNC后出问题。

解决方法

写入补丁,初始化CRIWARE时不要启用SonicSYNC。

案例一(CRIWARE C/C++ Native版本):

查找字符串The linked library version is more recent than CRI Atom Ex header version,所在函数即为criAtomEx_global.ocriAtomEx_CalculateWorkSizeInternal函数,其中thread_model控制是否启用SonicSYNC。

typedef struct CriAtomExConfigTag {
	int thread_model;
	// ...
} CriAtomExConfig;

typedef struct CriAtomExConfigTag_IOS {
	CriAtomExConfig         atom_ex;
	CriAtomExAsrConfig      asr;
	CriAtomExHcaMxConfig    hca_mx;
	// ...
} CriAtomExConfig_IOS;

int criAtomEx_CalculateWorkSizeInternal(CriAtomExConfig_IOS *config, void *a2) {
	if (config) {
		// 必定进入此分支
		// ...
	} else {
		// ...
	}
}

把 if 判断的CBZ指令改成STR WZR, [X0],即可将thread_model改为0,从而不启用SonicSYNC。

案例二(CRIWARE Unity版本):

TODO