How to recover from AMC script matching errors

Any questions? Need some help?
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

How to recover from AMC script matching errors

Post by cheaters »

This information may already be in multiple posts on the site, but I am not able to find a solution.

I am using qBittorent and this AMC script for qBittorrent.

Code: Select all

/Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Volumes/PlexMedia" --action duplicate --conflict auto -non-strict --log-file amc.log --def excludeList=/Users/username/.filebot/amc.excludes --def unsorted=y --def music=y --def subtitles=en --def minFileSize=0 --def minLengthMS=0 --def plex="127.0.0.1":"MytokenID" "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
I have created these directories on /Volumes/PlexMedia/
Unsorted
Movies
Music
Seeding
TV Shows

Files download and stay in /Volumes/PlexMedia/Seeding until they have completed seeding and I manually delete them (unfortunately, qBittorent has no way to delete files automaticaly after they have finished seeding)

The AMC Script has been working flawlessly until I downloaded a huge BBC Horizon collection. Most of the files ended up in the Movies folder and were matched incorrectly.

I pulled them all out and deleted them since I still had the original copy in /Volumes/PlexMedia/Seeding. I manually edited those file names using the Apple Store version of FileBot which took some time because of the matching issues.

Now, since I am not calling the script from within qBittorent how do I get all of these tv shows out of the "Seeding" directory and into the correct directories on the same volume using the amc script. When I try to run the following command from the command line I receive an error.

Code: Select all

/usr/local/bin/filebot -script fn:amc  --output "/Volumes/Plexmedia/" --action duplicate --conflict skip -non-strict "/Volumes/PlexMedia/Seeding" --log-file amc.log --def excludeList=".excludes" unsorted=y music=y artwork=y "$@"
# JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
# Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C [libsystem_platform.dylib+0x1ef6]java(80842,0x70000bdb2000) malloc: Incorrect checksum for freed object 0x7fe96660b8c8: probably modified after being freed.
Corrupt value: 0x10627731300000
Do I have to copy all of the data off this drive and onto another drive in order for the script to function without error? Is that the issue?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to recover from AMC script matching errors

Post by rednoah »

1.
This is completely unrelated. The underlying platform is crashing. Never seen this before. No idea. Not related to FileBot or the amc script specifically. Maybe an obscure RAM hardware problem?

Code: Select all

# JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
# Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C [libsystem_platform.dylib+0x1ef6]java(80842,0x70000bdb2000) malloc: Incorrect checksum for freed object 0x7fe96660b8c8: probably modified after being freed.
Corrupt value: 0x10627731300000


2.
I recommend using the GUI for files that can otherwise not be processed correctly, since the GUI gives you a lot of manual control on how matching works:
https://www.filebot.net/getting-started/


:idea: Use this custom format and you'll get exactly the same destination paths as the amc script:

Code: Select all

/Volumes/PlexMedia/{plex}
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: How to recover from AMC script matching errors

Post by cheaters »

I have them matched perfectly, just to need to automagically sort them into the proper pre-existing folders. Was hoping to use the command line.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to recover from AMC script matching errors

Post by rednoah »

You can use filebot and the amc script from the command-line too.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: How to recover from AMC script matching errors

Post by cheaters »

Do you want the complete report on the error. I can pm it to you.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to recover from AMC script matching errors

Post by rednoah »

Not really. I wouldn't be able to do anything about it. It's not crashing in my code, and it's not crashing for anyone else as far as I can tell.

You could do a bug report here:
https://bugreport.java.com/bugreport/


EDIT:

A quick Google search reveals that "malloc: Incorrect checksum for freed object" isn't even related to Java, but even more low-level in the OS, so even less we can do about that. Maybe there's a workaround if you Google for that error message.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to recover from AMC script matching errors

Post by rednoah »

A more through look reveals that it's crashing in the libmediainfo code:

Code: Select all

Stack: [0x0000700002fad000,0x00007000030ad000],  sp=0x00007000030a7000,  free space=1000k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libsystem_platform.dylib+0x1f09]  _platform_memmove$VARIANT$Haswell+0x249
C  [libmediainfo.dylib+0x2bb5]  _ZN12MediaInfoLib13File__Analyze20Open_Buffer_ContinueEPKhm+0x4e5
C  [libmediainfo.dylib+0xb817c]  _ZN12MediaInfoLib18MediaInfo_Internal20Open_Buffer_ContinueEPKhm+0x19c
C  [libmediainfo.dylib+0x45f9c2]  MediaInfo_Open_Buffer_Continue+0xb2
C  [libjnidispatch.dylib+0xdef4]  ffi_call_unix64+0x4c
You could try the latest beta, which bundles a newer version of libmediainfo which may or may not work:
https://get.filebot.net/filebot/BETA/

:idea: Newer revisions also include the -no-probe to disable MediaInfo usage, and if libmediainfo isn't used, then it can't crash the FileBot process. That'll work as a workaround.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: How to recover from AMC script matching errors

Post by cheaters »

I installed the beta version of filebot into Applications. I bought a lifetime license.

The script I am using in qBittorent has had no issues. Why would calling it from the command line be any different. I am calling the same filebot.sh shell script in both cases.

I am still getting a crash when running from command line.

Does this offer any clue:
https://bugs.openjdk.java.net/browse/JDK-8192785

link to log file:
https://www.dropbox.com/s/1oplxvvcxetvi ... 4.log?dl=0
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to recover from AMC script matching errors

Post by rednoah »

1.
Nope, it's definitely crashing in the libmediainfo native code, so the crash is most likely unrelated to the JVM.


2.
jprokos wrote: 03 Sep 2019, 19:01 The script I am using in qBittorent has had no issues. Why would calling it from the command line be any different. I am calling the same filebot.sh shell script in both cases.
It wouldn't, so something must be different.

:arrow: Compare & Contrast: What exact command is qBT calling? What exact command are you calling?
:idea: Please read the FAQ and How to Request Help.
Post Reply