MATLAB: Am I getting CGIR assertion while building a model for S32K144 EVB using MATLAB R2018b

cgircodegencoderembeddedEmbedded Coderevbs32k144

I have been trying to build a model for S32K144 EVB using MATLAB R2018b and the following is observed:
CGIR assertion 'begin != 0' failed in 'b:\matlab\toolbox\coder\trace\src\trace\traceutil.cpp:302'
[ 0] 0x000000010db4eabf bin\win64\libmwtrace.dll+00191167 mwboost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>+00002783
[ 1] 0x000000010dbf761b bin\win64\libmwtrace.dll+00882203 coder::trace::TraceInfoBuilder::setTraceDelim+00088731
[ 2] 0x000000010dbed8c0 bin\win64\libmwtrace.dll+00841920 coder::trace::TraceInfoBuilder::setTraceDelim+00048448
[ 3] 0x000000010dbcfbf7 bin\win64\libmwtrace.dll+00719863 coder::trace::TraceInfoBuilder::extractTraceInfo+00000263
[ 4] 0x000000010dc16706 bin\win64\libmwtrace.dll+01009414 coder::trace::TraceInfoBuilder::setTraceDelim+00215942
[ 5] 0x0000000036243c60 bin\win64\pgo\mcos_impl.dll+00408672
[ 6] 0x0000000036243232 bin\win64\pgo\mcos_impl.dll+00406066
[ 7] 0x000000003624234b bin\win64\pgo\mcos_impl.dll+00402251
[ 8] 0x0000000036240d12 bin\win64\pgo\mcos_impl.dll+00396562
[ 9] 0x0000000036296f30 bin\win64\pgo\mcos_impl.dll+00749360
[ 10] 0x0000000036493585 bin\win64\pgo\mcos_impl.dll+02831749 mwboost::serialization::singleton_module::unlock+01534417
[ 11] 0x000000003649cf01 bin\win64\pgo\mcos_impl.dll+02871041 mwboost::serialization::singleton_module::unlock+01573709
[ 12] 0x0000000014533655 bin\win64\mcos.dll+00144981 omDirectCallMethod+00000069
[ 13] 0x000000001ee075c2 bin\win64\pgo\libmwlxeindexing.dll+00357826 MathWorks::lxe::MatrixModuleImplementation::SetHeterogeneousArray+00014702
[ 14] 0x000000001ee88936 bin\win64\pgo\libmwlxeindexing.dll+00887094 MathWorks::lxe::assign_paren_shared_xvalue_ptr_uninitialized_to_struct+00006890
[ 15] 0x000000001edbc70f bin\win64\pgo\libmwlxeindexing.dll+00050959 MathWorks::lxe::at_rbrace_nargout+00006831
CGIR assertion 'begin != 0' failed in 'b:\matlab\toolbox\coder\trace\src\trace\traceutil.cpp:302'
[ 0] 0x000000010db4eabf bin\win64\libmwtrace.dll+00191167 mwboost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>+00002783
[ 1] 0x000000010dbf761b bin\win64\libmwtrace.dll+00882203 coder::trace::TraceInfoBuilder::setTraceDelim+00088731
[ 2] 0x000000010dbed8c0 bin\win64\libmwtrace.dll+00841920 coder::trace::TraceInfoBuilder::setTraceDelim+00048448
[ 3] 0x000000010dbcfbf7 bin\win64\libmwtrace.dll+00719863 coder::trace::TraceInfoBuilder::extractTraceInfo+00000263
[ 4] 0x000000010dc16706 bin\win64\libmwtrace.dll+01009414 coder::trace::TraceInfoBuilder::setTraceDelim+00215942
[ 5] 0x0000000036243c60 bin\win64\pgo\mcos_impl.dll+00408672
[ 6] 0x0000000036243232 bin\win64\pgo\mcos_impl.dll+00406066
[ 7] 0x000000003624234b bin\win64\pgo\mcos_impl.dll+00402251
[ 8] 0x0000000036240d12 bin\win64\pgo\mcos_impl.dll+00396562
[ 9] 0x0000000036296f30 bin\win64\pgo\mcos_impl.dll+00749360
[ 10] 0x0000000036493585 bin\win64\pgo\mcos_impl.dll+02831749 mwboost::serialization::singleton_module::unlock+01534417
[ 11] 0x000000003649cf01 bin\win64\pgo\mcos_impl.dll+02871041 mwboost::serialization::singleton_module::unlock+01573709
[ 12] 0x0000000014533655 bin\win64\mcos.dll+00144981 omDirectCallMethod+00000069
[ 13] 0x000000001ee075c2 bin\win64\pgo\libmwlxeindexing.dll+00357826 MathWorks::lxe::MatrixModuleImplementation::SetHeterogeneousArray+00014702
[ 14] 0x000000001ee88936 bin\win64\pgo\libmwlxeindexing.dll+00887094 MathWorks::lxe::assign_paren_shared_xvalue_ptr_uninitialized_to_struct+00006890
[ 15] 0x000000001edbc70f bin\win64\pgo\libmwlxeindexing.dll+00050959 MathWorks::lxe::at_rbrace_nargout+00006831
CGIR assertion 'begin != 0' failed in 'b:\matlab\toolbox\coder\trace\src\trace\traceutil.cpp:302'
[ 0] 0x000000010db4eabf bin\win64\libmwtrace.dll+00191167 mwboost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>+00002783
[ 1] 0x000000010dbf761b bin\win64\libmwtrace.dll+00882203 coder::trace::TraceInfoBuilder::setTraceDelim+00088731
[ 2] 0x000000010dbed8c0 bin\win64\libmwtrace.dll+00841920 coder::trace::TraceInfoBuilder::setTraceDelim+00048448
[ 3] 0x000000010dbcfbf7 bin\win64\libmwtrace.dll+00719863 coder::trace::TraceInfoBuilder::extractTraceInfo+00000263
[ 4] 0x000000010dc16706 bin\win64\libmwtrace.dll+01009414 coder::trace::TraceInfoBuilder::setTraceDelim+00215942
[ 5] 0x0000000036243c60 bin\win64\pgo\mcos_impl.dll+00408672
[ 6] 0x0000000036243232 bin\win64\pgo\mcos_impl.dll+00406066
[ 7] 0x000000003624234b bin\win64\pgo\mcos_impl.dll+00402251
[ 8] 0x0000000036240d12 bin\win64\pgo\mcos_impl.dll+00396562
[ 9] 0x0000000036296f30 bin\win64\pgo\mcos_impl.dll+00749360
[ 10] 0x0000000036493585 bin\win64\pgo\mcos_impl.dll+02831749 mwboost::serialization::singleton_module::unlock+01534417
[ 11] 0x000000003649cf01 bin\win64\pgo\mcos_impl.dll+02871041 mwboost::serialization::singleton_module::unlock+01573709
[ 12] 0x0000000014533655 bin\win64\mcos.dll+00144981 omDirectCallMethod+00000069
[ 13] 0x000000001ee075c2 bin\win64\pgo\libmwlxeindexing.dll+00357826 MathWorks::lxe::MatrixModuleImplementation::SetHeterogeneousArray+00014702
[ 14] 0x000000001ee88936 bin\win64\pgo\libmwlxeindexing.dll+00887094 MathWorks::lxe::assign_paren_shared_xvalue_ptr_uninitialized_to_struct+00006890
[ 15] 0x000000001edbc70f bin\win64\pgo\libmwlxeindexing.dll+00050959 MathWorks::lxe::at_rbrace_nargout+00006831
CGIR assertion 'begin != 0' failed in 'b:\matlab\toolbox\coder\trace\src\trace\traceutil.cpp:302'
[ 0] 0x000000010db4eabf bin\win64\libmwtrace.dll+00191167 mwboost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>+00002783
[ 1] 0x000000010dbf761b bin\win64\libmwtrace.dll+00882203 coder::trace::TraceInfoBuilder::setTraceDelim+00088731
[ 2] 0x000000010dbed8c0 bin\win64\libmwtrace.dll+00841920 coder::trace::TraceInfoBuilder::setTraceDelim+00048448
[ 3] 0x000000010dbcfbf7 bin\win64\libmwtrace.dll+00719863 coder::trace::TraceInfoBuilder::extractTraceInfo+00000263
[ 4] 0x000000010dc16706 bin\win64\libmwtrace.dll+01009414 coder::trace::TraceInfoBuilder::setTraceDelim+00215942
[ 5] 0x0000000036243c60 bin\win64\pgo\mcos_impl.dll+00408672
[ 6] 0x0000000036243232 bin\win64\pgo\mcos_impl.dll+00406066
[ 7] 0x000000003624234b bin\win64\pgo\mcos_impl.dll+00402251
[ 8] 0x0000000036240d12 bin\win64\pgo\mcos_impl.dll+00396562
[ 9] 0x0000000036296f30 bin\win64\pgo\mcos_impl.dll+00749360
[ 10] 0x0000000036493585 bin\win64\pgo\mcos_impl.dll+02831749 mwboost::serialization::singleton_module::unlock+01534417
[ 11] 0x000000003649cf01 bin\win64\pgo\mcos_impl.dll+02871041 mwboost::serialization::singleton_module::unlock+01573709
[ 12] 0x0000000014533655 bin\win64\mcos.dll+00144981 omDirectCallMethod+00000069
[ 13] 0x000000001ee075c2 bin\win64\pgo\libmwlxeindexing.dll+00357826 MathWorks::lxe::MatrixModuleImplementation::SetHeterogeneousArray+00014702
[ 14] 0x000000001ee88936 bin\win64\pgo\libmwlxeindexing.dll+00887094 MathWorks::lxe::assign_paren_shared_xvalue_ptr_uninitialized_to_struct+00006890
[ 15] 0x000000001edbc70f bin\win64\pgo\libmwlxeindexing.dll+00050959 MathWorks::lxe::at_rbrace_nargout+00006831
In the pre-release for MATLAB R2018b it was working fine though.

Best Answer

This is due to a bug in Embedded Coder and the developers are aware of the issue. They are actively working on it and will be fixed in one of our future releases.
Related Question