The MQL program (script or Expert Advisor) calls the Visual C++ DLL for network communication, the DLL interface function creates a thread to wait for and receive data, when the socket has data arrival, the thread receives the data and then inform the script or Expert Advisor to display it in the chart. When the chart is closed, if the sender continues to send data, the problem occurs in the terminal as follows:
When the chart is closed, the MQL program (script or Expert Advisor) end, but the thread that create by DLL interface function does not exit, in this case, if the sender continue to communicat with the thread, the problem above occurs; if the thread exit before the closing of the chart, that problem does not occurs. How can you exit the thread that create by the DLL interface function before the chart is closed?
open a terminal CMD and type eventvwr then enter
then look in your logs to see if there is a crash code about the event.
The windows log as follows:
错误应用程序名称: terminal.exe，版本: 188.8.131.520，时间戳: 0x00ad7e00
错误模块名称: MSVCR100.dll_unloaded，版本: 0.0.0.0，时间戳: 0x4df2be1e
错误进程 ID: 0x1d68
错误应用程序路径: C:\Program Files\FXCM MetaTrader 4\terminal.exe
报告 ID: 26b23077-1afc-11e5-ba83-d027884f6667
错误模块名称: Receive.dll_unloaded，版本: 0.0.0.0，时间戳: 0x558b792b
报告 ID: 369f922b-1afc-11e5-ba83-d027884f6667