Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c++;ios中的分配器错误 我的iPhone应用程序使用的是C++编写的第三方软件。 我收到过许多关于此类堆栈跟踪的错误报告: 0 libsystem_kernel.dylib __pthread_kill + 8 1 libsystem_pthread.dylib pthread_kill + 58 2 libsystem_c.dylib abort + 76 3 libc++abi.dylib abort_message + 74 4 libc++abi.dylib default_terminate_handler() + 198 5 libobjc.A.dylib _objc_terminate() + 228 6 libc++abi.dylib std::__terminate(void (*)()) + 78 7 libc++abi.dylib __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) 8 libc++abi.dylib operator new(unsigned long, std::nothrow_t const&) 9 MyApp new_allocator.h line 91 void std::vector<unsigned char, std::allocator<unsigned char> >::_M_range_insert<char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, char const*, char const*, std::forward_iterator_tag)_C++_Ios - Fatal编程技术网

c++;ios中的分配器错误 我的iPhone应用程序使用的是C++编写的第三方软件。 我收到过许多关于此类堆栈跟踪的错误报告: 0 libsystem_kernel.dylib __pthread_kill + 8 1 libsystem_pthread.dylib pthread_kill + 58 2 libsystem_c.dylib abort + 76 3 libc++abi.dylib abort_message + 74 4 libc++abi.dylib default_terminate_handler() + 198 5 libobjc.A.dylib _objc_terminate() + 228 6 libc++abi.dylib std::__terminate(void (*)()) + 78 7 libc++abi.dylib __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) 8 libc++abi.dylib operator new(unsigned long, std::nothrow_t const&) 9 MyApp new_allocator.h line 91 void std::vector<unsigned char, std::allocator<unsigned char> >::_M_range_insert<char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, char const*, char const*, std::forward_iterator_tag)

c++;ios中的分配器错误 我的iPhone应用程序使用的是C++编写的第三方软件。 我收到过许多关于此类堆栈跟踪的错误报告: 0 libsystem_kernel.dylib __pthread_kill + 8 1 libsystem_pthread.dylib pthread_kill + 58 2 libsystem_c.dylib abort + 76 3 libc++abi.dylib abort_message + 74 4 libc++abi.dylib default_terminate_handler() + 198 5 libobjc.A.dylib _objc_terminate() + 228 6 libc++abi.dylib std::__terminate(void (*)()) + 78 7 libc++abi.dylib __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) 8 libc++abi.dylib operator new(unsigned long, std::nothrow_t const&) 9 MyApp new_allocator.h line 91 void std::vector<unsigned char, std::allocator<unsigned char> >::_M_range_insert<char const*>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char> > >, char const*, char const*, std::forward_iterator_tag),c++,ios,C++,Ios,m_接收的_数据被声明为类型为std::vector 是否有人知道可能存在什么问题或如何解决这个问题? 如果您需要其他信息,请告诉我。非常感谢你的帮助 最可能的原因是在接收错误后,使用无效的pData指针或过多的ndalen…或ndalen

m_接收的_数据被声明为类型为
std::vector

是否有人知道可能存在什么问题或如何解决这个问题?
如果您需要其他信息,请告诉我。非常感谢你的帮助

最可能的原因是在接收错误后,使用无效的
pData
指针或过多的
ndalen
…或
ndalen<0
调用
\OnDataArrival
void FileDownloadClient::__OnDataArrival( const char * pData ,int nDataLen )
{
     ....

     m_received_data.insert(m_received_data.end(),pData,pData+nDataLen); //Offending line that crashes

     ....
}