下面有一个代码会发生0xc0000409这个错误，可以帮我看下哪里容易发生这个错误int ReadModelNum::InferDetectPT(cv::Mat imSrc, stDetectBottomRes* stRes, std::vector<cv::Point2f>& RectCPT, cv::Point2d ImageCpt, int iNumberFlag, int iConfidence, int& iResNum){
	try {
		unsigned char* pi = m_ucInputSrcDevice;
		checkRuntime(cudaMemcpy(pi, imSrc.data, sizeof(unsigned char) * 1 * dt_Param.iSrc_ht * dt_Param.iSrc_wh, cudaMemcpyHostToDevice));
		resizeDevice(dt_Param.stBatchSize, m_ucInputSrcDevice, dt_Param.iSrc_wh, dt_Param.iSrc_ht, dt_fInputResizeDevice, dt_Param.iDst_wh, dt_Param.iDst_ht, 114, Dst2src);
		bgr2rgbDevice(dt_Param.stBatchSize, dt_fInputResizeDevice, dt_Param.iDst_wh, dt_Param.iDst_ht, dt_fInputRGBDevice, dt_Param.iDst_wh, dt_Param.iDst_ht);
		normDevice(dt_Param.stBatchSize, dt_fInputRGBDevice, dt_Param.iDst_wh, dt_Param.iDst_ht, dt_fInputNormDevice, dt_Param.iDst_wh, dt_Param.iDst_ht, dt_Param);
		float* bindings[] = { dt_fInputNormDevice,dt_fOutputSrcDevice };
		dt_Context->executeV2((void**)bindings);
		decodeDevice(dt_Param, dt_fOutputSrcDevice, 5 + dt_Param.NumClass, dt_iTotalObjects, dt_iOutputArea, dt_fOutputObjectsDevice, dt_fOutputObjectsWidth, 300);
		nmsDeviceV1(dt_Param, dt_fOutputObjectsDevice, dt_fOutputObjectsWidth, dt_Param.topK, dt_Param.topK * dt_fOutputObjectsWidth + 1);
		checkRuntime(cudaMemcpy(dt_fOutputObjectsHost, dt_fOutputObjectsDevice, dt_Param.stBatchSize * sizeof(float) * (1 + 7 * dt_Param.topK), cudaMemcpyDeviceToHost));
		int num_boxes = std::min((int)(dt_fOutputObjectsHost)[0], dt_Param.topK);
		int dtNum = 0;
 		for (size_t i = 0; i < num_boxes; i++) {
			if (num_boxes <= 0) {
				dtNum = -1;
				return dtNum;
			}
			float* ptr = dt_fOutputObjectsHost + dt_fOutputObjectsWidth * i + 1;
			int keep_flag = ptr[6];
			if (keep_flag) {
				int left = std::max(int(Dst2src.v0 * ptr[0] + Dst2src.v1 * ptr[1] + Dst2src.v2), 1);// left & top
				int top = std::max(int(Dst2src.v3 * ptr[0] + Dst2src.v4 * ptr[1] + Dst2src.v5), 1);
				int right = std::min(int(Dst2src.v0 * ptr[2] + Dst2src.v1 * ptr[3] + Dst2src.v2), imSrc.cols - 1); // right & bottom
				int bottom = std::min(int(Dst2src.v3 * ptr[2] + Dst2src.v4 * ptr[3] + Dst2src.v5), imSrc.rows - 1);
				int wh = right - left;
				int ht = bottom - top;
				if ((int)ptr[5] < 0 || (int)ptr[5] >=2 || ht <= 0 || wh <= 0 || ht> imSrc.rows || wh > imSrc.cols) {
					continue;
				}
				int iClassID = (int)ptr[5];
				int iConf = ptr[4] * 1000;
				cv::Rect rDetectRect = cv::Rect(left, top, wh, ht);
				if (iConf <= iConfidence) {
					continue;
				}
				if (iClassID != iNumberFlag - 1) {
					continue;
				}
				stRes[dtNum].iClassId = iClassID;
				stRes[dtNum].iConfidence = iConf;
				stRes[dtNum].iX = rDetectRect.x;
				stRes[dtNum].iY = rDetectRect.y;
				stRes[dtNum].iWidth = rDetectRect.width;
				stRes[dtNum].iHeight = rDetectRect.height;
				cv::Point2f cpt = getCenterPoint(cv::Rect(stRes[dtNum].iX, stRes[dtNum].iY,
					stRes[dtNum].iWidth, stRes[dtNum].iHeight));
				if (dtNum <10) {
					modelPt[dtNum].iCenterPointX = cpt.x;
					modelPt[dtNum].iCenterPointY = cpt.y;
				}
				RectCPT.push_back(cpt);
				++dtNum;
			}
		}
		if (iNumberFlag ==1) {
			ninePT_AnalysisRes(stRes,RectCPT,ImageCpt,iResNum/*,imSrc*/);
		}
	}
	catch (const cv::Exception& ex) {
		LogClass::Writelog(ex.what());
		return -1;
	}
	catch (...) {
		return -1;
	}
	return 0;
}