Amibroker Crash

Snake.Head

Well-Known Member
#11
strange.... at my end i have checed your formula on all scripts .. and from 1min to 5 min....
anyway try this code and check weather AB crashes or not

Thank you
Ok will check and reply here
I see you have add few lines in.Can tell what does it do ?
So what does it do and how can missing above code can cause crash?
Asking to gain knowledge,not arguing

In ema section you add TimeFrameRestore();

and on daily high and low you add
//Plot (SelectedValue(TimeFrameGetPrice("H", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorGreen));
//Plot (SelectedValue(TimeFrameGetPrice("L", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorRed));
 

amitrandive

Well-Known Member
#12
Me and support team went into detail bit by bit.Could not find reason for crash.
Lastly they said check with different cpu and mobo.
This not something because of using legal or illegal.
Same problem was able re-produce in trial,register and illegal version.
Maybe your Amibroker is clashing with another data feed.Try and install Amibroker in another drive,where there is no datafeed.
AFL will ideally not crash Ami,unless there is a plugin issue.
 

Raghuveer

Well-Known Member
#14
Use the very basic Price afl that comes with ami. Otherwise issue will change from ami crashing frequently to afl debugging even if afl may not be the problem.
 

KelvinHand

Well-Known Member
#16
Already done that...
It not datafeed that causing crash happen randomly even if there no data coming into amibroker.
I see that you got 2 version of MSVC. Are you programming anything yourself like plugin ?

Is there any (private or not mentioned) plugin installed? AND
was used in old version of amibroker (before)? WHERE
ported into new amibroker and crashed ?

IF Yes, Remove the plug-in and retest again.
 

TracerBullet

Well-Known Member
#17
If AB is crashing due to env and was working earlier -

Probably wont help but you can run below just to ensure that system files are ok
Code:
sfc /scannow
Can also run check disk first just in case
Code:
chkdsk /f
Else maybe try system restore or as last resort, windows reinstallation
 
#18
Working fine with my Ami version 5.7 . Let me check in market hour.

Amibroker has been crashing on my system.
I am trying to find out.Reason for crash.But still unable to it
Even Amibroker Dev team isn't able figure it.
Crash randomly there is no pattern in it. live market or offline mode
While trying edit trend line, draw or while backfill or bar reply
There is no heavy afl,just simple price action afl- Will attach afl in below
Checked with trial, ahem and legal version version test - 5.60.3,5.70,5.80 and latest 5.90.1
legal version version test on 5.50
Crashed on every version
End up doing number of clean windows installs
I have done following things
checked with different set ram from different company + different memory size from 2gb,4gb and 8gb
Reduce in cache memory
Installed in different drive
Checked with different os win 7 64bit and win 8.1 64bit and win 10
New database with one year of data
Database with 22 days backfill

have following things installed which is required to run amibroker
.NET Framework 4.0 x86-x64
.NET Framework Version 4.5.2 x86-x64
.NET 3.5 x86-x64
Microsoft Visual C++ 2010 Redistributable x86-x64
older version of Microsoft Visual C++

Info about my system
Intel Core 2 Duo E7500 2.8ghz
Intel DG35EC Motherboard
4GB Ram [2gb X 2]

Did Prime95 stress on cpu and ram and it clear very well...
Any suggestions

Code:
AmiBroker version 5.90.1.5901
( 32-bit, cooltool.dll 5.90.1,  mfc42.dll 6.6.8063,  msvcrt.dll 7.0.9600 )

Microsoft Windows 7 version 6.3 (Build 9600) WOW64
Service Pack 0.0, Common Controls: 6.16

Unhandled exception
Type:	CSysException
Code:	c0000005
Description:	ACCESS VIOLATION
Address:	004DD8F8

Detailed exception information:
Broker.exe caused an EXCEPTION_ACCESS_VIOLATION in module Broker.exe at 0023:004DD8F8

Call Stack:
0023:004DD8F8 Broker.exe
0023:004DE8FD Broker.exe
0023:0046B4FB Broker.exe
0023:0046BB52 Broker.exe
0023:0047F685 Broker.exe
0023:6A833050 MFC42.DLL, Ordinal3668()+71725 byte(s)
0023:6A803FA8 MFC42.DLL, Ordinal6374()+0043 byte(s)
0023:6A80B7FD MFC42.DLL, Ordinal1109()+0262 byte(s)
0023:6A80B6D2 MFC42.DLL, Ordinal1579()+0249 byte(s)
0023:75D8775E USER32.dll, CallNextHookEx()+0299 byte(s)
0023:75D88C2A USER32.dll, FindWindowA()+0517 byte(s)
0023:75D88DD6 USER32.dll, FindWindowA()+0945 byte(s)
0023:75D88F78 USER32.dll, FindWindowA()+1363 byte(s)
0023:77A0D792 ntdll.dll, KiUserCallbackDispatcher()+0046 byte(s)
0023:6A81AF3F MFC42.DLL, Ordinal5307()+0021 byte(s)
0023:6A81AEED MFC42.DLL, Ordinal5715()+0049 byte(s)
0023:0051BFF5 Broker.exe
0023:7773A534 KERNEL32.DLL, BaseThreadInitThunk()+0014 byte(s)
0023:77A18F8B ntdll.dll, RtlInitializeExceptionChain()+0132 byte(s)
0023:77A18F61 ntdll.dll, RtlInitializeExceptionChain()+0090 byte(s)

CPU Registers:
EAX=FFFFFFFF  EBX=0514C020  ECX=00008A77  EDX=0514BFF8  ESI=02A19B60
EDI=027328B8  EBP=0018FFEC  ESP=0018FFE4  EIP=77A18F61  FLG=00010286
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

Additional information:

Multi-threaded charts - ENABLED

Number of stock loaded: 7
Currently selected stock: TATASTEEL
Number of quotes (current stock): 183690

Workspace:
Data source = (default), Data local mode = 1, NumBars = 1000

Preferences:
Data source = (local), Data local mode = 1, NumBars = 1000

Command history:
2889 - Text tool--Text tool
2889 - Text tool--Text tool
57632 - Delete selected item--Delete
3233 - Save the database--Save the database
2889 - Text tool--Text tool
2817 - Draw trendlines--Trendline
3233 - Save the database--Save the database
2889 - Text tool--Text tool
3233 - Save the database--Save the database
2889 - Text tool--Text tool
2817 - Draw trendlines--Trendline
57637 - Insert Clipboard contents--Paste
57634 - Copy the selection and put it on the Clipboard--Copy
2817 - Draw trendlines--Trendline
3233 - Save the database--Save the database
2889 - Text tool--Text tool

Cache manager stats:
Number of list elements: 3
Number of map elements: 3
Hash table size: 5987

Memory status:
  MemoryLoad: 23 %
  TotalPhys:      4183620K  AvailPhys:      3212388K
  TotalPageFile:  4194303K  AvailPageFile:  4194303K
  TotalVirtual:   4194176K  AvailVirtual:   3998744K
AFL which i am using
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g, Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();


_SECTION_BEGIN("EMA 5 MIN");

TimeFrameSet(in5Minute);
m5= EMA(Close,20) ;
Plot(TimeFrameExpand(m5, in5Minute), "", ParamColor( "5 Min Color", colorBlue ), ParamStyle("Style", styleDashed));
TimeFrameRestore();
_SECTION_END();



_SECTION_BEGIN("EMA 15 MIN");
TimeFrameSet(in15Minute);
m15= EMA(Close,20) ;
Plot(TimeFrameExpand(m15, in15Minute), "", ParamColor( "15 Min Color", colorLightGrey ), ParamStyle("Style", styleDashed,styleNoLabel));
TimeFrameRestore();
_SECTION_END();


_SECTION_BEGIN("EMA 60 MIN");
TimeFrameSet(60*in1Minute);
m60= EMA(Close,20) ;
Plot(TimeFrameExpand(m60, 60*in1Minute), "", ParamColor( "60 Min Color", colorGrey50 ), ParamStyle("Style", styleDashed,styleNoLabel));
TimeFrameRestore();
_SECTION_END();

_SECTION_BEGIN("Timer"); 
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );

//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;

x=Param(" X Position ",1,0,1000,1000);
y=Param(" Y Position ",20,0,1000,1000);

GfxSetBkMode(1);
GfxSetTextColor(colorWhite);
GfxTextOut( "" +SecsToGo+" / "+NumToStr( TimeFrame, 1.0 ), x, y );
_SECTION_END();

Plot (SelectedValue(TimeFrameGetPrice("H", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorGreen));
Plot (SelectedValue(TimeFrameGetPrice("L", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorRed));
 

mastermind007

Well-Known Member
#19
Amibroker has been crashing on my system.
I am trying to find out.Reason for crash.But still unable to it
Even Amibroker Dev team isn't able figure it.
Crash randomly there is no pattern in it. live market or offline mode
While trying edit trend line, draw or while backfill or bar reply
There is no heavy afl,just simple price action afl- Will attach afl in below
Checked with trial, ahem and legal version version test - 5.60.3,5.70,5.80 and latest 5.90.1
legal version version test on 5.50
Crashed on every version
End up doing number of clean windows installs
I have done following things
checked with different set ram from different company + different memory size from 2gb,4gb and 8gb
Reduce in cache memory
Installed in different drive
Checked with different os win 7 64bit and win 8.1 64bit and win 10
New database with one year of data
Database with 22 days backfill

have following things installed which is required to run amibroker
.NET Framework 4.0 x86-x64
.NET Framework Version 4.5.2 x86-x64
.NET 3.5 x86-x64
Microsoft Visual C++ 2010 Redistributable x86-x64
older version of Microsoft Visual C++

Info about my system
Intel Core 2 Duo E7500 2.8ghz
Intel DG35EC Motherboard
4GB Ram [2gb X 2]

Did Prime95 stress on cpu and ram and it clear very well...
Any suggestions

Code:
AmiBroker version 5.90.1.5901
( 32-bit, cooltool.dll 5.90.1,  mfc42.dll 6.6.8063,  msvcrt.dll 7.0.9600 )

Microsoft Windows 7 version 6.3 (Build 9600) WOW64
Service Pack 0.0, Common Controls: 6.16

Unhandled exception
Type:	CSysException
Code:	c0000005
Description:	ACCESS VIOLATION
Address:	004DD8F8

Detailed exception information:
Broker.exe caused an EXCEPTION_ACCESS_VIOLATION in module Broker.exe at 0023:004DD8F8

Call Stack:
0023:004DD8F8 Broker.exe
0023:004DE8FD Broker.exe
0023:0046B4FB Broker.exe
0023:0046BB52 Broker.exe
0023:0047F685 Broker.exe
0023:6A833050 MFC42.DLL, Ordinal3668()+71725 byte(s)
0023:6A803FA8 MFC42.DLL, Ordinal6374()+0043 byte(s)
0023:6A80B7FD MFC42.DLL, Ordinal1109()+0262 byte(s)
0023:6A80B6D2 MFC42.DLL, Ordinal1579()+0249 byte(s)
0023:75D8775E USER32.dll, CallNextHookEx()+0299 byte(s)
0023:75D88C2A USER32.dll, FindWindowA()+0517 byte(s)
0023:75D88DD6 USER32.dll, FindWindowA()+0945 byte(s)
0023:75D88F78 USER32.dll, FindWindowA()+1363 byte(s)
0023:77A0D792 ntdll.dll, KiUserCallbackDispatcher()+0046 byte(s)
0023:6A81AF3F MFC42.DLL, Ordinal5307()+0021 byte(s)
0023:6A81AEED MFC42.DLL, Ordinal5715()+0049 byte(s)
0023:0051BFF5 Broker.exe
0023:7773A534 KERNEL32.DLL, BaseThreadInitThunk()+0014 byte(s)
0023:77A18F8B ntdll.dll, RtlInitializeExceptionChain()+0132 byte(s)
0023:77A18F61 ntdll.dll, RtlInitializeExceptionChain()+0090 byte(s)

CPU Registers:
EAX=FFFFFFFF  EBX=0514C020  ECX=00008A77  EDX=0514BFF8  ESI=02A19B60
EDI=027328B8  EBP=0018FFEC  ESP=0018FFE4  EIP=77A18F61  FLG=00010286
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

Additional information:

Multi-threaded charts - ENABLED

Number of stock loaded: 7
Currently selected stock: TATASTEEL
Number of quotes (current stock): 183690

Workspace:
Data source = (default), Data local mode = 1, NumBars = 1000

Preferences:
Data source = (local), Data local mode = 1, NumBars = 1000

Command history:
2889 - Text tool--Text tool
2889 - Text tool--Text tool
57632 - Delete selected item--Delete
3233 - Save the database--Save the database
2889 - Text tool--Text tool
2817 - Draw trendlines--Trendline
3233 - Save the database--Save the database
2889 - Text tool--Text tool
3233 - Save the database--Save the database
2889 - Text tool--Text tool
2817 - Draw trendlines--Trendline
57637 - Insert Clipboard contents--Paste
57634 - Copy the selection and put it on the Clipboard--Copy
2817 - Draw trendlines--Trendline
3233 - Save the database--Save the database
2889 - Text tool--Text tool

Cache manager stats:
Number of list elements: 3
Number of map elements: 3
Hash table size: 5987

Memory status:
  MemoryLoad: 23 %
  TotalPhys:      4183620K  AvailPhys:      3212388K
  TotalPageFile:  4194303K  AvailPageFile:  4194303K
  TotalVirtual:   4194176K  AvailVirtual:   3998744K
AFL which i am using
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g, Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();


_SECTION_BEGIN("EMA 5 MIN");

TimeFrameSet(in5Minute);
m5= EMA(Close,20) ;
Plot(TimeFrameExpand(m5, in5Minute), "", ParamColor( "5 Min Color", colorBlue ), ParamStyle("Style", styleDashed));
TimeFrameRestore();
_SECTION_END();



_SECTION_BEGIN("EMA 15 MIN");
TimeFrameSet(in15Minute);
m15= EMA(Close,20) ;
Plot(TimeFrameExpand(m15, in15Minute), "", ParamColor( "15 Min Color", colorLightGrey ), ParamStyle("Style", styleDashed,styleNoLabel));
TimeFrameRestore();
_SECTION_END();


_SECTION_BEGIN("EMA 60 MIN");
TimeFrameSet(60*in1Minute);
m60= EMA(Close,20) ;
Plot(TimeFrameExpand(m60, 60*in1Minute), "", ParamColor( "60 Min Color", colorGrey50 ), ParamStyle("Style", styleDashed,styleNoLabel));
TimeFrameRestore();
_SECTION_END();

_SECTION_BEGIN("Timer"); 
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );

//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;

x=Param(" X Position ",1,0,1000,1000);
y=Param(" Y Position ",20,0,1000,1000);

GfxSetBkMode(1);
GfxSetTextColor(colorWhite);
GfxTextOut( "" +SecsToGo+" / "+NumToStr( TimeFrame, 1.0 ), x, y );
_SECTION_END();

Plot (SelectedValue(TimeFrameGetPrice("H", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorGreen));
Plot (SelectedValue(TimeFrameGetPrice("L", inDaily, 1, expandLast)), "", IIf(abs(BarIndex() - SelectedValue(BarIndex())) > 5, GetChartBkColor(), colorRed));
The Dump log says 183690 quotes were there for TATASTEEL and since you've told that you had back filled for 22 days, that is close to 8400 quotes per day!!!

To pin down on the error, Create a 32 bit virtual machine on your 64 bit machine and install Ami there. Also, get rid of all the non-standard plugins for
now (empty entire folder, I mean). Your AFL does not use any, so it will be OK.

In the core dump, Ordinal3668 in MFC42 dll appeared very odd for it had 71K bytes.... I did a quick check and the MFC42 dll that I have does not have that ordinal function.... Is your anti virus up to date?
 

Snake.Head

Well-Known Member
#20
I see that you got 2 version of MSVC. Are you programming anything yourself like plugin ?

Is there any (private or not mentioned) plugin installed? AND
was used in old version of amibroker (before)? WHERE
ported into new amibroker and crashed ?

IF Yes, Remove the plug-in and retest again.
No 3rd party plugin is used
Not in new or old version
Used Tracerbullet RTD app

If AB is crashing due to env and was working earlier -

Probably wont help but you can run below just to ensure that system files are ok
Code:
sfc /scannow
Can also run check disk first just in case
Code:
chkdsk /f
Else maybe try system restore or as last resort, windows reinstallation
TB will try do that...
I already done clean install for windows no of time

The Dump log says 183690 quotes were there for TATASTEEL and since you've told that you had back filled for 22 days, that is close to 8400 quotes per day!!!

To pin down on the error, Create a 32 bit virtual machine on your 64 bit machine and install Ami there. Also, get rid of all the non-standard plugins for
now (empty entire folder, I mean). Your AFL does not use any, so it will be OK.

In the core dump, Ordinal3668 in MFC42 dll appeared very odd for it had 71K bytes.... I did a quick check and the MFC42 dll that I have does not have that ordinal function.... Is your anti virus up to date?
I have tested with two database one with one year data and one with recently 22days for data in it...
Never messed MFC42 dll
I have getting same error on win 7 and win 8
 

Similar threads