Skip to content

Error when importing more chapters than are in the original file #6514

Closed

Description

@Dejvid-H

Problem Description

When I try to import chapters from a file and the file contains more chapters than the original video, HandBrake displays a warning, but if I click Yes, HandBrake displays an Unknown Error instead of importing only a part of the file

Here, the original video has 24 chapters, but I import chapter names from a file, that contains 25 chapters. I get the warning:
Warning

But if I click Yes, the importing crashes and no chapter names are imported:
Error

Activity Log, Crash Log or any other details

An Unknown Error has occurred.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at HandBrakeWPF.ViewModels.ChaptersViewModel.ValidateImportedChapters(Dictionary`2 importedChapters, String& validationErrorMessage, Boolean hasTimestamps)
   at HandBrakeWPF.ViewModels.ChaptersViewModel.Import()
   at InvokeStub_ChaptersViewModel.Import(Object, Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at HandBrakeWPF.Commands.RelayCommand.Execute(Object parameter)
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

What Operating System are you running?

Windows 10

What version of HandBrake are you running?

1.9.0

Where did you download HandBrake from?

handbrake.fr

Activity

  1. github-actions commented on Dec 27, 2024

    @github-actions

    Hello,

    Welcome to the HandBrake repository.

    Warning

    Please be cautious of any non-members suggesting that you download a "DLL" or any other files from 3rd party websites.
    These are likely malicious!
    Members of the HandBrake team can be identified by the "(Member)" label in the top right of any response from them.

    Thank You,
    The HandBrake Bot

  2. added this to the 1.10.0 milestone on Dec 29, 2024
  3. added a commit that references this issue on Dec 29, 2024
    cab6cd5
  4. added a commit that references this issue on Jan 11, 2025
    1ff1370
  5. modified the milestones: 1.10.0, 1.9.x on Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions