24小时热门版块排行榜    

查看: 281  |  回复: 1
当前主题已经存档。

fspdlh

金虫 (正式写手)

[交流] 【求助完毕】load载入的参数无法传递给内联函数?难到是MATLAB的bug?

我编了一个程序,把一些常用的参数存到mat文件中,用时就调出来
在一个函数中,我编了好几个内联函数,来实现一些常用参数的共享,但只有函数输入参数和定义的参数可以,load函数导入的参数无法实现共享,求原因,及解决办法
在运行过程中还报错说MATLAB遇到错误,要发错误报告,不会是MATLAB的bug吧,我还是第一次遇到

以下是错误信息:

------------------------------------------------------------------------
       Segmentation violation detected at Sun Dec 21 10:29:43 2008
------------------------------------------------------------------------

Configuration:
  MATLAB Version:   7.0.0.19920 (R14)
  Operating System: Microsoft Windows XP
  Window System:    Version 5.1 (Build 2600: Service Pack 2)
  Processor ID:     x86 Family 15 Model 2 Stepping 9, GenuineIntel
  Virtual Machine:  Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    (mixed mode)
  Default Charset:  ibm-1386_P100-2002

Register State:
  EAX = 13ee8de8  EBX = 13f52008
  ECX = 01f81011  EDX = 00000000
  ESI = 00000000  EDI = 00000007
  EBP = 00cda9e0  ESP = 00cda9d4
  EIP = 789eca9a  FLG = 00010293

Stack Trace:
  [0] m_interpreter.dll:void __cdecl inAccelPush1sub_doubleNONCOMPLEX(class inJitSize *,double *,double,int,double *)(0x13ee8de8, 0, 0, 0x3ff00000) + 202 bytes
  [1] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x013cf950, 0x00cdac6c, 0, 20) + 1979 bytes
  [2] m_interpreter.dll:_inExecuteHotSegment(0x00cdaca0, 0x00cdacfc, 0x00cdacec "�����, 0x00cdb6f0) + 1542 bytes
  [3] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x13efda10, 0, 1, 1) + 610 bytes
  [4] m_interpreter.dll:_inWordsj(1, 0x00cdb660, 1, 0x00cdb6f0) + 441 bytes
  [5] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(1, 0x00cdb660, 1, 0x00cdb6f0) + 158 bytes
  [6] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 1, 0x00cdb660, 1) + 28 bytes
  [7] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cdb660, 1, 0x00cdb6f0) + 26 bytes
  [8] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cdb660, 1, 0x00cdb6f0) + 273 bytes
  [9] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(1, 0x00cdb660, 1, 0x00cdb6f0) + 246 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, 0x015a48d0, 0) + 840 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 *,unsigned int,int,unsigned int *,int)(0x1347ea10, 1, 1, 0x015a48d0) + 148 bytes
  [12] m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x13544140, 0x00cdbd04, 0x013cf9b0, 0x00cdbcfc) + 108 bytes
  [13] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x013cf9b0, 0x00cdbd7c, 0, 16) + 18462 bytes
  [14] m_interpreter.dll:_inExecuteHotSegment(0x00cdbdb0, 0x00cdbe0c, 0x00cdbdfc "�����, 0x00cdc800) + 1542 bytes
  [15] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x13efc920, 0, 2, 2) + 610 bytes
  [16] m_interpreter.dll:_inWordsj(1, 0x00cdc770, 2, 0x00cdc800) + 441 bytes
  [17] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(1, 0x00cdc770, 2, 0x00cdc800) + 158 bytes
  [18] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 1, 0x00cdc770, 2) + 28 bytes
  [19] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cdc770, 2, 0x00cdc800) + 26 bytes
  [20] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cdc770, 2, 0x00cdc800) + 273 bytes
  [21] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(1, 0x00cdc770, 2, 0x00cdc800) + 246 bytes
  [22] 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, 0x015a4e50, 0) + 840 bytes
  [23] 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 *,unsigned int,int,unsigned int *,int)(0x13484fa0, 1, 1, 0x015a4e50) + 148 bytes
  [24] m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x13659fa0, 0x00cdce14, 0x013cf7f0, 0x00cdce0c) + 108 bytes
  [25] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x013cf7f0, 0x00cdce8c, 0, 0) + 18462 bytes
  [26] m_interpreter.dll:_inExecuteHotSegment(0x00cdcec0, 0x00cdcf90, 0x00cdcf40, 0) + 1542 bytes
  [27] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 2351, 100, 0) + 365 bytes
  [28] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 2351, 4, 0) + 272 bytes
  [29] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x1316f790, 0, 1, 1) + 773 bytes
  [30] m_interpreter.dll:_inWordsj(0, 0x00cdd9e0, 1, 0x00cdda70) + 441 bytes
  [31] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(0, 0x00cdd9e0, 1, 0x00cdda70) + 158 bytes
  [32] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00cdd9e0, 1) + 28 bytes
  [33] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cdd9e0, 1, 0x00cdda70) + 26 bytes
  [34] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cdd9e0, 1, 0x00cdda70) + 273 bytes
  [35] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(0, 0x00cdd9e0, 1, 0x00cdda70) + 246 bytes
  [36] 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 *)(0, 1, 0x015a5f10, 0) + 840 bytes
  [37] 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 *,unsigned int,int,unsigned int *,int)(0x13470be0, 0, 1, 0x015a5f10) + 148 bytes
  [38] m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x13ee5850, 0x00cde084, 0x013cf7c0, 0x00cde07c) + 108 bytes
  [39] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x013cf7c0, 0x00cde0fc, 0, 0) + 18462 bytes
  [40] m_interpreter.dll:_inExecuteHotSegment(0x00cde130, 0x00cde200, 0x00cde1b0, 0) + 1542 bytes
  [41] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 702, 54, 0) + 365 bytes
  [42] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 702, 10, 0) + 272 bytes
  [43] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x016ab020, 0, 3, 3) + 773 bytes
  [44] m_interpreter.dll:_inWordsj(0, 0x00cde71c, 3, 0x00cde77c) + 441 bytes
  [45] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(0, 0x00cde71c, 3, 0x00cde77c) + 158 bytes
  [46] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00cde71c, 3) + 28 bytes
  [47] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 3, 0x00cde77c) + 26 bytes
  [48] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 3, 0x00cde77c) + 273 bytes
  [49] m_interpreter.dll:_inDispatchFromStack(484, 0x014b6e40 "ReadOutFiles", 0, 3) + 891 bytes
  [50] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x014b6e40 "ReadOutFiles", 484, 0, 3) + 111 bytes
  [51] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(2, 0, 0, 0) + 2411 bytes
  [52] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(2, 0, 0, 0) + 272 bytes
  [53] m_interpreter.dll:_inInterPcode(2, 0x7876f2d8, 0, 0) + 69 bytes
  [54] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cdf2c8, 0x00cdf3bc, 2, 0x1315a940 "ReadOutFiles('BTA_base','6-31G1'.." + 162 bytes
  [55] m_interpreter.dll:$L72592(0x7876f2d8, 0x1315a940 "ReadOutFiles('BTA_base','6-31G1'..", 40, 0) + 196 bytes
  [56] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0, 2, 1, 0x00cdf44c "趑� + 86 bytes
  [57] m_interpreter.dll:_inEvalCmdNoEnd(0x1315a940 "ReadOutFiles('BTA_base','6-31G1'..", 0x00cdf4e4, 0x00cdf4a0, 0x01681d68) + 16 bytes
  [58] bridge.dll:_mnParser(0x7c80b6a1, 0x01681d68, 0, 0) + 431 bytes
  [59] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271242, 0x4d5c3a44, 0x414c5441, 0x625c3742) + 87 bytes
  [60] MATLAB.exe:0x00401d2f(4194304, 0, 271242, 0x01681d68)
  [61] MATLAB.exe:0x00403e45(3407927, 3604534, 0x7ffd8000, 0xe3bacc00)
  [62] kernel32.dll:0x7c816fd7(0x00403cc0 "jth(U@", 0, 0, 0)

Please follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:

  1. Send this crash report to segv@mathworks.com for automated analysis.
     For your convenience, this information has been recorded in:
       C:\DOCUME~1\ghs\LOCALS~1\Temp\matlab_crash_dump.2904

  2. Also, if the problem is reproducible, send the crash report to
     support@mathworks.com along with:
       - A specific list of steps that will reproduce the problem
       - Any M, MEX, MDL or other files required to reproduce the problem
       - Any error messages displayed to the command window
     A technical support engineer will contact you with further information.

Thank you for your assistance.  Please save your workspace and restart
MATLAB before continuing your work.

[ Last edited by sunxiao on 2009-3-9 at 08:35 ]
回复此楼

» 猜你喜欢

已阅   关注TA 给TA发消息 送TA红花 TA的回帖

fspdlh

金虫 (正式写手)


woshilsh(金币+1,VIP+0):呵呵,谢谢你的共享解答
想到解决办法了,如果这个变量是a,那么就加一条语句:
a=a;
这办法可以

[ Last edited by fspdlh on 2008-12-23 at 21:08 ]
2楼2008-12-21 11:08:20
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 fspdlh 的主题更新
信息提示
请填处理意见