Why do I get "Warning: Error occurred during graphics initialization" after upgrading to MATLAB R2024b and later?

11 views (last 30 days)
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?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Nov 2025 at 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

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2025a

Community Treasure Hunt

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

Start Hunting!