Embedded Coder Error: Number of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that these arrays have the same set of fields.

조회 수: 11 (최근 30일)
I've created a mock empty model that captures an error I am getting on my real working model. Despite having almost empty code-generation products, I get the following error when I try to Build my "ExampleModel":
Number of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that these arrays have the same set of fields.
Here are my current versions for the products I am using:
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.2.0.538062 (R2017a)
MATLAB License Number: 880864
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 14393)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.2 (R2017a)
Simulink Version 8.9 (R2017a)
Control System Toolbox Version 10.2 (R2017a)
Embedded Coder Version 6.12 (R2017a)
MATLAB Coder Version 3.3 (R2017a)
Simulink 3D Animation Version 7.7 (R2017a)
Simulink Coder Version 8.12 (R2017a)
MEX configured to use 'Microsoft Visual C++ 2015 Professional (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
Any help would be greatly appreciated!

답변 (1개)

Nick Sarnie
Nick Sarnie 2017년 9월 6일
편집: Nick Sarnie 2017년 9월 6일
Hi Bryan,
This error is a bug in Embedded Coder R2017a that occurs when the "Show code metrics" option listed in Configuration Parameters>Code Generation>Report is checked, and a model reference block has no generated code associated with it.
There is a patch available to fix this issue, with installation instructions, located here: https://www.mathworks.com/support/bugreports/1588837
If you cannot apply the patch, a workaround is to add an input and output port, and feed the signal directly through, to force the model references to generate code.
  댓글 수: 2
Bryan Rogler
Bryan Rogler 2017년 9월 6일
Hi Nick,
Thanks for response. After installing the update I receive the following errors when I try to define an enumeration in MATLAB:
MATLAB crash file:C:\Users\<user_name>\AppData\Local\Temp\matlab_crash_dump.13500-1:
------------------------------------------------------------------------
Assertion detected at Wed Sep 06 08:16:14 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Default Encoding : windows-1252
Deployed : false
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce 8400GS Version 21.21.13.4201
Host Name : <host_name>
MATLAB Architecture : win64
MATLAB Entitlement ID: 1510044
MATLAB Root : C:\Program Files\MATLAB\R2017a
MATLAB Version : 9.2.0.538062 (R2017a)
OpenGL : hardware
Operating System : Microsoft Windows 10 Pro
Processor ID : x86 Family 6 Model 94 Stepping 3, GenuineIntel
Virtual Machine : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 10.0 (Build 14393)
Fault Count: 1
Assertion:
This application failed to start because it could not find or load the Qt platform plugin "windows".
Reinstalling the application may fix this problem.
Register State (captured):
RAX = 00000000106c23e8 RBX = 00000000106c23e8
RCX = 000000032042e4b0 RDX = 0000000000000000
RSP = 000000032042e430 RBP = 0000000000000000
RSI = 00000000106c23e8 RDI = 0000000000000000
R8 = 0000000000000000 R9 = 00007ffe2acd0000
R10 = 00000000106b240d R11 = 00000000106b240d
R12 = 0000000000000000 R13 = 000000032042eaf0
R14 = 00000000106b2318 R15 = 00000000106c2368
RIP = 00000000104eaa9a EFL = 00000206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (captured):
[ 0] 0x00000000104e4fc3 bin\win64\libmwfl.dll+00085955 fl::diag::thread_context::unspecified_bool+00000051
[ 1] 0x00000000104e3718 bin\win64\libmwfl.dll+00079640 fl::diag::stacktrace_base::capture+00000024
[ 2] 0x00000000104e6b5a bin\win64\libmwfl.dll+00093018 fl::diag::symbols::getSymbolAddress+00006490
[ 3] 0x00000000104e63a7 bin\win64\libmwfl.dll+00091047 fl::diag::symbols::getSymbolAddress+00004519
[ 4] 0x00000000104ea4e8 bin\win64\libmwfl.dll+00107752 fl::diag::terminate+00000072
[ 5] 0x000000003aafc345 bin\win64\glee.dll+00705349 GLEE::lookup+00007205
[ 6] 0x00000000a32d1665 C:\Program Files\MATLAB\R2017a\bin\win64\Qt5CoreMW.dll+00136805 MW_QT::qt_message_output+00000277
[ 7] 0x00000000a32d152f C:\Program Files\MATLAB\R2017a\bin\win64\Qt5CoreMW.dll+00136495 MW_QT::qt_logging_to_console+00000143
[ 8] 0x00000000a32cfc97 C:\Program Files\MATLAB\R2017a\bin\win64\Qt5CoreMW.dll+00130199 MW_QT::QMessageLogger::fatal+00000071
[ 9] 0x00007ffe16b8bce7 C:\Program Files\MATLAB\R2017a\bin\win64\Qt5GuiMW.dll+00179431 MW_QT::QGuiApplicationPrivate::init+00005111
[ 10] 0x00007ffe16b8973e C:\Program Files\MATLAB\R2017a\bin\win64\Qt5GuiMW.dll+00169790 MW_QT::QGuiApplicationPrivate::createPlatformIntegration+00001358
[ 11] 0x00007ffe16b8906b C:\Program Files\MATLAB\R2017a\bin\win64\Qt5GuiMW.dll+00168043 MW_QT::QGuiApplicationPrivate::createEventDispatcher+00000027
[ 12] 0x00000000a34511d0 C:\Program Files\MATLAB\R2017a\bin\win64\Qt5CoreMW.dll+01708496 MW_QT::QCoreApplication::init+00000240
[ 13] 0x00000000a344f031 C:\Program Files\MATLAB\R2017a\bin\win64\Qt5CoreMW.dll+01699889 MW_QT::QCoreApplication::QCoreApplication+00000049
[ 14] 0x00007ffe16b8704f C:\Program Files\MATLAB\R2017a\bin\win64\Qt5GuiMW.dll+00159823 MW_QT::QGuiApplication::QGuiApplication+00000015
[ 15] 0x00000000a378e1dc C:\Program Files\MATLAB\R2017a\bin\win64\Qt5WidgetsMW.dll+00057820 MW_QT::QApplication::QApplication+00000076
[ 16] 0x000000003aaf0efe bin\win64\glee.dll+00659198 GLIMReentrancyProtector::GLIMReentrancyProtector+00000126
[ 17] 0x000000003ab5b029 bin\win64\glee.dll+01093673 GuiObject::scheduleDelete+00095945
[ 18] 0x000000003ab5a9ad bin\win64\glee.dll+01092013 GuiObject::scheduleDelete+00094285
[ 19] 0x00007ffe2b1bd24c C:\Program Files\MATLAB\R2017a\bin\win64\MSVCP120.dll+00250444 std::_Pad::_Release+00000108
[ 20] 0x00007ffe2acf4f7f C:\Program Files\MATLAB\R2017a\bin\win64\MSVCR120.dll+00151423 beginthreadex+00000263
[ 21] 0x00007ffe2acf5126 C:\Program Files\MATLAB\R2017a\bin\win64\MSVCR120.dll+00151846 endthreadex+00000402
[ 22] 0x00007ffe3bed8364 C:\WINDOWS\System32\KERNEL32.DLL+00033636 BaseThreadInitThunk+00000020
[ 23] 0x00007ffe3c747091 C:\WINDOWS\SYSTEM32\ntdll.dll+00422033 RtlUserThreadStart+00000033
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.
Nick Sarnie
Nick Sarnie 2018년 1월 5일
Hi Bryan,
Please make a technical support case if you are still running into this issue.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by