How do I locate the crash dump files generated by MATLAB?

541 visualizaciones (últimos 30 días)
MATLAB encountered a crash. How do I locate the crash log files on my computer. 

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 12 de Jul. de 2025
Editada: MathWorks Support Team el 6 de Jun. de 2025

For all releases:

When MATLAB crashes, up to three log files may be generated with the following names:
matlab_crash_dump.XXXX java.log.XXXX hs_error_pidXXXX.log
The filenames will not have XXXX in them, but rather a number representing the process ID. For example, you might see crash dumps named "matlab_crash_dump.3944," "java.log.3944," and "hs_error_pid3944". The location of the crash dump files depends on the operating system used.
Execute the following command in your MATLAB Command Window to list the crash-related files:
  • On Windows:
    >> dir(fullfile(tempdir,'prefix*'))
  • On Linux and MacOS:
    >> dir(fullfile('~','prefix*'))
Alternatively, you may manually access the files by browsing to the following directory:
  • On Windows:
    • Option 1: C:\Users\%username%\AppData\Local\Temp
    • Option 2: Enter the following into the search field in the Taskbar, the Start Menu, or Windows Explorer: 
      %temp%
  • On Linux:
    • Type "cd ~" or "cd /home/$USER/" to navigate to your home folder.
  • On MacOS:
    • From the Finder, click the "Go" menu and select "Home" to open your Home folder.

For releases R2025a and later:

If you do not find the crash log files in the locations listed above then you may have minidump files located in your crash_reports folder. An example of what the minidump filename might look like is:  "ac60e913-886c-466b-ae99-bceef3c25f19.dmp". Use one of the following methods to locate your crash_reports folder.
Execute the following command in your MATLAB Command Window to open the minidump files location:
  • On Windows:
    >> cd(fullfile(matlab.crashhandling.crashReportFolder(),"reports"))
  • On Linux and MacOS:
    >> cd(fullfile(matlab.crashhandling.crashReportFolder(),"completed"))
Alternatively, you may manually access the minidump files by browsing to the following directory:
  • Please note that <RELEASE-HASH> is a placeholder for a universal unique identifier (UUID) that is unique for each MATLAB release. Thus, you might find multiple directories and will need to look inside each one to find the corresponding crash dump. 
  • On Windows:
    • %LOCALAPPDATA%\MathWorks\<RELEASE-HASH>\crash_reports
  • On Linux:
    • $HOME/.MathWorks/<RELEASE-HASH>/crash_reports
  • On MacOS:
    • $HOME/Library/Application Support/MathWorks/<RELEASE-HASH>/crash_reports
The DMP file in the crash_reports folder that appears to have been generated around the time of the crash should be the minidump file for your crash. Any other file that was generated around the same time may also be related to the crash.

Additional Notes:

1) You can use the extractCrashLogs(nD​ays,logDir) MATLAB File Exchange submission to extract the logs MATLAB generates:
2) If MATLAB is started with the '-logfile' option, a separate crash file is not created. Instead, the crash information is written to the end of the log file specified by the '-logfile' option.
  1 comentario
Qu Cao
Qu Cao el 26 de Oct. de 2016
Editada: Qu Cao el 26 de Oct. de 2016
On windows, the path can be C:\Users\$YourName$\AppData\Local\Temp

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by