Problem with Saving Matlab Simbio file; Error message states: invalid value for datacache argument

I recently updated my Matlab version from 2022 to 2024b. I opened a sbproj. file that was orginally created from the 2022 version. I tried to save some edits I made in model builder and got a pop up error message that states:
"Error occured while saving project. Invalid value for dataCache argument. Value must be one of these types : struct or char"
In my matlab command window, I got the following messages:
Error in SimBiology.web.projecthandler.saveproject
Error using SimBiology.internal.Project/constructProgramResultsInfo
Invalid value for 'dataCache' argument. Value must be one of these types: 'struct' or 'char'.
Error in SimBiology.internal.Project/set.ProgramResultsInfo
Error in SimBiology.web.projecthandler.saveproject_newCodePath
Error in SimBiology.web.projecthandler.saveproject
Error using SimBiology.internal.Project/constructProgramResultsInfo
Invalid value for 'dataCache' argument. Value must be one of these types: 'struct' or 'char'.
Error in SimBiology.internal.Project/set.ProgramResultsInfo
Error in SimBiology.web.projecthandler.saveproject_newCodePath
Error in SimBiology.web.projecthandler.saveproject
Error using SimBiology.internal.Project/constructProgramResultsInfo
Invalid value for 'dataCache' argument. Value must be one of these types: 'struct' or 'char'.
Error in SimBiology.internal.Project/set.ProgramResultsInfo
Error in SimBiology.web.projecthandler.saveproject_newCodePath
Error in SimBiology.web.projecthandler.saveproject

Answers (2)

Hi, Ebehiremen,
I am sorry that you have encountered this bug while saving your project. This sounds like a bug we have seen when saving projects containing custom programs run in MATLAB versions before R2024a Update 6. The issue should be resolved if you open the project in the Model Analyzer in R2024b, re-run the custom program and re-save the project.
Please reach out with any further questions or concerns.
Priya

1 Comment

Hi Priya,
Thanks for your response and detailed solution. I have multiple programs in model analyzer. How do I know which program is a custom program?

Sign in to comment.

Hi, Ebehiremen,
The Model Analyzer has a Browser in the left panel that lists the project contents, including the programs and their types.
Hope this helps.
Priya

4 Comments

I checked and I do not have any custom program types. When I tried to save in model analyzer, after running one of my programs, I got the following error:
"Error occured while saving project. Invalid field name "Table_Plasma.Drug" specified."
Ebehiremen,
For the first issue re: the dataCache error- would it be possible for you to share the project with me to investigate further? If you cannot share the project publicly, perhaps you would be able to share it by opening a technical support case or by sending it to me directly at pmoorthy at mathworks dot com?
For the second issue re: invalid field names, this sounds like a bug we have seen with some datasheets created before R2023b - specifically the datasheet must be showing simulation results from models with multiple compartments. The workaround for this issue is to either reopen the datasheet or delete it. Datasheets created in R2023b and later will not have this problem.
To easily find all the datasheets, type "datasheet" in the search bar of the browser, and then click on the filter button.
Priya
I deleted the datasheets correspoing to programs. That was able to fix one of the errors.
I am still having the issue with the dataCache so i am not able to save my file. Unfortunately, I am not able to share my project file.
Error using SimBiology.internal.Project/constructProgramResultsInfo
Invalid value for 'dataCache' argument. Value must be one of these types: 'struct' or 'char'.
Error in SimBiology.internal.Project/set.ProgramResultsInfo
Error in SimBiology.web.projecthandler.saveproject_newCodePath
Error in SimBiology.web.projecthandler.saveproject
Ebehiremen,
Could you open a Technical Support case? We can work with you further to debug this issue.
In the meanwhile, can you share this additional information so I can try to reproduce the bug you are describing?
1) What types of programs you have?
2) Do have only LastRun folders or saved program results folders as well?
3) Are any of your LastRun folders empty because of a failed program run? If so, which kind of program?
Priya

Sign in to comment.

Categories

Find more on Historical Contests in Help Center and File Exchange

Products

Release

R2024b

Asked:

on 7 May 2025

Commented:

on 12 May 2025

Community Treasure Hunt

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

Start Hunting!