Time object cannot be empty (Simulink coder problem during build)

21 views (last 30 days)
Hello Experts,
I hope you all doing well. I am facing a problem during a simulink model build process. I am getting an error called "Time object cannot be empty". I have tried to find solution in different ways but no luck till now. If anyone already knows the cause/solution of the problem, please let me know.
Thank you in advance.
kind regards
Onkar Vader

Answers (1)

Naga
Naga on 12 Mar 2025
Hello Onkar,
This issue might be due to the presence of a secondary 'codeInfo.mat' file in your MATLAB path. To address this, you can check for multiple instances of this file by executing the following command:
>> which codeInfo.mat -all
If you find more than one 'codeInfo.mat' file, remove the one that is not related to your current model from the path.
If this doesn't resolve the issue, you can try restoring the default MATLAB path with these commands:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
Before running these commands, it might be wise to save your current path settings. For more detailed troubleshooting tips, you can refer to the MATLAB Answers post How can I perform initial troubleshooting of MATLAB or Simulink errors?

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!