I have been using the following script for months. About the middle of last week, the script stopped working. I can still use the GUI to rename but the script gives me an error every time.
Parameter: excludeList = amc.txt
Argument: G:\Downloads\Complete
OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at Script1.run(Script1.groovy:135)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:109)
at net.filebot.Main.main(Main.java:183)
Failure (°_°)
What I have tried doing:
1. Update Filebot
2. Update Java
3. Rename filebot in appdata and let a new one be created.
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this releas
e.
FileBot 4.5 (r2612)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': N
ative library (win32-x86/mediainfo.dll) not found in resource path ([file:/C:/Pr
ogram%20Files/FileBot/FileBot.jar])
Nov 03, 2014 3:30:31 PM net.filebot.archive.SevenZipLoader requireNativeLibrarie
s
WARNING: Failed to preload library: java.lang.UnsatisfiedLinkError: no mingwm10
in java.library.path
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: F
ailed to load 7z-JBinding: C:\Program Files\FileBot\7-Zip-JBinding.dll: Can't lo
ad AMD 64-bit .dll on a IA 32-bit platform
chromaprint-tools: fpcalc version 1.1.0 (C:\Program Files\FileBot\fpcalc.exe)
Extended Attributes: OK
Groovy Engine: 2.3.7
JRE: Java(TM) SE Runtime Environment 1.8.0_25
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 247 MB Max Memory / 11 MB Used Memory
OS: Windows Server 2012 R2 (x86)
Done ?(?????)?
1.
Why are you using 32-bit Java on 64-bit Windows?
2.
Your JVM is currently limited to 247 MB of memory by default. The 64-bit JVM should give you more memory by default. And you can also increase that by setting -Xmx in the config, e.g. -Xmx1g (use google for details). JVM max memory naturally can't be more than your physical memory.
Not really sure why 32-bit was installed either. I removed 32bit java and installed 64-bit.
However that didnt seem to resolve the issue
so next I tried increasing the maximum heap space. First I tired running the script "java -xmx1g -jar filebot.jar....etc"
It would run, and give me the heap error, [s]but would not write to AMC[/s] Found it in .Filebot instead. I tried it up to 6gb and i could see java used that much memory in task manager but I would still get the error.
Next I tried changing the heap space by changing the runtime parameter in java control panel following these directions http://www.wikihow.com/Increase-Java-Me ... -Windows-7
Change it all the way up to 6gb and then used my original bat file. Still got the error but at least this time it was writing to AMC. What the heck am I missing?
Run filebot -script fn:sysinfo and make sure your settings are actually applied. I highly doubt it would ever run out of heap space if it really has 6 GB of heap space...
You should apply these settings in the filebot.l4j.ini config file.
FileBot 4.5 (r2612)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (C:\Program Files\FileBot\fpcalc.exe)
Extended Attributes: OK
Groovy Engine: 2.3.7
JRE: Java(TM) SE Runtime Environment 1.8.0_25
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 5 GB Max Memory / 19 MB Used Memory
OS: Windows Server 2012 R2 (amd64)
Done ?(?????)?
I tried removing JRE again, reinstalling it, then I added -xmx6g to filebot.l4j.ini but im sure I did it wrong. Now im getting a new error in the log. I simply added -Xmx6g on a new line in the ini. where did i screwed up?
Argument: G:\Downloads\Complete
IllegalArgumentException: java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
at net.filebot.cli.ScriptShellMethods.saveAs(ScriptShellMethods.java:311)
at Script1.run(Script1.groovy:197)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:109)
at net.filebot.Main.main(Main.java:183)
Argument: G:\Downloads\Complete
IllegalArgumentException: java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
at net.filebot.cli.ScriptShellMethods.saveAs(ScriptShellMethods.java:311)
Check your paths. Does it work with other paths? Permissions? Can G:\Downloads\Complete\amc.txt be accessed read/write? What about input/output paths? Try different things and see what works and what doesn't to figure out what's causing the issue.
Hmm, interestingly Im no longer getting the IllegalArgumentException: but im back to heap space issue. However its only when I run the script to the G: volume. Now that I think about it, I expanded the capacity of that volume around the time this issue happened. If I change the drives on the script everything appears to work fine. So there is definitely something goofy with that volume I will have to explore.
Well I think I stumbled onto the problem. There was a 500MB amc.txt in G: drive that I deleted (not thinking that it would fix the problem, just that I didn't care to keep it). After deleting that the problem went away.
If you now run it will process EVERYTHING in G:\Downloads\Complete since you delete it's memory of what it has already processed. If you DELETE your exclude list you MUST also MOVE/DELETE everything in the folder that amc is processing.
If the exclude list has grown to 500 MB then it means you've processed many many many files. Hopefully you have deleted most of them already, otherwise processing them all again will take many many many unnecessary resources on online services.
It was ment to be a retired AMC. I usually use AMC in %appdata% but apparently I dumped this one into a bad location. Does Filebot look for an AMC in the source before going to %appdata%?
I clean up my source directory quite regularly. I prefer to do it manually just in case there was an error in renaming\moving.
--def excludeList=amc.txt is relative to the --output folder but you can put it wherever you want if you specify an absolute path like --def excludeList=C:/path/to/wherever/amc.txt