Crash using a very simple Expert and a quick fix.....

 

Hello MT4 Community,

I attempted to run a very simple expert and the following log file appeared:

There has been a critical error
Time : 2008.03.24 21:40
Program : Client Terminal
Version : 4.00 (build: 213, 18 Mar 2008)
OS : Windows Vista Professional 6.0 (Build 6000)
Processors : 2 x X86 (level 15)
Memory : 1833920/875932 kb
Exception : C0000005
Address : 0046275F
Access Type : read
Access Addr : DA9D9000

Registers : EAX=02DA9D90 CS=001b EIP=0046275F EFLGS=00010286
: EBX=00000000 SS=0023 ESP=0461FF0C EBP=0461FF44
: ECX=00000000 DS=0023 ESI=0045F2DC FS=003b
: EDX=DA9D9000 ES=0023 EDI=02DA162C GS=0000

Stack Trace : 00454D13 771763DE 77243833 7731A9BD
: 00000000 00000000 00000000 00000000
: 00000000 00000000 00000000 00000000
: 00000000 00000000 00000000 00000000

Modules :
1 : 003D0000 00022000 c:\windows\system32\showerrmsg.dll
2 : 00400000 002A8000 c:\program files\testing metatrader platform\terminal.exe
3 : 00B80000 0004A000 c:\windows\system32\sysenv.dll
4 : 10000000 0000D000 c:\windows\system32\msnchathook.dll
5 : 6D6B0000 0011C000 c:\windows\system32\mfc42.dll
6 : 6E5B0000 00038000 c:\windows\system32\odbcint.dll
7 : 6E770000 00065000 c:\windows\system32\odbc32.dll
8 : 71F40000 00006000 c:\windows\system32\rasadhlp.dll
9 : 71F50000 00012000 c:\windows\system32\pnrpnsp.dll
10 : 72350000 0000F000 c:\windows\system32\napinsp.dll
11 : 72430000 00008000 c:\windows\system32\winrnr.dll
12 : 728F0000 00041000 c:\windows\system32\winspool.drv
13 : 72B40000 00087000 c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8\msvcp80.dll
14 : 72EE0000 0009B000 c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8\msvcr80.dll
15 : 73F30000 00007000 c:\windows\system32\midimap.dll
16 : 73F40000 00015000 c:\windows\system32\msacm32.dll
17 : 73F60000 00066000 c:\windows\system32\audioeng.dll
18 : 74060000 00030000 c:\windows\system32\wdmaud.drv
19 : 740C0000 00021000 c:\windows\system32\audioses.dll
20 : 740F0000 00009000 c:\windows\system32\msacm32.drv
21 : 743D0000 00038000 c:\windows\system32\oleacc.dll
22 : 74410000 00033000 c:\windows\system32\winmm.dll
23 : 74950000 00194000 c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll
24 : 74AF0000 0000F000 c:\windows\system32\nlaapi.dll
25 : 74B30000 0003F000 c:\windows\system32\uxtheme.dll
26 : 74C50000 00004000 c:\windows\system32\ksuser.dll
27 : 74C60000 00027000 c:\windows\system32\mmdevapi.dll
28 : 74D50000 0002D000 c:\windows\system32\wintrust.dll
29 : 74E20000 00005000 c:\windows\system32\msimg32.dll
30 : 74EE0000 00006000 c:\windows\system32\wshtcpip.dll
31 : 74EF0000 00007000 c:\windows\system32\avrt.dll
32 : 74FA0000 00038000 c:\windows\system32\rsaenh.dll
33 : 75210000 0003B000 c:\windows\system32\mswsock.dll
34 : 75280000 00008000 c:\windows\system32\version.dll
35 : 75400000 00020000 c:\windows\system32\dhcpcsvc6.dll
36 : 75420000 00007000 c:\windows\system32\winnsi.dll
37 : 75430000 00035000 c:\windows\system32\dhcpcsvc.dll
38 : 75470000 00019000 c:\windows\system32\iphlpapi.dll
39 : 75520000 000F1000 c:\windows\system32\crypt32.dll
40 : 75660000 00012000 c:\windows\system32\msasn1.dll
41 : 756A0000 0002B000 c:\windows\system32\dnsapi.dll
42 : 759D0000 0002C000 c:\windows\system32\apphelp.dll
43 : 75A30000 00014000 c:\windows\system32\secur32.dll
44 : 75A50000 0001E000 c:\windows\system32\userenv.dll
45 : 75B90000 00007000 c:\windows\system32\psapi.dll
46 : 75BA0000 00029000 c:\windows\system32\imagehlp.dll
47 : 75BD0000 000CF000 c:\windows\system32\wininet.dll
48 : 75DD0000 0008C000 c:\windows\system32\oleaut32.dll
49 : 75E60000 00049000 c:\windows\system32\wldap32.dll
50 : 75EB0000 00ACE000 c:\windows\system32\shell32.dll
51 : 76980000 00003000 c:\windows\system32\normaliz.dll
52 : 76990000 0004B000 c:\windows\system32\gdi32.dll
53 : 769E0000 00144000 c:\windows\system32\ole32.dll
54 : 76B30000 00074000 c:\windows\system32\comdlg32.dll
55 : 76BB0000 000C7000 c:\windows\system32\msctf.dll
56 : 76C80000 0002D000 c:\windows\system32\ws2_32.dll
57 : 76CB0000 000BF000 c:\windows\system32\advapi32.dll
58 : 76D70000 000C3000 c:\windows\system32\rpcrt4.dll
59 : 76E40000 00084000 c:\windows\system32\clbcatq.dll
60 : 76ED0000 00188000 c:\windows\system32\setupapi.dll
61 : 77060000 00045000 c:\windows\system32\iertutil.dll
62 : 770B0000 0007D000 c:\windows\system32\usp10.dll
63 : 77130000 0001E000 c:\windows\system32\imm32.dll
64 : 77150000 000AA000 c:\windows\system32\msvcrt.dll
65 : 77200000 000D8000 c:\windows\system32\kernel32.dll
66 : 772E0000 0011E000 c:\windows\system32\ntdll.dll
67 : 77400000 00006000 c:\windows\system32\nsi.dll
68 : 77410000 00055000 c:\windows\system32\shlwapi.dll
69 : 77470000 00009000 c:\windows\system32\lpk.dll
70 : 77480000 0009E000 c:\windows\system32\user32.dll

Call stack :
0045F260:34FF [0046275F] ?ExecuteStaticAsm@CExpertInterior (terminal.exe)
00454C00:0113 [00454D13] ?RunExpertInt@CExpertInterior (terminal.exe)

The expert I attempted to run:

//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
//string Phrase = "The minimum lot size is ==>";
//double minlot = MarketInfo(Symbol(),MODE_MINLOT);
//MessageBox(Phrase + minlot);
//----
MessageBox("The minimum lot size is ==>" + MarketInfo(Symbol(),MODE_MINLOT));

return(0);
}
//+------------------------------------------------------------------+


However, I fixed it using this code...

//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
string Phrase = "The minimum lot size is ==>";
double minlot = MarketInfo(Symbol(),MODE_MINLOT);
MessageBox(Phrase + minlot);
//----


return(0);
}
//+------------------------------------------------------------------+

This is very strange.......................

 
Download client terminal again and recompile your code. It must be build 213 dated 25 Mar
Reason: