gpt4 book ai didi

c++ - CGIR 断言 'fitsType()' 失败

转载 作者:太空宇宙 更新时间:2023-11-04 11:35:20 26 4
gpt4 key购买 nike

我有一个 Simulink 模型,我试图将其生成为 C++ dll。我已经成功地编译了类似的模型,但是这个给了我以下错误:

CGIR assertion 'fitsType<size_t>()' failed in 'b:\matlab\derived\win32\src\include\cg_ir\util_prim\../../../../../../src/cg_ir/export/include/cg_ir/util_prim/Size64.hpp:125'
[ 0] 0x5d20bde3 C:\MATLABR2011b_x86\bin\win32\cg_ir.dll+00769507 ( CG::Scope::treeStackSize+000019 )
[ 1] 0x5d200b68 C:\MATLABR2011b_x86\bin\win32\cg_ir.dll+00723816 ( CG::Fcn::stackSize+000024 )
[ 2] 0x590d36e2 C:\MATLABR2011b_x86\bin\win32\cgir_xform.dll+02242274 ( CG::EnforceStackLimit::getFcnStackSize+000034 )
[ 3] 0x590d390a C:\MATLABR2011b_x86\bin\win32\cgir_xform.dll+02242826 ( CG::EnforceStackLimit::initialize_fcn_stack_size_info+000234 )
[ 4] 0x590d42bb C:\MATLABR2011b_x86\bin\win32\cgir_xform.dll+02245307 ( CG::EnforceStackLimit::EnforceStackLimit+000219 )
[ 5] 0x59384cc2 C:\MATLABR2011b_x86\bin\win32\rtwcg.dll+00806082 ( RTWCG::getBlockParameterURLString+004434 )
[ 6] 0x59385e3b C:\MATLABR2011b_x86\bin\win32\rtwcg.dll+00810555 ( RTWCG::getBlockParameterURLString+008907 )
[ 7] 0x593706f1 C:\MATLABR2011b_x86\bin\win32\rtwcg.dll+00722673 ( RTWCG::RTWFcnConst::OptimizeAndEmitCode+007777 )
[ 8] 0x5933085d C:\MATLABR2011b_x86\bin\win32\rtwcg.dll+00460893 ( RTWCG::RTWCGModule::OptimizeAndEmitCode+000125 )
[ 9] 0x5a6f9ecd C:\MATLABR2011b_x86\bin\win32\libmwsimulink.dll+08298189 ( BlockSetCheckVarDimsInputEmpty+066381 )
[ 10] 0x5a6f6f97 C:\MATLABR2011b_x86\bin\win32\libmwsimulink.dll+08286103 ( BlockSetCheckVarDimsInputEmpty+054295 )
[ 11] 0x5a74aa02 C:\MATLABR2011b_x86\bin\win32\libmwsimulink.dll+08628738 ( sleGetRTWBlockForSLBlock+262210 )
[ 12] 0x5a74af9f C:\MATLABR2011b_x86\bin\win32\libmwsimulink.dll+08630175 ( sleGetRTWBlockForSLBlock+263647 )
[ 13] 0x5a23b9c5 C:\MATLABR2011b_x86\bin\win32\libmwsimulink.dll+03324357 ( ArrayToSLObject+481685 )
[ 14] 0x025dea8c C:\MATLABR2011b_x86\bin\win32\m_dispatcher.dll+00060044 ( mdLogging::log_function_exit+000108 )
[ 15] 0x025de561 C:\MATLABR2011b_x86\bin\win32\m_dispatcher.dll+00058721 ( Mfunction_handle::dispatch+000401 )
### Build procedure for model: 'vcts_auxiSns' aborted due to an error.

我还在对话框中收到以下错误消息:

Unexpected or internal error encountered in "in CGIR: b:\matlab\derived\win32\src\include\cg_ir\util_prim\../../../../../../src/cg_ir/export/include/cg_ir/util_prim/Size64.hpp line 125: fitsType<size_t>()
". Please report this to MathWorks if you can cause it to recur

更新:

我现在已经定位到问题了,好像是某个信号有问题。下图显示了一个子系统的一小部分,只要允许红色框中三个信号中的一个流动,模型就无法生成代码。一旦我破坏所有三个信号,代码生成就会开始。

Part of the model where the error arise不幸的是,我没能解决这个问题,所以我仍然渴望听到任何和所有的建议!

最佳答案

事实证明这是 Matlab 2011b 代码生成中信号传播的一个错误。根据 Mathworks 的说法,它在 2012a 及以后得到解决,所以我更新到 2013b。现在我不再收到该错误。

关于c++ - CGIR 断言 'fitsType<size_t>()' 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23220299/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com