Access violations in base MATLAB code
조회 수: 13 (최근 30일)
이전 댓글 표시
I am debugging a mex function using Microsoft Visual Studio 2010 Professional with MATLAB R2012b on 64 bit Windows 7 Ultimate. When I configure Visual Studio to break on Win32 access violations, I get dozens of breaks in MATLAB base code. This happens before I even load or call my mex function. The only way I have found to debug my program is to only configure VS to break on access violations after I have loaded and called my mex function and stopped in my code. This is very cumbersome.
Is there some way to make MATLAB avoid these violations so I can leave Visual Studio configured to break on them all the time?
FYI Here's an example of the kind of message I see:
First-chance exception at 0x0de62a68 in MATLAB.exe; 0xC0000005; Access violation reading location 0x00000004.
Thank you.
David Liebtag
댓글 수: 0
답변 (3개)
Martijn
2013년 1월 9일
These exceptions are most probably coming from the JIT in the JRE so what you could try is running MATLAB without Java. To do so start MATLAB with the -nojvm option.
댓글 수: 3
Martijn
2013년 1월 10일
No I am afraid that this is not possible, the MATLAB GUI is Java based so disabling Java will turn off the development environment.
So you would either:
1. Somehow need to deal with the exceptions on the Visual Studio Side (perhaps someone else has further suggestions on that).
2. Have to temporarily live with not having the full MATLAB GUI when debugging these kind of specific issues.
Paul Romanczyk
2019년 6월 25일
In Visual Studio, Go To Debug > Windows > Exception Settings. Under Win32 Exceptions, Disable Access Violation
참고 항목
카테고리
Help Center 및 File Exchange에서 Performance and Memory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!