Getting Access violation exception on Event Handler
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys,
We have integrated a C# Winforms application with Matlab. Basically the Matlab code subscribe to event handlers from C# Winforms app. When handlers of type EventHandler<CustomData> is called from C#, we are getting Access violation exception.
When the C# dll is used via MatLab it is working as expected. When Matlab code is compiled as an exe file then we have this issues.
What could be the possible reason for having this exception?
--
- We are using .NET v4.5.2
- Matlab runtime 9.0.1
LOG DETAILS: Abnormal termination: Access violation
Register State (from fault): RAX = 000000001a25e2d8 RBX = 000000000b3887b0 RCX = 00000000000001e0 RDX = 000000001a25e2e0 RSP = 000000001a25df50 RBP = 000000001a25df99 RSI = 0000000000000000 RDI = 000000001a25e020
R8 = 000000001a25e020 R9 = 000000001a25e070
R10 = 0000000000000000 R11 = 000000001a25e020
R12 = 0000000000000000 R13 = 0000000000000000
R14 = 000000008b108580 R15 = 000000001a25e258
RIP = 000000000a2178e6 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault): [ 0] 0x000000000a2178e6 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+01603814 boost::serialization::singleton<boost::archive::detail::pointer_oserializer<boost:: archive::binaryTerm_oarchive,ir::IrTree> >::get_instance+00222006 [ 1] 0x000000000a0ca5be C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00239038 [ 2] 0x000000000a0c89c1 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00231873 [ 3] 0x000000000a0c8cfb C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00232699 [ 4] 0x000000000a0c8e34 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00233012 [ 5] 0x000000000a0ca0b6 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00237750 [ 6] 0x000000000a0c9416 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00234518 [ 7] 0x000000000a0c9160 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\m_lxe.dll+00233824 [ 8] 0x000000000e348070 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\mcos_impl.dll+00688240 QueryMLFcnTable_mcos_impl+00264476 [ 9] 0x000000000e3a9724 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\mcos_impl.dll+01087268 QueryMLFcnTable_mcos_impl+00663504 [ 10] 0x000000000e364b0e C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\mcos_impl.dll+00805646 QueryMLFcnTable_mcos_impl+00381882 [ 11] 0x000000000e30a354 C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\mcos_impl.dll+00435028 QueryMLFcnTable_mcos_impl+00011264 [ 12] 0x000000000e338f8e C:\Program Files\MATLAB\MATLAB Runtime\v901\bin\win64\mcos_impl.dll+00626574 QueryMLFcnTable_mcos_impl+00202810 [ 13] 0x000007fe8bdee8a0 unknown-module+00000000 [ 14] 0x000000008b2b4870 unknown-module+00000000 [ 15] 0x000000001a25e998 unknown-module+00000000 [ 16] 0x000000008ac41f70 unknown-module+00000000 [ 17] 0x000000001a250ab3 unknown-module+00000000 [ 18] 0x000014e755994704 unknown-module+00000000 [ 19] 0x000007feeb319598 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll+07116184 LegacyNGenTryEnumerateFusionCache+00736396 [ 20] 0xffffffffffffffff unknown-module+00000000 [ 21] 0x000000001c55cef9 unknown-module+00000000 [ 22] 0x000000001c55cef9 unknown-module+00000000 [ 23] 0x000000001a25e820 unknown-module+00000000 [ 24] 0x000007fe8bdee8a0 unknown-module+00000000 [ 25] 0x000000001a25e8c0 unknown-module+00000000 [ 26] 0x000000001c55cef9 unknown-module+00000000 [ 27] 0x000000001a25e948 unknown-module+00000000 [ 28] 0x000000001a25e998 unknown-module+00000000 [ 29] 0x000000008ac41f70 unknown-module+00000000 [ 30] 0x000000006effa3a0 unknown-module+00000000 [ 31] 0x000000001a25f760 unknown-module+00000000 [ 32] 0x0000000100142d58 unknown-module+00000000 [ 33] 0x000000001a25f750 unknown-module+00000000 [ 34] 0x000000001a25e920 unknown-module+00000000 [ 35] 0x000007fe8bdee018 unknown-module+00000000 [ 36] 0x000000008ac41f70 unknown-module+00000000 [ 37] 0x000000000c196790 unknown-module+00000000 [ 38] 0x000000001a25e998 unknown-module+00000000 [ 39] 0x000000001a25e978 unknown-module+00000000 [ 40] 0x000000001a25e900 unknown-module+00000000 [ 41] 0x000007fe8bdedee8 unknown-module+00000000 [ 42] 0x0000000000000004 unknown-module+00000000 [ 43] 0x000007fe8b6be6f8 unknown-module+00000000 [ 44] 0x000000001a25f750 unknown-module+00000000 [ 45] 0x0000000100142d58 unknown-module+00000000 [ 46] 0x000000001a25e900 unknown-module+00000000 [ 47] 0x000000006effa3a0 unknown-module+00000000 [ 48] 0x000014e755994704 unknown-module+00000000 [ 49] 0x0000000003ee7d01 unknown-module+00000000 [ 50] 0x000000006a9be7f0 unknown-module+00000000 [ 51] 0x000000008ac41f70 unknown-module+00000000 [ 52] 0x000000008b2b4870 unknown-module+00000000 [ 53] 0x000000008b883300 unknown-module+00000000 [ 54] 0x000000001a25e940 unknown-module+00000000
1 Kommentar
Connor
am 2 Aug. 2017
I'm having a very similar issue; I'm using a C# library, and running my MATLAB code opens up .NET forms, which works the first time. But on closing them and running things a second time, I get an Access Violation error. Were you able to figure out what was going on in your case?
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!