Never mind, I appear to have fixed it by opening an .m file in Matlab from Windows Explorer (as opposed to starting Matlab from the Start menu shortcut, which was how I was opening it to get the error) and then closing Matlab again. Now Matlab starts just fine. Oh well, hopefully this will be useful for someone who runs into the same error again in the future.
Matlab access violation on startup
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
John Barrett
am 10 Mär. 2015
Beantwortet: Jeovane
am 29 Mai 2021
Hi,
I've recently run into a problem where Matlab suffers an access violation every time I try to start it (first section of crash log is pasted below, full log is attached). I can start Matlab with the -nojvm option just fine, but that's obviously not ideal.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007798fb75, pid=7200, tid=7556
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode windows-amd64 )
# Problematic frame:
# C [ntdll.dll+0x4fb75]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Running Matlab 2012b (managed machine, can't update) on Windows 7 Enterprise SP1, Intel Core i7-3770. JRE version is 6.0_17-b04.
The problem started when I ran some code that called a MEX file, which crashed. I went to restart Matlab to try and figure out what inputs to the MEX file caused it to crash, but Matlab exited immediately with an access violation. I've seen a few similar questions, but I'm not sure any quite apply to my situation:
- "Matlab crashes on startup after segfault on last" - tried deleting the .xml files and offending .m file as suggested, but doesn't help.
- "How can I resolve a Java error when launching Matlab 2012a?" - no MATLAB_JAVA environment variable, so pretty sure I'm using the JVM that ships with Matlab
- "Matlab crash on startup after mex c++ segfaulting" - most similar to mine, but unfortunately no answers and unlike the question asker I hadn't very recently updated Windows or my JVM.
Does anyone have any idea how I can fix this?
The log file from the first time this happened is attached.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Jeovane
am 29 Mai 2021
I have replaced the internal matlab jre files (at: C:\Program Files\MATLAB\R2012a\sys\java\jre\win64\jre) by the OS installed ones (from: C:\Program Files\Java\jre1.8.0_291) and it worked to me. Perhaps changing some environment variable should work too.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!