MATLAB crashed when running the .mexw64 file

조회 수: 29 (최근 30일)
Eric Pu
Eric Pu 2022년 11월 18일
답변: Eric Pu 2022년 11월 22일
when i running the program,which include .mexw64 function. Everytime running to the row of function using .mexw64, my matlab crashed and the log file is as follows:
MATLAB Log File: D:\Users\80373995\AppData\Local\Temp\matlab_crash_dump.24092-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Access violation detected at 2022-11-18 17:49:14 +0800
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : GBK
Deployed : false
Graphics Driver : Unknown hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA RTX A4000 Version 27.21.14.6259 (2021-5-6)
Graphics card 2 : Intel Corporation ( 0x8086 ) Intel(R) UHD Graphics 750 Version 27.20.100.9616 (2021-5-17)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : xxxxxxxxxxxx
MATLAB Root : D:\Program Files\Polyspace\R2021a
MATLAB Version : 9.10.0.1602886 (R2021a)
OpenGL : hardware
Operating System : Microsoft Windows 10 רҵ
Process ID : 24092
Processor ID : x86 Family 6 Model 167 Stepping 1, GenuineIntel
Session Key : 99d90fa9-eb9b-4f02-8e3f-3c4c9953eb6e
Window System : Version 10.0 (Build 19044)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: 'MCR 0 interpreter thread' id 43668
Register State (from fault):
RAX = 0000000000000001 RBX = 000001e719d2b060
RCX = 0000000000000003 RDX = 00007fff92694190
RSP = 0000002fa8cf7b10 RBP = 000001e720830070
RSI = fffffe18e62d4fa0 RDI = 000001e6f7160060
R8 = 0000000000000007 R9 = 0000000000000002
R10 = 00007fff92694450 R11 = 0000000000000000
R12 = 0000002fa8cf87f8 R13 = 000001e6fe984440
R14 = 0000000000024200 R15 = 000001e720830060
RIP = 00007fff92691594 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007fff92691594 D:\matlab_files\yuhengv2\LLS-NR-pattern\11_demodulation\demod.mexw64+00005524
[ 1] 0x00007fff9269188a D:\matlab_files\yuhengv2\LLS-NR-pattern\11_demodulation\demod.mexw64+00006282 mexFunction+00000218
[ 2] 0x00007fffbb8ceec9 D:\Program Files\Polyspace\R2021a\bin\win64\libmex.dll+00585417 mexfile::Inspector::needs_upgrade+00014585
[ 3] 0x00007fffbb8cffc2 D:\Program Files\Polyspace\R2021a\bin\win64\libmex.dll+00589762 MexRetrieveVersion+00003074
[ 4] 0x00007fffbb8d0137 D:\Program Files\Polyspace\R2021a\bin\win64\libmex.dll+00590135 MexRetrieveVersion+00003447
[ 5] 0x00007fffbb8d02e7 D:\Program Files\Polyspace\R2021a\bin\win64\libmex.dll+00590567 MexRetrieveVersion+00003879
[ 6] 0x00007fffbb8b0542 D:\Program Files\Polyspace\R2021a\bin\win64\libmex.dll+00460098 mexUnlock_800+00025874
[ 7] 0x00007fffbbddefc0 bin\win64\pgo\m_dispatcher.dll+00585664 Mfh_file::dispatch_file_common+00000164
[ 8] 0x00007fffbbdde77e bin\win64\pgo\m_dispatcher.dll+00583550 Mfh_error::lookup+00003386
[ 9] 0x00007fffbbddef15 bin\win64\pgo\m_dispatcher.dll+00585493 Mfh_file::dispatch+00000045
[ 10] 0x00007fff9a469915 bin\win64\pgo\m_lxe.dll+00366869
[ 11] 0x00007fff9a4dca9e bin\win64\pgo\m_lxe.dll+00838302 MathWorks::lxe::initializeFcn+00466286
[ 12] 0x00007fff9a468b6f bin\win64\pgo\m_lxe.dll+00363375
[ 13] 0x00007fff9a466c39 bin\win64\pgo\m_lxe.dll+00355385
[ 14] 0x00007fff9a484bd7 bin\win64\pgo\m_lxe.dll+00478167 MathWorks::lxe::initializeFcn+00106151
[ 15] 0x00007fff9a483a71 bin\win64\pgo\m_lxe.dll+00473713 MathWorks::lxe::initializeFcn+00101697
[ 16] 0x00007fff9a483482 bin\win64\pgo\m_lxe.dll+00472194 MathWorks::lxe::initializeFcn+00100178
[ 17] 0x00007fff9a487c03 bin\win64\pgo\m_lxe.dll+00490499 MathWorks::lxe::initializeFcn+00118483
[ 18] 0x00007fff9a4878af bin\win64\pgo\m_lxe.dll+00489647 MathWorks::lxe::initializeFcn+00117631
[ 19] 0x00007fff9a46fac0 bin\win64\pgo\m_lxe.dll+00391872 MathWorks::lxe::initializeFcn+00019856
[ 20] 0x00007fff9a46e8eb bin\win64\pgo\m_lxe.dll+00387307 MathWorks::lxe::initializeFcn+00015291
[ 21] 0x00007fff9a46d936 bin\win64\pgo\m_lxe.dll+00383286 MathWorks::lxe::initializeFcn+00011270
[ 22] 0x00007fff9a631f5e bin\win64\pgo\m_lxe.dll+02236254 mwboost::archive::detail::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>+00050938
[ 23] 0x00007fff9a46abda bin\win64\pgo\m_lxe.dll+00371674
[ 24] 0x00007fff9a5d4b09 bin\win64\pgo\m_lxe.dll+01854217 mwboost::archive::detail::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>+00045797
[ 25] 0x00007fffbbddefc0 bin\win64\pgo\m_dispatcher.dll+00585664 Mfh_file::dispatch_file_common+00000164
[ 26] 0x00007fffbbdde77e bin\win64\pgo\m_dispatcher.dll+00583550 Mfh_error::lookup+00003386
[ 27] 0x00007fffbbddef15 bin\win64\pgo\m_dispatcher.dll+00585493 Mfh_file::dispatch+00000045
[ 28] 0x00007fff9a469915 bin\win64\pgo\m_lxe.dll+00366869
[ 29] 0x00007fff9a4dca9e bin\win64\pgo\m_lxe.dll+00838302 MathWorks::lxe::initializeFcn+00466286
[ 30] 0x00007fff9a468b6f bin\win64\pgo\m_lxe.dll+00363375
[ 31] 0x00007fff9a466c39 bin\win64\pgo\m_lxe.dll+00355385
[ 32] 0x00007fff9a484bd7 bin\win64\pgo\m_lxe.dll+00478167 MathWorks::lxe::initializeFcn+00106151
[ 33] 0x00007fff9a483a71 bin\win64\pgo\m_lxe.dll+00473713 MathWorks::lxe::initializeFcn+00101697
[ 34] 0x00007fff9a483482 bin\win64\pgo\m_lxe.dll+00472194 MathWorks::lxe::initializeFcn+00100178
[ 35] 0x00007fff9a487c03 bin\win64\pgo\m_lxe.dll+00490499 MathWorks::lxe::initializeFcn+00118483
[ 36] 0x00007fff9a4878af bin\win64\pgo\m_lxe.dll+00489647 MathWorks::lxe::initializeFcn+00117631
[ 37] 0x00007fff9a46fac0 bin\win64\pgo\m_lxe.dll+00391872 MathWorks::lxe::initializeFcn+00019856
[ 38] 0x00007fff9a46e8eb bin\win64\pgo\m_lxe.dll+00387307 MathWorks::lxe::initializeFcn+00015291
[ 39] 0x00007fff9a46d936 bin\win64\pgo\m_lxe.dll+00383286 MathWorks::lxe::initializeFcn+00011270
[ 40] 0x00007fff9a53a596 bin\win64\pgo\m_lxe.dll+01222038 MathWorks::lxe::ShutdownLxeEngine+00031394
[ 41] 0x00007fff9a53a3c2 bin\win64\pgo\m_lxe.dll+01221570 MathWorks::lxe::ShutdownLxeEngine+00030926
[ 42] 0x00007fff9a53993b bin\win64\pgo\m_lxe.dll+01218875 MathWorks::lxe::ShutdownLxeEngine+00028231
[ 43] 0x00007fff9a5398f2 bin\win64\pgo\m_lxe.dll+01218802 MathWorks::lxe::ShutdownLxeEngine+00028158
[ 44] 0x00007fff9c07a856 bin\win64\pgo\m_lxe.dll+29796438 mwboost::archive::detail::pointer_oserializer<mwboost::archive::xml_oarchive,MathWorks::lxe::PreLineExecutionEvent>::save_object_ptr+00299002
[ 45] 0x00007fffd64fa3a9 D:\Program Files\Polyspace\R2021a\bin\win64\libmwbridge.dll+00172969 mnGetPrompt+00027097
[ 46] 0x00007fffbc082266 D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00467558 iqm::Iqm::instance+00001190
[ 47] 0x00007fffbc0d86b3 D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00820915 iqm::UserEvalPlugin::execute+00001347
[ 48] 0x00007fffbc0a65ec D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00615916 iqm::Iqm::setupIqmFcnPtrs+00106204
[ 49] 0x00007fffbc0b0faa D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00659370 iqm::Iqm::setupIqmFcnPtrs+00149658
[ 50] 0x00007fffbc077720 D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00423712 iqm::Iqm::create+00008352
[ 51] 0x00007fffd64e8eaf D:\Program Files\Polyspace\R2021a\bin\win64\libmwbridge.dll+00102063 ioReadLine+00000463
[ 52] 0x00007fffd64e8ca5 D:\Program Files\Polyspace\R2021a\bin\win64\libmwbridge.dll+00101541 ioReadLine+00000165
[ 53] 0x00007fffd64fa761 D:\Program Files\Polyspace\R2021a\bin\win64\libmwbridge.dll+00173921 mnGetCommandLineBuffer+00000289
[ 54] 0x00007fffd64fabb7 D:\Program Files\Polyspace\R2021a\bin\win64\libmwbridge.dll+00175031 mnParser+00000487
[ 55] 0x00007fffbbee3d86 D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00540038 mcr_set_enableReadingFromStdin+00013894
[ 56] 0x00007fffbbe7f5d3 D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00128467 mcrFunctionSignature::set_signature+00107555
[ 57] 0x00007fffbbe9b550 D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00243024 mcrFunctionSignature::set_signature+00222112
[ 58] 0x00007fffbc0d392a D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00801066 iqm::PackagedTaskPlugin::execute+00000074
[ 59] 0x00007fffbbede1ed D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00516589 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00009613
[ 60] 0x00007fffbc0a65ec D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00615916 iqm::Iqm::setupIqmFcnPtrs+00106204
[ 61] 0x00007fffbc0784bc D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00427196 iqm::Iqm::create+00011836
[ 62] 0x00007fffbc077c32 D:\Program Files\Polyspace\R2021a\bin\win64\iqm.dll+00425010 iqm::Iqm::create+00009650
[ 63] 0x00007fffbbeb58fc D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00350460 mcrInstantiationError::operator=+00010428
[ 64] 0x00007fffbbeb64ac D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00353452 mcrInstantiationError::operator=+00013420
[ 65] 0x00007fffbbeb3ac0 D:\Program Files\Polyspace\R2021a\bin\win64\mcr.dll+00342720 mcrInstantiationError::operator=+00002688
[ 66] 0x00007ff80a329b9a D:\Program Files\Polyspace\R2021a\bin\win64\mwboost_thread-vc142-mt-x64-1_72.dll+00039834 mwboost::thread::swap+00000074
[ 67] 0x00007ff820de1bb2 C:\Windows\System32\ucrtbase.dll+00138162 configthreadlocale+00000146
[ 68] 0x00007ff822407034 C:\Windows\System32\KERNEL32.DLL+00094260 BaseThreadInitThunk+00000020
[ 69] 0x00007ff8231e2651 C:\Windows\SYSTEM32\ntdll.dll+00337489 RtlUserThreadStart+00000033
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
  댓글 수: 7
Jan
Jan 2022년 11월 18일
Yes, this is possible. Maybe the compiler you have used for the older versions, used UINT32 for addressing and now it is size_t?
There are many ways to kill a C-mex function by an access violoation. Dangling pointers can cause not reproducible crashes also: If some memory is free'd already, it might still have the correct value. But this can change for random reasons. In opposite to Matlab, C and C++ is fragile. If a function does not crash 100'000 times, this is still not a reliable statement if it is free of bugs, which will let it crash in the next call.
Eric Pu
Eric Pu 2022년 11월 21일
Thank u!I‘ll check the C code firstly, and then test the program.’

댓글을 달려면 로그인하십시오.

채택된 답변

Eric Pu
Eric Pu 2022년 11월 22일
I had solved this problem, the reason is the error about the input parameter. One of hte program's input parameters should be a complex number, but the input number is double type. So it does not have imaginary part, and caused the crash of matlab.

추가 답변 (2개)

Anirban
Anirban 2022년 11월 18일
편집: Anirban 2022년 11월 18일
  댓글 수: 1
Eric Pu
Eric Pu 2022년 11월 21일
thanks for your reply, but maybe it is not this issue.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2022년 11월 19일
The last file it mentions before the final gasp and death is "D:\matlab_files\yuhengv2\LLS-NR-pattern\11_demodulation\demod.mexw64". Are you sure that file exists?
  댓글 수: 1
Eric Pu
Eric Pu 2022년 11월 21일
yes, actually i created this file in the folder

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by