CGIR断言&#39; fitsType <size_t>()&#39;失败</为size_t>

时间:2014-04-22 12:56:26

标签: c++ matlab simulink

我有一个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 不幸的是,我无法解决问题,所以我仍然渴望听到任何建议!

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

事实证明,如果它给你这种错误,你要做的就是删除文件夹slprj和&#34; programName_etl_hrt&#34;您编译或尝试编译的文件夹,它不再为您提供该错误。

我有几次出现此错误,您只需要删除这些文件夹,不要担心simulink会再次为您重新生成