主题:求助:matlab调用fortran子程序时的问题
fortran编好的子程序经matlab编译生成 .mexw32文件。之后在matlab里调用该函数,提示如下:
------------------------------------------------------------------------
Segmentation violation detected at Sun Nov 09 16:45:20 2008
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.1.0.246 (R14) Service Pack 3
MATLAB License: 161051
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 3)
Processor ID: x86 Family 15 Model 4 Stepping 1, GenuineIntel
Virtual Machine: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Charset: GBK
Register State:
EAX = 00cde664 EBX = 0f9fc190
ECX = 00000000 EDX = 00000200
ESI = 00cddeec EDI = 0f9fc190
EBP = 00cddec0 ESP = 00cddec0
EIP = 78517b38 FLG = 00010202
Stack Trace:
[0] libmx.dll:_MXGETPR@4(0x00cde664, 0x0f9fc170, 0x00cde660, 0) + 8 bytes
[1] effra.mexw32:0x0f9a11d7(0x00cddf24, 0x00cde660, 0x00cddf2c, 0x00cde6c0)
[2] libmex.dll:_mexRunMexFile(2, 0x00cde660, 3, 0x00cde6c0) + 82 bytes
[3] libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 73 bytes
[4] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 169 bytes
[5] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 271 bytes
[6] m_interpreter.dll:int __cdecl mdDispatch(int,char const *,int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn * *)(511, 0x0ebcd110 "effra", 2, 0x00cde660) + 88 bytes
[7] m_interpreter.dll:_inDispatchFromStack(511, 0x0ebcd110 "effra", 2, 3) + 800 bytes
[8] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x0ebcd110 "effra", 511, 2, 3) + 145 bytes
[9] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(2, 0, 0, 0) + 2534 bytes
[10] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(2, 0, 0, 0) + 282 bytes
[11] m_interpreter.dll:_inInterPcode(2, 0x784d6e7c, 0, 0) + 81 bytes
[12] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cdf278, 0x00cdf370, 2, 1) + 153 bytes
[13] m_interpreter.dll:$L74683(0x784d6e7c, 0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0, 0) + 184 bytes
[14] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0, 2, 0x00cdf3bc "D敉") + 69 bytes
[15] m_interpreter.dll:_inEvalCmdNoEnd(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 1, 255, 0) + 16 bytes
[16] bridge.dll:enum inExecutionStatus __cdecl ThrowSignal(char const *)(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0x7c80b731, 0x01207c50, 0x01207c50) + 60 bytes
[17] bridge.dll:$L86781(0, 0, 0x784d6e58, 0x7c36b71f) + 432 bytes
[18] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271243, 0x4d5c3a47, 0x414c5441, 0x5c313742) + 93 bytes
[19] MATLAB.exe:0x00401ca9(4194304, 0, 271243, 0x01207c50)
[20] MATLAB.exe:0x00403d9f(594808, 0x7c93003d, 0x7ffd6000, 0x8054c6b8)
[21] kernel32.dll:0x7c817067(0x00403c1a, 0, 0, 0)
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 for information
on debugging MEX-files.
If it is an official MathWorks function, 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\ADMINI~1\LOCALS~1\Temp\matlab_crash_dump.2972
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.
什么问题,怎么解决阿
------------------------------------------------------------------------
Segmentation violation detected at Sun Nov 09 16:45:20 2008
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.1.0.246 (R14) Service Pack 3
MATLAB License: 161051
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 3)
Processor ID: x86 Family 15 Model 4 Stepping 1, GenuineIntel
Virtual Machine: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Charset: GBK
Register State:
EAX = 00cde664 EBX = 0f9fc190
ECX = 00000000 EDX = 00000200
ESI = 00cddeec EDI = 0f9fc190
EBP = 00cddec0 ESP = 00cddec0
EIP = 78517b38 FLG = 00010202
Stack Trace:
[0] libmx.dll:_MXGETPR@4(0x00cde664, 0x0f9fc170, 0x00cde660, 0) + 8 bytes
[1] effra.mexw32:0x0f9a11d7(0x00cddf24, 0x00cde660, 0x00cddf2c, 0x00cde6c0)
[2] libmex.dll:_mexRunMexFile(2, 0x00cde660, 3, 0x00cde6c0) + 82 bytes
[3] libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 73 bytes
[4] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 169 bytes
[5] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde660, 3, 0x00cde6c0) + 271 bytes
[6] m_interpreter.dll:int __cdecl mdDispatch(int,char const *,int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn * *)(511, 0x0ebcd110 "effra", 2, 0x00cde660) + 88 bytes
[7] m_interpreter.dll:_inDispatchFromStack(511, 0x0ebcd110 "effra", 2, 3) + 800 bytes
[8] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x0ebcd110 "effra", 511, 2, 3) + 145 bytes
[9] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(2, 0, 0, 0) + 2534 bytes
[10] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(2, 0, 0, 0) + 282 bytes
[11] m_interpreter.dll:_inInterPcode(2, 0x784d6e7c, 0, 0) + 81 bytes
[12] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cdf278, 0x00cdf370, 2, 1) + 153 bytes
[13] m_interpreter.dll:$L74683(0x784d6e7c, 0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0, 0) + 184 bytes
[14] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0, 2, 0x00cdf3bc "D敉") + 69 bytes
[15] m_interpreter.dll:_inEvalCmdNoEnd(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 1, 255, 0) + 16 bytes
[16] bridge.dll:enum inExecutionStatus __cdecl ThrowSignal(char const *)(0x02d4bb20 "[asd,qwe]=effra('R245ca.fld',2.5..", 0x7c80b731, 0x01207c50, 0x01207c50) + 60 bytes
[17] bridge.dll:$L86781(0, 0, 0x784d6e58, 0x7c36b71f) + 432 bytes
[18] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271243, 0x4d5c3a47, 0x414c5441, 0x5c313742) + 93 bytes
[19] MATLAB.exe:0x00401ca9(4194304, 0, 271243, 0x01207c50)
[20] MATLAB.exe:0x00403d9f(594808, 0x7c93003d, 0x7ffd6000, 0x8054c6b8)
[21] kernel32.dll:0x7c817067(0x00403c1a, 0, 0, 0)
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 for information
on debugging MEX-files.
If it is an official MathWorks function, 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\ADMINI~1\LOCALS~1\Temp\matlab_crash_dump.2972
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.
什么问题,怎么解决阿