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

Scripting issue with very large files / very many chapters #40

Closed
sandreas opened this issue Mar 25, 2023 · 7 comments
Closed

Scripting issue with very large files / very many chapters #40

sandreas opened this issue Mar 25, 2023 · 7 comments

Comments

@sandreas
Copy link
Owner

The following script runs into an error:

// reindexChapters.js 
function reindexChapters(metadata, parameters) {
  var count = metadata.Chapters.Count;
  var newChapters = [];
  console.log("found " + count + " chapters to reindex");
  for(var i=0;i<count;i++) {
    metadata.Chapters[i].Title = "Chapter " + (i+1);
  }
}

tone.RegisterTagger("reindexChapters");
tone tag "my-audiobook.m4b" --taggers="reindexChapters" --script="reindexChapters.js" --dry-run

Original report: sandreas/m4b-tool#216 (comment)

I'm running into an issue which large audiobooks (do know if its the file size (all are bigger than 1GB) or the chapter number).

found 563 chapters to reindex
Error: Object reference not set to an instance of an object.

Any ideas?

Best regards,

Stefan

@StefanDorschu
Copy link

Maybe this helps you?

found 512 chapters to reindex Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Spectre.Console.ExceptionFormatter.TryGetTupleName(ParameterInfo parameter, Type parameterType, String& tupleName) in /_/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs: line 314 at Spectre.Console.ExceptionFormatter.GetParameterName(ParameterInfo parameter) in /_/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs:line 280 at Spectre.Console.ExceptionFormatter.GetStackFrames(Exception ex, ExceptionSettings settings) in /_/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs:line 79 at Spectre.Console.ExceptionFormatter.GetException(Exception exception, ExceptionSettings settings) in /_/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs:line 22 at Spectre.Console.ExceptionFormatter.Format(Exception exception, ExceptionSettings settings) in /_/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs:line 7 at Spectre.Console.ExceptionExtensions.GetRenderable(Exception exception, ExceptionSettings settings) in /_/src/Spectre.Console/Extensions/ExceptionExtensions.cs:line 40 at Spectre.Console.ExceptionExtensions.GetRenderable(Exception exception, ExceptionFormats format) in /_/src/Spectre.Console/Extensions/ExceptionExtensions.cs:line 21 at Spectre.Console.AnsiConsole.WriteException(Exception exception, ExceptionFormats format) in /_/src/Spectre.Console/AnsiConsole.Exceptions.cs:line 15 at Program.<Main>$(String[] args) at Program.<Main>(String[] args) Aborted (core dumped)

@StefanDorschu
Copy link

Any news on this?

@sandreas
Copy link
Owner Author

Still on it. Currently I'm on a nother project taking all of my time... will try to give you an update as soon as it's fixed or I have a workaround.

@StefanDorschu
Copy link

Ok. Thank you for all your effort!

@sandreas
Copy link
Owner Author

@StefanDorschu

tone 0.1.6 is out. Since it is the first release after a long time, this issue may have been fixed with the new jint release. I would love to get feedback, please backup your files.

@StefanDorschu
Copy link

Works like a charm! Problem solved!

@sandreas
Copy link
Owner Author

Great, closing this issue then :-) Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants