DurtyFree / durty-cloth-tool

Durty Cloth Tool easily generates addon cloth resources for GTA 5 Singleplayer and MP mods like alt:V, FiveM or RageMP with just a couple of clicks.
https://gta.clothing
101 stars 54 forks source link

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. #197

Closed Mydragin closed 3 months ago

Mydragin commented 3 months ago

I have the following error:

System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
   at System.IO.MemoryStream..ctor(Byte[] buffer, Int32 index, Int32 count, Boolean writable, Boolean publiclyVisible)
   at System.IO.MemoryStream..ctor(Byte[] buffer, Int32 index, Int32 count)
   at CodeWalker.GameFiles.ResourceDataReader..ctor(RpfResourceFileEntry resentry, Byte[] data, Endianess endianess)
   at CodeWalker.GameFiles.YtdFile.Load(Byte[] data, RpfFileEntry entry)
   at CodeWalker.GameFiles.RpfFile.LoadResourceFile[T](T file, Byte[] data, UInt32 ver)
   at CodeWalker.GameFiles.YtdFile.Load(Byte[] data)
   at cpue44f1kpSdDt3gSreK.XGEf4oUTHpC(Object , Byte[] , cpue44f1kpSdDt3gSreK )
   at bNdlL1yMlxMOaaW7Ncj.adqZ3cyKDxO7briDQqn.c5U0gMfkJ9(Int32  , String  , String  )
   at bNdlL1yMlxMOaaW7Ncj.adqZ3cyKDxO7briDQqn.brtyF5bHFI(Boolean  )
   at bNdlL1yMlxMOaaW7Ncj.adqZ3cyKDxO7briDQqn.ujZytpeOy5()
   at bNdlL1yMlxMOaaW7Ncj.adqZ3cyKDxO7briDQqn.rrdys44fFG(ClothData  , ClothTextureData  )
   at DurtyClothTool.App.ViewModels.Commands.AppearanceItem.Clothes.PreviewAppearanceItemCommand.Execute(Object  )
   at g9l8FpoPFumcOZHCsgp.r5ZcyMolxpj5umIcddH.SlGgJWyC1GY48gsJvBYW(Object , Object )
   at g9l8FpoPFumcOZHCsgp.r5ZcyMolxpj5umIcddH.uwaoHmvo9v(Object  , MouseButtonEventArgs  )
   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.Controls.Control.HandleDoubleClick(Object sender, 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.Input.InputProviderSite.ReportInput(InputReport inputReport)
   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 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)

App Version: 2.5.2.2 Project targets: 0 DLC name: mydragin5 Collection name: // Project path: F:\Clothes\clothproject_mydragin5 Output path: F:\Clothes Disable Extra Ymt Creation: False Create Subfolder For Cloth Drawable Types: False Replace settings enabled: False // DLC: NoDlc Save File Version: 0



Cloth files:
`[Please provide cloth files (ydd, ytd), cloth project and any other related files here + describe reproduction steps]`
DurtyFree commented 3 months ago

Caused by most likely badly made or corrupted cloth model. Case is handled next update

DurtyFree commented 3 months ago

Fixed in https://github.com/DurtyFree/durty-cloth-tool/releases/tag/2.5.3.0