debug
This commit is contained in:
parent
d1525f6dfa
commit
66788d2f20
|
@ -202,6 +202,12 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
reinterpret_cast<PyArray_SimpleNew_t>(numpyApi_[93]);
|
reinterpret_cast<PyArray_SimpleNew_t>(numpyApi_[93]);
|
||||||
std::cout << " 函数地址: " << (void*)PyArray_SimpleNew << std::endl;
|
std::cout << " 函数地址: " << (void*)PyArray_SimpleNew << std::endl;
|
||||||
|
|
||||||
|
std::cout << "[5.1] 验证函数指针..." << std::endl;
|
||||||
|
void* func_ptr = numpyApi_[93];
|
||||||
|
if (reinterpret_cast<uintptr_t>(func_ptr) < 0x1000) { // 检查是否为合法地址
|
||||||
|
std::cerr << "非法函数指针: " << func_ptr << std::endl;
|
||||||
|
throw std::runtime_error("Invalid PyArray_SimpleNew pointer");
|
||||||
|
}
|
||||||
// 6. 创建NumPy数组
|
// 6. 创建NumPy数组
|
||||||
std::cout << "[6] 创建NumPy数组..." << std::endl;
|
std::cout << "[6] 创建NumPy数组..." << std::endl;
|
||||||
PyObject* pyArray = PyArray_SimpleNew(1, dims, NPY_INT16);
|
PyObject* pyArray = PyArray_SimpleNew(1, dims, NPY_INT16);
|
||||||
|
|
Loading…
Reference in New Issue