Why do I get segmentation fault when I try to start an exe compiled by mcc?

4 views (last 30 days)
Hi,
I wrote an application with a gui to acquire data from an external device. In addition I use a dll to communicate with extrenal hardware. It works proper if I start the gui in Matlab.
Thus if I create an .exe aplication with mcc and try to start I got a segmentation violation fault.
On Win XP system the exe works fine.
I use MATLAB Version R2010b Service Pack 1 (32 Bit),Compiler 4.14.1., Data Acquisition Toolbox 2.17 on Win7/64Bit.
Here is a part of the stack trace:
Abnormal termination:
Register State (from fault):
EAX = 00000000 EBX = 0c2dd420
ECX = 01f80000 EDX = 0c2dd420
ESP = 04d7a268 EBP = 04d7a29c
ESI = 1163e270 EDI = 0c2dd418
EIP = 77abe3be EFL = 00010202
CS = 00000023 DS = 0000002b SS = 0000002b
ES = 0000002b FS = 00000053 GS = 0000002b
Stack Trace (from fault):
[ 0] 0x77abe3be C:/Windows/SysWOW64/ntdll.dll+00189374 ( RtlInitUnicodeString+000406)
[ 1] 0x77abe023 C:/Windows/SysWOW64/ntdll.dll+00188451 ( RtlFreeHeap+000126 )
[ 2] 0x75b614dd C:/Windows/syswow64/kernel32.dll+00070877 ( HeapFree+000020 )
[ 3] 0x74914c39 C:/Windows/WinSxS/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_ 8.0.50727.4940_none_d08cc06a442b34fc/MSVCR80.dll+00019513 ( free+000205 )
...........
...........
...........
[120] 0x7a3d531c C:/Program Files(x86)/MATLAB/R2010bSP1/bin/win32/ mcr.dll +00086812 ( mcr_invoke_on_interpreter_thread+000220 )
[121] 0x75b6339 C:/Windows/syswow64/kernel32.dll+00078746 ( BaseThreadInitThunk+000018)
[122] 0x77ac9ef2 C:/Windows/SysWOW64/ntdll.dll+00237298 ( RtlInitializeExceptionChain+000099 )
[123] 0x77ac9ec5 C:/Windows/SysWOW64/ntdll.dll+00237253 ( RtlInitializeExceptionChain+000054 )

Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!