Insufficient memory for 64-bit Windows 10, was: crash report Wed 8-15-2018

What can I do to resolve this?

AmiBroker version 6.28.0.6280
( 64-bit, cooltool.dll 6.28.0,  mfc42.dll 6.28.0,  msvcrt.dll 7.0.14393 )

Microsoft Windows 10 version 10.0 (Build 14393) 
Service Pack 0.0, Common Controls: 6.16

Unhandled exception
Type:	CSysException
Code:	c0000005
Description:	ACCESS VIOLATION
Address:	00007FF7636DDAD3

Call Stack:
00007FF7636DDAD3 Broker, (function-name not available)() +0 byte(s)
6E6F697469736F70 (module-name not available), (function-name not available)() +0 byte(s)
000002BC3620EA98 (module-name not available), (function-name not available)() +0 byte(s)
000002BC7DF39518 (module-name not available), (function-name not available)() +0 byte(s)
000002BC3620EA98 (module-name not available), (function-name not available)() +0 byte(s)
697463610A20656B (module-name not available), (function-name not available)() +0 byte(s)
2061206E69206E6F (module-name not available), (function-name not available)() +0 byte(s)
6D20796C656D6974 (module-name not available), (function-name not available)() +0 byte(s)
6F202C72656E6E61 (module-name not available), (function-name not available)() +0 byte(s)
646C756F68732072 (module-name not available), (function-name not available)() +0 byte(s)
72616D2065687420 (module-name not available), (function-name not available)() +0 byte(s)
69666564206E6967 (module-name not available), (function-name not available)() +0 byte(s)
72636E6920746963 (module-name not available), (function-name not available)() +0 byte(s)
6577202C65736165 (module-name not available), (function-name not available)() +0 byte(s)
6576726573657220 (module-name not available), (function-name not available)() +0 byte(s)
6769722065687420 (module-name not available), (function-name not available)() +0 byte(s)
696C206F74207468 (module-name not available), (function-name not available)() +0 byte(s)
2065746164697571 (module-name not available), (function-name not available)() +0 byte(s)
6E6F697469736F70 (module-name not available), (function-name not available)() +0 byte(s)
6F687469770A2073 (module-name not available), (function-name not available)() +0 byte(s)
69766F7270207475 (module-name not available), (function-name not available)() +0 byte(s)
72756620676E6964 (module-name not available), (function-name not available)() +0 byte(s)
746F6E2072656874 (module-name not available), (function-name not available)() +0 byte(s)
6F206E6920656369 (module-name not available), (function-name not available)() +0 byte(s)
206F742072656472 (module-name not available), (function-name not available)() +0 byte(s)
2065726F74736572 (module-name not available), (function-name not available)() +0 byte(s)
63206E696772616D (module-name not available), (function-name not available)() +0 byte(s)
636E61696C706D6F (module-name not available), (function-name not available)() +0 byte(s)
6F6363410A0A2E65 (module-name not available), (function-name not available)() +0 byte(s)
355544203A746E75 (module-name not available), (function-name not available)() +0 byte(s)
00000A3130303933 (module-name not available), (function-name not available)() +0 byte(s)


Additional information:

Multi-threaded charts - ENABLED

Number of stock loaded: 1542
Currently selected stock: TSLA
Number of quotes (current stock): 6888

Workspace:
Data source = IBRK, Data local mode = 1, NumBars = 100000

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

Command history:

Cache manager stats:
Number of list elements: 156
Number of map elements: 156
Hash table size: 16001

Memory status:
  MemoryLoad: 70 %
  TotalPhys:      2096736K  AvailPhys:       610952K
  TotalPageFile:  4764532K  AvailPageFile:  1283188K
  TotalVirtual:  4294967168K  AvailVirtual:  4292739728K


Log:
Logging started 2018-08-14 11:07:57
    11.19 ms : Enabling low frag heap (0.21 ms)
    11.40 ms : Launching splash screen (11.85 ms)
    23.24 ms : Waiting for splash screen (17.45 ms)
    40.69 ms : Waiting for splash screen (16.65 ms)
    57.33 ms : Waiting for splash screen (14.14 ms)
    71.48 ms : Waiting for splash screen (30.95 ms)
   102.43 ms : Alloc other stuff (12.02 ms)
   114.45 ms : Loading amisci.dll (24.98 ms)
   139.43 ms : Setting up SEH translator (352.36 ms)
   491.79 ms : Initializing OLE (0.13 ms)
   491.92 ms : Initializing RichEdit (112.81 ms)
   604.73 ms : Checking current working directory (0.99 ms)
   605.71 ms : Loading persistent variables (0.33 ms)
   606.04 ms : Loading MRU lists (3.22 ms)
   609.26 ms : Loading commisison table (0.08 ms)
   609.33 ms : Loading preferences (1.95 ms)
   611.28 ms : Initializing display settings (2.71 ms)
   613.99 ms : Loading old groups and markets (0.92 ms)
   614.91 ms : Loading GICS and ICB (15.32 ms)
   630.23 ms : Loading plugins (0.85 ms)
   631.09 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\CMAE.dll'  (30.05 ms)
   661.13 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\DDE.dll'  (8.11 ms)
   669.24 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\eSignal.dll'  (540.45 ms)
  1209.69 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\fxABfunctions.dll'  (1.33 ms)
  1211.02 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\IB.dll'  (10.58 ms)
  1221.60 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\IQFeed.dll'  (1.85 ms)
  1223.44 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\MS.dll'  (0.97 ms)
  1224.41 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\ODBC.dll'  (55.52 ms)
  1279.94 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\ODBCA.dll'  (2.56 ms)
  1282.50 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\PSOSample.dll'  (2.09 ms)
  1284.59 ms :  Loading 'C:\Program Files\AmiBroker\Plugins\Tribes.dll'  (2.85 ms)
  1287.44 ms :  Checking for any new non-certified plugins (0.14 ms)
  1287.59 ms :  Done. (0.07 ms)
  1287.66 ms : Loading AT interfaces (0.98 ms)
  1288.63 ms : Loading AFL function table (45.04 ms)
  1333.67 ms : Init chart infos (5.24 ms)
  1338.91 ms : Loading parameters (14.67 ms)
  1353.57 ms : Loading chart infos (1.63 ms)
  1355.20 ms : Loading custom tools (1.92 ms)
  1357.12 ms : Allocating lists (0.21 ms)
  1357.33 ms : Loading layers and alerts (4.73 ms)
  1362.06 ms : Loading miscellaneous data (0.14 ms)
  1362.20 ms : Adding MDI templates (64.22 ms)
  1426.42 ms : Register OLE server (49.03 ms)
  1475.45 ms : Creating main frame object (110.19 ms)
  1585.64 ms : Loading main frame (5708.86 ms)
  7294.50 ms : Parsing command line (0.09 ms)
  7294.59 ms : Checking Broker.Document object registration (1.67 ms)
  7296.26 ms : Setting browser emulation to IE11 (0.06 ms)
  7296.32 ms : Dispatch commands via ProcessShellCommand (0.06 ms)
  7296.38 ms : Showing main frame window (889.49 ms)
  8185.87 ms : Setting up accelerators (77.30 ms)
  8263.18 ms : Loading database (LoadMarketData) (2428.73 ms)
 10691.90 ms : Setting active symbol (1090.01 ms)
 11781.92 ms : Opening default chart (204.78 ms)
 11986.69 ms : Loading default workspace/layout (286.38 ms)
 12273.07 ms : Closing startup splash screen (async in 1 second) (2.06 ms)
 12275.13 ms : Starting up schedule (6.23 ms)
 12281.36 ms : *InitInstance finished

Check your other post for inputs.

@tedpenner I don't know your code, so my remarks might not be relevant, but there is a chance that your problems might result only from mistakes in your code (inefficient coding in general - leading to crashes) or subscribing to too many symbols when working with RT plugin. AmiBroker allocates appropriate amount of RAM for each Symbol and you might run out of it. The best solution in that case is equipping your computer with additional RAM. If not possible, there are two effective ways of conserving RAM when working with RT plugin.

  1. You can try decreasing Tools --> Preferences --> In-memory cache size. I quote from: Performance tuning tips

Image%202

The "in-memory cache" size defined in Tools->Preferences, "Data" tab controls the number of symbols in the cache and maximum amount of memory consumed by the cache. While larger cache generally speeds up processing because data do not need to be read from disk and written back all the time, you may run out of memory on certain situations when your cache is too large, especially on 32-bit operating system that limits the available virtual memory per process to 2GB. To avoid running out of memory, go to Tools->Preferences, "Data" and decrease the size of in-memory cache. To set it to minimum, enter "11" (eleven) into "in-memory cache (max. symbols)".
IMPORTANT: It is advised NOT to decrease the cache when your databases are relatively small (few hundred MB) as larger cache will speed up the access. Large cache is good thing as long as you do not run out of memory.

  1. If necessary, consider decreasing Number of bars" in File --> Database Settings. Another quote from the same source:

This is the most often mistake people make. For example I have seen 50000 entered into "Number of bars" entered for end-of-day database. This does not make sense because 50000 daily bars is 192 years!!! There is no data source that offers such history and entering that amount is waste of memory. You need to keep in mind that what ever you enter here forces AmiBroker to actually allocate memory for that many bars. Each data bar is 40 bytes. So if you enter 100000 bars, you will force AmiBroker to actually allocate 4MB of memory per symbol. It may not sound too much but AmiBroker keeps a cache of recently used data and if you have defined the cache that is 500 symbols large you will be able to hit 2GB of memory that way. So always look at what File->Database Settings dialog displays next to "Number of bars" field. It will display the number of days equivalent to entered number of bars and choosen base time interval. Make sure that you only enter resonable values and be aware that whatever you enter here has performance consequences. The consequences do not end with memory consumption alone, but also in speed. Processing more bars means more CPU time, especially considering the fact that while small amounts of data can be kept in on-chip CPU cache, large amounts can not. Now considering that on-chip cache is usually 10 (ten) times faster than regular memory you immediately realize that specifying too much bars here result in performance drop. Again: one bar is 40 bytes. For best performance, make sure that you don't exceed CPU on-chip cache size, so if your CPU has 4MB cache, for best performance it is strongly advised not to use more than 100000 bars in File->Database Settings.


For tweaking cache settings for best RAM usage and monitoring real-time performance, you can also use:

  1. Performance Monitor: Performance Monitor window

obraz

... and Performance indicator: Performance tuning tips

obraz

1 Like

You've got only 2GB of RAM. Use 32-bit version instead.

You have WAY too low memory for 64-bit.

64-bit Windows ALONE requires 2GB minimum. You barely meet minimum Windows 10 requirements. You are at least 1.2GB short of RAM (see pagefile size).

You can NOT use 64-bit version with so small memory.

Using 64-bit apps makes sense ONLY starting from 4GB of RAM.

Plus IB only allows 100 RT streaming symbols.

2 Likes