Page 1 of 1
Out of memory
Posted: 2022-04-14 21:11:23
by MrObama2022
My catalog has 30k entries ... I think it's big
Images are stored externally, they are linked and are stored in directories, not inside the catalog
AMC catalog is 81 Mb.
The problem is when I use Ant it often goes out of memory. While script is running or while I'm looking at stored entries.
I tried giving above normal priority in Windows task manager, but nothing changed.
I'm using Win 8 64 bit, my PC has 16gb of ram. In task manager, in memory tab, I see these values:
Commit (310.500 KB), Working set (325.748 KB), Shared (17.440 KB), Private (308.308 KB)
These doesn't seem huge numbers.
So ... anyone with my problem?
Re: Out of memory
Posted: 2022-04-17 17:22:52
by antp
Strange, with the image as external files it should work fine then.
Changing priority is not a good idea though, better keep it on "normal"

I don't really have an idea.
How much memory is AMC using? As it is a 32-bit process it is limited to 2 GB anyway, but it should be enough with pictures as external files.
Re: Out of memory
Posted: 2022-04-19 11:42:35
by MrObama2022
Hi antp, the memory used by MovieCatalog are:
Commit (310.500 KB), Working set (325.748 KB), Shared (17.440 KB), Private (308.308 KB)
Can you compile as 64bit? Maybe I can get rid of this problem.
I'll do further tests asap. I want to check the catalog size to check the impact.
I'll create a test catalog of 10k entries with no pictures at all and I'll try to launch my script on 2k entries to see if it fails. Maybe the problem is on memory usage with script library ...
Re: Out of memory
Posted: 2022-04-19 13:15:50
by MrObama2022
Ok, I just tested with an AMC file with 12000 entries and no images. I launched the script on 400 entries (batch mode) and after 197 entries it runned out of memory.
Is there a sort of garbage collector or clean utility I can add to the script? How can I measure the memory size inside my scripts?
Re: Out of memory
Posted: 2022-04-19 16:59:26
by fulvio53s03
MrObama2022 wrote: ↑2022-04-19 13:15:50
Ok, I just tested with an AMC file with 12000 entries and no images. I launched the script on 400 entries (batch mode) and after 197 entries it runned out of memory.
Is there a sort of garbage collector or clean utility I can add to the script? How can I measure the memory size inside my scripts?
really strange. My catalog has 11.500 movies, each of them with 1 image (contained in catalog) and uses a little more than 800,00 GB.
There is no problem.
My O.S. is Win 10.
P.S.
obviousely I'm interested in garbage collection and in measuring memory size used in scripts.

Re: Out of memory
Posted: 2022-04-19 17:55:29
by MrObama2022
I just executed again my script on my test catalog and I got an out of memory after 563 entries processed (in batch mode)

.
Re: Out of memory
Posted: 2022-04-19 23:17:46
by MrObama2022
I checked in task manager and MovieCatalog uses 1200000 Kb when out of memory.
Re: Out of memory
Posted: 2022-04-20 16:06:43
by fulvio53s03
MrObama2022 wrote: ↑2022-04-19 23:17:46
I checked in task manager and MovieCatalog uses 1200000 Kb when out of memory.
maybe a swap file problem?

did you see:
https://forum.antp.be/phpbb3/viewtopic. ... ory#p46933
https://ntcore.com/?page_id=371 ?
Re: Out of memory
Posted: 2022-04-20 23:19:59
by MrObama2022
Thank you Fulvio, I'll try asap. This could really help.
By the way, I released a new version of ItalianMultisite and some of its libraries [
https://forum.antp.be/phpbb3/viewtopic.php?f=12&t=30608 ]
Re: Out of memory
Posted: 2022-04-21 11:47:43
by MrObama2022
I tried 4gb patch but now when AMC reaches 1.2 gb of RAM I get an access violation error, and a bigger crash of AMC.
By the way, with standard AMC there is a another problem with the out of memory error: sometimes AMC reset/lost scripts parameter and option values and I have to manually set them again.
Re: Out of memory
Posted: 2022-04-24 10:21:17
by antp
AMC is build with Delphi 7, which is quite old, so porting it to a newer 64-bit version of Delphi would require a lot of work.