Getting Error “Internal error while creating code interface description file: codeInfo.mat. Aborting code generation. Caused by: Invalid index” during code generation.
古いコメントを表示
I am trying to pass some data between two atomic subsystem using a Bus.
When I am trying to generate the code getting the error “Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Invalid index”.
If I dont use bus and only use outport to directly exchange, then the code generation is not giving any problem. Pleas help.
回答 (3 件)
Dhruv
2023 年 9 月 20 日
0 投票
I understand that you are encountering an error during code generation in Simulink related to an "Invalid index." The issue encountered is a known bug in MATLAB release R2021a. You can find more information about it here: https://in.mathworks.com/support/bugreports/2637595
To address this issue, I recommend updating your MATLAB installation to the latest version, as the bug has been resolved in recent updates.
1 件のコメント
satyam thakur
2023 年 11 月 2 日
0 投票
I am too facing simillar issue using autosar coder in 2022b version simulink ut it goes away if i use ert.tlc.
The error is:
Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
- Index exceeds the number of array elements. Index must not exceed 0.
5 件のコメント
승현
2024 年 4 月 25 日
Hello.
Did you solve this issue??
If you did, Could you share me how to solve this issue?
Thankyou :)
rina wu
2024 年 5 月 6 日
I also facing this issue. Look forward to your answer. Thank you!
Saleh Mirheidari
2024 年 5 月 8 日
I have the same problem with 2023a. Is this bug fixed? What is the workarond? Not using mux is not an option for me as I am dealing with a very large model with a lot of muxed signals
可华
2024 年 7 月 3 日
I also encountered this error in 2022b, I am using ert.tlc

Hope someone finds a solution.
Cornelius
2025 年 8 月 1 日
I had the same issue with Matlab 2024b. Deleting temporary code generation files (slprj, etc.) worked to get rid of the error.
カテゴリ
ヘルプ センター および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!