Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown. Possible issue with multiple narrators in a book? #15

Closed
Squaredude opened this issue Mar 8, 2020 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@Squaredude
Copy link

Squaredude commented Mar 8, 2020

Version: 1.8
Net Framework: 4.8.3752
Windows 10 64bits

After upgrading from 1.6, I've been converting all my audiobooks without issues.

However, on trying to convert a particular audiobook, I get this problem:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at TagLib.Mpeg4.AppleTag.set_PerformersRole(String[] value)
at TagLib.CombinedTag.set_PerformersRole(String[] value)
at audiamus.aaxconv.lib.TagAndFileNamingHelper.writeMetaData()
at audiamus.aaxconv.lib.TagAndFileNamingHelper.WriteMetaData(IResources resources, INamingSettingsEx settings, Book book, Track track)
at audiamus.aaxconv.lib.AaxAudioConverter.<>c__DisplayClass88_0.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )

This audiobook differs from others in that it has two narrators listed.

EDIT: Looks like the issue is the narrator tag, because in the "Naming" section of the program, if I set "Add Narrator" to "No", the exception is not thrown. The audiobook is converted without issues.

EDIT 2: Having further trouble with a second audiobook. But this one has one narrator. :P

Moving on... what they do have in common is that both have more than one authors. They throw the exact same exception. And if I set "Add Narrator" to "No", both audiobooks get converted correctly.

@audiamus audiamus added the bug Something isn't working label Mar 9, 2020
@audiamus
Copy link
Owner

audiamus commented Mar 9, 2020

Thanks for the call stack. I'll check it.

@audiamus
Copy link
Owner

audiamus commented Mar 10, 2020

I may have an idea now. There is some inconsistency in the code.

How many authors are there for these books? Did you change any author names in the preview window?

@Squaredude
Copy link
Author

Book 1: two authors separated by comma, one narrator. Names are "simple" (Name Surname).

"Add Narrator" = Yes

Throws no error when opening the Preview window.

Throws error during conversion when tags are not modified in the Preview window.

Editing the "File" / "Author" field by removing the comma makes no difference. Error is thrown. A few files are output before the exception, but they lack all tags.

Editing the "Tag" / "Author" field by removing the comma works. Error is not thrown. The tags in the resulting files show the names of the "two" authors and one narrator separated by a semicolon ( ; ). Example: Name1 Name2; Narrator1

Book 2: three authors, two narrators. Authors separated by comma. Narrators separated by semicolon. Author names are "complex" (Name L. L. Surname, Name L. Surname Jr.). Narrators are "simple". (Names don't seem to be an issue by themselves, but just in case, I tell you this.)

"Add Narrator" = Yes

Throws no error when opening the Preview window.

Throws error during conversion when tags are not modified in the Preview window.

Editing the "File" / "Author" field by removing the comma makes no difference. Error is thrown. A few files are output before the exception, but they lack all tags.

Editing the "Tag" / "Author" field by removing the comma works. Error is not thrown. The tags in the resulting files show the names of the "three" authors and two narrators separated by two semicolons. Example: Name1 Name2 Name3; Narrator1; Narrator2

@audiamus
Copy link
Owner

Thank you. That confirms my assumptions. I think the point is how the authors are separated,. The tag structure used in aax/m4a files supports multiple authors and narrators, encoded as arrays. But if Audible puts multiple authors in the same single array item, separated by comma or semicolon, AAX Audio Converter will nonetheless treat them as multiple. However, when rewriting the tags to the output file, the counting may go wrong. And that eventually will lead to array items for the performers' role ("Author" or "Narrator") left with null. And then you get the null pointer exception. I will rewrite that short section of code to prevent this.

@audiamus
Copy link
Owner

Fixed in version 1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants