seanbattier 发表于 2012-5-31 15:25

matlab和C++混合编程时提示如下的错误,怎么解决

Saving minidump to file C:\DOCUME~1\dell\LOCALS~1\Temp\matlab_crash_dump.7124.0.dmp

------------------------------------------------------------------------
       Segmentation violation detected at Thu May 31 15:22:34 2012
------------------------------------------------------------------------

Configuration:
MATLAB Version:   7.6.0.324 (R2008a)
MATLAB License:   161051
Operating System: Microsoft Windows XP
Window System:    Version 5.1 (Build 2600: Service Pack 3)
Processor ID:   x86 Family 6 Model 7 Stepping 10, GenuineIntel
Virtual Machine:Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Encoding:GBK

Fault Count: 1

Register State:
EAX = 000007cfEBX = 00000016
ECX = 00000000EDX = 003d0900
ESI = 00000001EDI = 1fdd6ec0
EBP = 00d3d694ESP = 00d3d688
EIP = 1fdd10a2FLG = 00010202

Stack Trace:
component.mexw32:0x1fdd10a2(1999, 0x1fdd6ec0, 22, 1955)
component.mexw32:0x1fdd10f8(2000, 0x00d3deb8, 0x1df40030, 1)
component.mexw32:0x1fdd11a5(0x1df40030, 0x0ce65b20, 0x0d9b5720, 2000)
component.mexw32:0x1fdd1227(1, 0x00d3deb8, 1, 0x00d3df48)
libmex.dll:_mexRunMexFile(1, 0x00d3deb8, 1, 0x00d3df48) + 129 bytes
libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 1, 0x00d3df48) + 73 bytes
libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 1, 0x00d3df48) + 220 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 1, 0x00d3df48) + 193 bytes
m_interpreter.dll:void __cdecl mdCallFunction(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn *)(1, 0x00d3deb8, 1, 0x00d3df48) + 56 bytes
m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(1, 0x00d3deb8, 1, 0x00d3df48) + 93 bytes
m_interpreter.dll:public: bool __thiscall Resolver::CallMFunction(int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *)(1, 1, 0x0d9b5a20, 0) + 1157 bytes
m_interpreter.dll:bool __cdecl inResolveMFunctionCall(struct _m_function_desc *,int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *,enum inMarshalType *,int,class mpsTypeSequenceNlhs const *,struct mxArray_tag * (__cdecl*)(int))(0x0ce7d468, 1, 1, 0x0d9b5a20) + 157 bytes
m_interpreter.dll:private: bool __thiscall accelImpl::MFunctionCall(struct _accelOp * *)(0x00d3e570, 0xffffffff, 0x03979320, 0x0b68cdc0) + 186 bytes
m_interpreter.dll:public: enum jitReturnFlags __thiscall accelImpl::Exec(void)(0x03979320, 1, 0xffffffff, 0x0b68cdc0) + 189 bytes
m_interpreter.dll:public: enum jitReturnFlags __thiscall accelCode::Call(enum inMarshalType *,int *)const (0x00d3e66c, 0x00d3e644, 1, 0) + 118 bytes
m_interpreter.dll:public: static bool __cdecl inJit::ExecuteHotSegment(struct _inJitAccelInfo *,enum opcodes *,int *,int *)(0x00d3e710, 0x00d3e7c4, 0x00d3e774, 0x00d3e908) + 1874 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 22, 0) + 320 bytes
m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 2, 0) + 74 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 2, 0) + 254 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x0d859160, 0x0d859101, 0xffffffff, 0x0d859160) + 1330 bytes
m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00d3eb64, 0, 0x00d3ebc4) + 679 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00d3eb64, 0) + 29 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3eb64, 0, 0x00d3ebc4) + 28 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3eb64, 0, 0x00d3ebc4) + 193 bytes
m_interpreter.dll:__catch$?inDispatchFromStack@@YAHHPBDHH@Z$0(895, 0x04b5d7ac "Untitled7", 0, 0) + 712 bytes
m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x04b5d7ac "Untitled7", 895, 0, 0) + 146 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 1, 0) + 2898 bytes
m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 74 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 254 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x039426a0, 0x03942601, 0xffffffff, 0x039426a0) + 1330 bytes
m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00d3f3cc, 0, 0) + 679 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00d3f3cc, 0) + 29 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3f3cc, 0, 0) + 28 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00d3f3cc, 0, 0) + 193 bytes
m_interpreter.dll:void __cdecl inEvalPcodeHeaderToWord(struct _memory_context *,int,struct mxArray_tag * * const,struct _pcodeheader *,class Mfh_mp *,unsigned long)(0x7ad2e5e4, 0, 0x00d3f3cc, 0x00d3f288) + 201 bytes
m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_script_function(struct _memory_context *,struct _pcodeheader *,int,struct mxArray_tag * * const,unsigned long,bool)(0x7ad2e5e4, 0x00d3f288, 0, 0x00d3f3cc) + 91 bytes
m_interpreter.dll:enum inExecutionStatus __cdecl inEvalStringWithIsVarFcn(struct _memory_context *,char const *,enum EvalType,int,struct mxArray_tag * * const,enum inDebugCheck,struct _pcodeheader *,int *,bool (__cdecl*)(void *,char const *),void *,bool,bool)(0x7ad2e5e4, 0x0bb47720 "Untitled7\n", 0, 0) + 570 bytes
m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturn(char const *,int *,bool,bool,bool (__cdecl*)(void *,char const *))(0x0bb47720 "Untitled7\n", 0, 1, 0x79cad700) + 97 bytes
m_interpreter.dll:_inEvalCmdWithLocalReturn(0x0bb47720 "Untitled7\n", 0, 0, 1) + 28 bytes
bridge.dll:enum inExecutionStatus __cdecl evalCommandWithLongjmpSafety(char const *)(0x0bb47720 "Untitled7\n", 0x015c24f0, 0x015c2550, 0x015c24f0) + 67 bytes
bridge.dll:__catch$_mnParser$0(0x015c24f0, 0x04c404d0, 0x79730101, 0x04c0cb58) + 294 bytes
mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(0x004043ec, 336689, 0, 0x6d5c3a44) + 51 bytes
matlab.exe:_WinMain@16(0x015c2550, 0, 336689, 0x015c24f0) + 405 bytes
matlab.exe:___tmainCRTStartup(0, 0x01842798, 0x7ffd3000, 0x8054c6ed) + 320 bytes
kernel32.dll:0x7c817077(0x00401943, 0, 0x78746341, 32)

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
页: [1]
查看完整版本: matlab和C++混合编程时提示如下的错误,怎么解决