MATLAB Runtime Error " Can’t find the resource file ‘toolbox\local\hgrc.m’ " when using Program E-SURGE
37 views (last 30 days)
Show older comments
I'm trying to use ESURGE software v2.2.3 that uses MATLAB Runtime Libraries v9.6 (2019a, Update 5).
I get the following error when opening ESURGE and the program immediately closes and will not run:
Warning: Can’t find the resource file ‘toolbox\local\hgrc.m’ needed by ‘C:\Program Files\MATLAB\MATLAB Runtime\v96\bin\win64\hg.dll’
Undefined function or variable ‘matlabrc’.
Undefined function or variable ‘ctfroot’.
Error in runtimeInitializationChecks (line 23)
Undefined function or variable ‘ctfroot’.
This software was working fine on my Windows 10 PC two days ago, but somehow has corrupted(?) and stopped working. I have uninstalled, and downloaded and reinstalled both the ESURGE software and MATLAB Runtime from the same stable location where I found them previously, but the new installations still do no work. https://www.cefe.cnrs.fr/fr/recherche/bc/bbp/264-logiciels
I have tried different versions of MATLAB Runtime (v9.7, 2019b; v9.12, 2022a) and ESURGE cannot even open, while MATLAB Runtime (v9.6, 2019a, Update 9) will open, but produces the same error.
In the directory: "C:\Program Files\MATLAB\MATLAB Runtime\v96\toolbox\local" there was no hgrc.m file. Only 3-files were present so possibly many were missing.
From this similar question: https://uk.mathworks.com/matlabcentral/answers/468644-can-t-find-the-resource-file-toolbox-local-simulinkrc-m it was suggested to use the command lines to update the toolbox cache.
>> rehash toolboxcache
>> restoredefaultpath
>> savepath
This required MATLAB installation to access the MATLAB command terminal. I installed MATLAB 2019a and executed the commands. In the directory "C:\Program Files\MATLAB\R2019a\toolbox\local" there were many more files present, including hgrc.m and matlabrc.m. I have copied these files from "C:\Program Files\MATLAB\R2019a\toolbox\local" to "C:\Program Files\MATLAB\MATLAB Runtime\v96\toolbox\local" (including all combinations of the hgrc.m file only, all files in the directory, and all files in all subfolders of the directory, overwriting or not those with identical names). I have uninstalled and reinstalled ESURGE after copying files, with system restarts in between.
Nothing appears to be working and I still get exactly the same error. I also do not have any system restore points to do a system restart to prior the onset of the problem.
Can anyone please help or offer any other suggestions?
Thanks,
6 Comments
Syafiq
on 6 Dec 2024
I have same problem every time i open my Delft Dashboard. It always appear "Warning: Can't find the resource file 'toolbox\local\hgrc.m' ". My friend said "It could be some problem at MATLAB Runtime v9.6, 2019a.". I'm so confuse right here. Any solutions?
Answers (1)
Kautuk Raj
on 10 Dec 2024
It sounds like you are experiencing a issue with the MATLAB Runtime environment where certain resource files, like hgrc.m and matlabrc, are not being found, leading to errors.
You can refer to this MATLAB Answers post for a detailed solution to similar errors: https://www.mathworks.com/matlabcentral/answers/98050-why-do-i-get-an-error-saying-undefined-function-or-variable-matlabrc-when-executing-a-program-th
It provides guidance on addressing path and configuration issues, which should help get the ESURGE software running smoothly again.
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!