声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1330|回复: 0

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

[复制链接]
发表于 2012-5-31 15:25 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
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 = 000007cf  EBX = 00000016
  ECX = 00000000  EDX = 003d0900
  ESI = 00000001  EDI = 1fdd6ec0
  EBP = 00d3d694  ESP = 00d3d688
  EIP = 1fdd10a2  FLG = 00010202

Stack Trace:
  [0] component.mexw32:0x1fdd10a2(1999, 0x1fdd6ec0, 22, 1955)
  [1] component.mexw32:0x1fdd10f8(2000, 0x00d3deb8, 0x1df40030, 1)
  [2] component.mexw32:0x1fdd11a5(0x1df40030, 0x0ce65b20, 0x0d9b5720, 2000)
  [3] component.mexw32:0x1fdd1227(1, 0x00d3deb8, 1, 0x00d3df48)
  [4] libmex.dll:_mexRunMexFile(1, 0x00d3deb8, 1, 0x00d3df48) + 129 bytes
  [5] libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 1, 0x00d3df48) + 73 bytes
  [6] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00d3deb8, 1, 0x00d3df48) + 220 bytes
  [7] 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
  [8] m_interpreter.dll:void __cdecl mdCallFunction(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn *)(1, 0x00d3deb8, 1, 0x00d3df48) + 56 bytes
  [9] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(1, 0x00d3deb8, 1, 0x00d3df48) + 93 bytes
  [10] 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
  [11] 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
  [12] m_interpreter.dll:private: bool __thiscall accelImpl::MFunctionCall(struct _accelOp * *)(0x00d3e570, 0xffffffff, 0x03979320, 0x0b68cdc0) + 186 bytes
  [13] m_interpreter.dll:public: enum jitReturnFlags __thiscall accelImpl::Exec(void)(0x03979320, 1, 0xffffffff, 0x0b68cdc0) + 189 bytes
  [14] m_interpreter.dll:public: enum jitReturnFlags __thiscall accelCode::Call(enum inMarshalType *,int *)const (0x00d3e66c, 0x00d3e644, 1, 0) + 118 bytes
  [15] m_interpreter.dll:public: static bool __cdecl inJit::ExecuteHotSegment(struct _inJitAccelInfo *,enum opcodes *,int *,int *)(0x00d3e710, 0x00d3e7c4, 0x00d3e774, 0x00d3e908) + 1874 bytes
  [16] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 22, 0) + 320 bytes
  [17] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 2, 0) + 74 bytes
  [18] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 2, 0) + 254 bytes
  [19] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x0d859160, 0x0d859101, 0xffffffff, 0x0d859160) + 1330 bytes
  [20] 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
  [21] 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
  [22] 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
  [23] 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
  [24] m_interpreter.dll:__catch$?inDispatchFromStack@@YAHHPBDHH@Z$0(895, 0x04b5d7ac "Untitled7", 0, 0) + 712 bytes
  [25] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x04b5d7ac "Untitled7", 895, 0, 0) + 146 bytes
  [26] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 1, 0) + 2898 bytes
  [27] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 74 bytes
  [28] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 254 bytes
  [29] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x039426a0, 0x03942601, 0xffffffff, 0x039426a0) + 1330 bytes
  [30] 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
  [31] 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
  [32] 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
  [33] 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
  [34] 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
  [35] 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
  [36] 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
  [37] 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
  [38] m_interpreter.dll:_inEvalCmdWithLocalReturn(0x0bb47720 "Untitled7\n", 0, 0, 1) + 28 bytes
  [39] bridge.dll:enum inExecutionStatus __cdecl evalCommandWithLongjmpSafety(char const *)(0x0bb47720 "Untitled7\n", 0x015c24f0, 0x015c2550, 0x015c24f0) + 67 bytes
  [40] bridge.dll:__catch$_mnParser$0(0x015c24f0, 0x04c404d0, 0x79730101, 0x04c0cb58) + 294 bytes
  [41] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(0x004043ec, 336689, 0, 0x6d5c3a44) + 51 bytes
  [42] matlab.exe:_WinMain@16(0x015c2550, 0, 336689, 0x015c24f0) + 405 bytes
  [43] matlab.exe:___tmainCRTStartup(0, 0x01842798, 0x7ffd3000, 0x8054c6ed) + 320 bytes
  [44] 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
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-21 05:30 , Processed in 0.062425 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表