|
<>昨天初次尝试编写MEX,用C写了几个简单的程序,在matlab环境中调用编译命令。后来又在VC++中编译,做了一大堆的设置之后,编译成功,在VC中用debug,和matlab的交互也很正常。</P>
<>只是今天,一打开matlab就弹出一个窗口提示什么:</P>
<>Runtime error!</P>
<P>Program: F:\MATLAB6P5\BIN\WIN32\MATLAB.EXE</P>
<P>This application has requested the Runtime to terminate it in an unusual way.Please contace the application's support team for more information.</P>
<P align=center>确定</P>
<P>如果点击确定,matlab就自动关闭了。</P>
<P>而且,matlab命令窗口中是一大堆的错误提示:</P>
<P>------------------------------------------------------------------------
Segmentation violation detected at Sat Aug 07 19:49:38 2004
------------------------------------------------------------------------</P>
<P>Configuration:
MATLAB Version: 6.5.0.180913a (R13)
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 1)
Processor ID: x86 Family 6 Model 9 Stepping 5, GenuineIntel
Virtual Machine: Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
(mixed mode)</P>
<P>Register State:
EAX = 00000000 EBX = 0a7b4da8
ECX = 00007fff EDX = 00000a01
ESI = 15211a98 EDI = 00dfd27c
EBP = 00dfd26c ESP = 00dfd248
EIP = 7900ea88 FLG = 00010202</P>
<P>Stack Trace:
[0] MFC42.DLL:0x7900ea88(0x00dfd27c, 0x0a7b4c68, 0x7909f368, 0x7909d674)
[1] MFC42.DLL:0x79065b7e(0x7a541db4 "MatlabCommandState", 0x0a7b4d28, 0x0a7b4c68, 0x7a4fb3c0)
[2] uiw.dll:protected: int __thiscall CCmdFrame::CreateToolBar(void)(0x0a7b4c68, 0x00dfd590, 0x00dfd378, 0x79001d42) + 179 bytes
[3] uiw.dll:protected: int __thiscall CCmdFrame::OnCreate(struct tagCREATESTRUCTA *)(0x00dfd590, 0x0a7b4c68, 0x0a7b4c68, 290288) + 96 bytes
[4] MFC42.DLL:0x79001d42(1, 0, 0x7a535f08, 0x00dfd394)
[5] MFC42.DLL:0x79001b63(1, 0, 0x00dfd590, 0x00dfd590)
[6] MFC42.DLL:0x79001aec(0, 2491140, 1, 0)
[7] MFC42.DLL:0x79001a74(2491140, 1, 0, 0x00dfd590)
[8] uiw.dll:long __stdcall AfxWndProcDllStatic(struct HWND__ *,unsigned int,unsigned int,long)(2491140, 1, 0, 0x00dfd590) + 46 bytes
[9] USER32.dll:0x77d13a50(0x7a531500, 2491140, 1, 0)
[10] USER32.dll:0x77d1a8e5(0, 0x7a531500, 2491140, 1)
[11] USER32.dll:0x77d144f5(0x00f30920, 1, 0, 0x00dfd590)
[12] USER32.dll:0x77d1886b(0x00dfd568, 184, 184, 58)
[13] ntdll.dll:0x77f75da3(0x80000000, 0, 0x00dfdb3c, 0x00cf4000)
[14] USER32.dll:0x77d18aa1(0x80000000, 0x00046e48 "Afx:7a4f0000:b:10013:6:41a046f", 0x00dfdb3c, 0x00cf4000)
[15] USER32.dll:0x77d18b43(0, 0x00046e48 "Afx:7a4f0000:b:10013:6:41a046f", 0x1520fb80 "MATLAB Command Window", 0x00cf4000)
[16] MFC42.DLL:0x7900c486(0, 0x00046e48 "Afx:7a4f0000:b:10013:6:41a046f", 0x1520fb80 "MATLAB Command Window", 0x00cf8000)
[17] MFC42.DLL:0x79012050(0x00046e48 "Afx:7a4f0000:b:10013:6:41a046f", 0x1520fb80 "MATLAB Command Window", 0x00cf8000, 0x790d42b8)
[18] uiw.dll:public: virtual int __thiscall CCmdFrame:oadFrame(unsigned int,unsigned long,class CWnd *,struct CCreateContext *)(129, 0x00cf8000, 0, 0x00dfdd90) + 107 bytes
[19] MFC42.DLL:0x79011c7d(0x0a9026b8, 0, 1, 0x0047f617)
[20] MFC42.DLL:0x79016360(0, 0, 1, 0x0047f617)
[21] uiw.dll:_MSWCreateCommandWindow@8(0x00dfde08, 0x7a541794 "MATLAB Command Window", 0x0047f617, 1) + 50 bytes
[22] uiw.dll:_opnCmdWnd(4194304, 1, 0x7a541794 "MATLAB Command Window", 1) + 24 bytes
[23] uiw.dll:_uiwSetupWindows(4194304, 1, 1, 0x70a9f1ab) + 131 bytes
[24] matlab.exe:_WinMain@16(4194304, 0, 271244, 1) + 3819 bytes
[25] matlab.exe:_WinMainCRTStartup(0x70a9f1ab, 0x80000002, 0x7ffdf000, 0xefab9cf0) + 308 bytes
[26] kernel32.dll:0x77e614c7(0x0047172c, 0, 0, 0)</P>
<P>Please follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:</P>
<P> 1. Send this crash report to <a href="http://www.shumo.com/bbs/mailtsegv@mathworks.com" target="_blank" >segv@mathworks.com</A> for automated analysis.
For your convenience, this information has been recorded in:
C:\DOCUME~1\zds\LOCALS~1\Temp\matlab_crash_dump.3208</P>
<P> 2. Also, if the problem is reproducible, send the crash report to
<a href="http://www.shumo.com/bbs/mailtsupport@mathworks.com" target="_blank" >support@mathworks.com</A> 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 prior to this crash report
A technical support engineer will contact you with further information.</P>
<P>Thank you for your assistance. Please save your workspace and restart
MATLAB before continuing your work.</P>
<P>我记得在用MATLAB编译C文件时出现过类似的错误信息。
请问,大家有没有遇到过类似的问题,除了重装matlab外,还有没有其它的方法?谢谢。</P>
<TABLE borderColor=#cccccc cellSpacing=2 cellPadding=3 width="100%" bgColor=#ffffff border=1>
<TR>
<TD> </TD></TR></TABLE> |
|