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

24 vues (au cours des 30 derniers jours)
Daniel Ajuzie
Daniel Ajuzie le 11 Nov 2021
Réponse apportée : Satwik le 21 Mai 2024
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 commentaires
Ahmed Fahmy
Ahmed Fahmy le 8 Sep 2023
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 le 8 Sep 2023
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.

Connectez-vous pour commenter.

Réponses (1)

Satwik
Satwik le 21 Mai 2024
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.

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by