Why do I get "Warning: Error occurred during graphics initialization" after upgrading to MATLAB R2024b and later?
14 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2025-10-14
回答: MathWorks Support Team
2025-10-17
I just upgraded to MATLAB R2025a. After installation, I received the following warning related to graphics and "hgrc.m":
Warning: Can't find the resource file 'toolbox/matlab/graphics/core/hg/hgrc.m' needed by 'C:\Program Files\MATLAB\R2025a\bin\win64\hg.dll'
Warning: Error occurred during graphics initialization
Why do I get this graphics initialization warning?
采纳的回答
MathWorks Support Team
2025-11-19,0:00
This warning may be related to mismatches in the MATLAB Search Path when upgrading from previous releases to MATLAB R2024b and later. To resolve this warning, refer to How can I perform initial troubleshooting of MATLAB or Simulink errors?. This page provides instructions on how to restore the default MATLAB path and rehash the toolbox cache.
If the steps at the above link don't work, please provide the following information to MathWorks Technical Support:
1) Obtain the path to "hgrc.m" by running the following command in the MATLAB Command Window:
which -all hgrc
2) Obtain a copy of the "startup.m" file if one exists. You can find the path to this file using the following command in the MATLAB Command Window:
which -all startup
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!