Caught "std::exception" Exception message is: foundation​::storage:​:vfs::Exce​ption

32 次查看(过去 30 天)
I have this error code showing up whenever I start my simulation:
Caught "std::exception" Exception message is:foundation::storage::vfs::Exception
Yes I use file functionality in my script and I have tried MATLABr2020a,b, MATLABr2021a,b and it still shows up. What could be the issue? I am basically running the same code like 200,000 times to optimize my function. Each time, a worker opens a file with a file id, saves something in it and closes it while another worker does the same thing but in another MATLAB environment. I have been doing this without issue until recently.
Is there a solution to this? Caught "std::exception" Exception message is:foundation::storage::vfs::Exception
Please I would appreciate the help.
  2 个评论
Ahmed Fahmy
Ahmed Fahmy 2023-9-8
I got the same issue. I even tried to restore an older version of the model and still got this issue. Any help is appreciated .
Ahmed Fahmy
Ahmed Fahmy 2023-9-8
I ended up recloning the git repository in another workarea and finally I was able to open the model. Then I copied over the latest model from the old workarea into the newer one. And luckily it worked too. So for me it seems that the old workarea now has some sort of curse.

请先登录,再进行评论。

回答(1 个)

Satwik
Satwik 2024-5-21
Hi,
The exception ‘foundation::storage::vfs::Exception’ occurs when the script tries to access a directory that is either unavailable due to incorrect permissions (protected) or does not exist because of an erroneous path. The file provider in the VFS leverages ‘fl::filesystem::upath_directory_iterator’ to navigate directories, and it is designed to throw an exception under these circumstances.
To prevent this from happening, you may check the folders being accessed by the script to ensure that they exist and have the correct permissions.

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by