Skip to content

Premature end of stream #273

@Thuliaskhan

Description

@Thuliaskhan

When creating a new animpack, I paste the value from a bin into my new bin in the xml and when I save with the floppy disk icon I receive the following:

{
"ActivePackFiles": [
{
"IsMainEditable": false,
"IsCa": true,
"Name": "All Game Packs - Warhammer III",
"SystemPath": "F:\Program Files (x86)\Steam\steamapps\common\Total War WARHAMMER III\data"
},
{
"IsMainEditable": true,
"IsCa": false,
"Name": "testing",
"SystemPath": "F:\Program Files (x86)\Steam\steamapps\common\Total War WARHAMMER III\data\testing.pack"
}
],
"CurrentGame": 11,
"Settings": {
"RecentPackFilePaths": [
"F:\Program Files (x86)\Steam\steamapps\common\Total War WARHAMMER III\data\tk_ausgewahlt.pack",
"F:\Program Files (x86)\Steam\steamapps\common\Total War WARHAMMER III\data\testing.pack"
],
"Theme": 0,
"RenderEngineBackgroundColour": 0,
"StartMaximised": false,
"GameDirectories": [
{
"Game": 1,
"Path": null
},
{
"Game": 13,
"Path": null
},
{
"Game": 5,
"Path": null
},
{
"Game": 7,
"Path": null
},
{
"Game": 12,
"Path": null
},
{
"Game": 9,
"Path": null
},
{
"Game": 10,
"Path": null
},
{
"Game": 11,
"Path": "F:\Program Files (x86)\Steam\steamapps\common\Total War WARHAMMER III\data"
}
],
"CurrentGame": 11,
"LoadCaPacksByDefault": true,
"ShowCAWemFiles": false,
"IsFirstTimeStartingApplication": false,
"IsDeveloperRun": false,
"WwisePath": null,
"OnlyLoadLod0ForReferenceMeshes": true
},
"NumberOfOpenEditors": 2,
"NumberOfOpenedEditors": 2,
"RunTimeInSeconds": 438.3131084,
"AssetEditorVersion": "0.63",
"ExceptionInfo": [
{
"Message": "Premature end of stream",
"StackTrace": [
" at ZstdSharp.DecompressionStream.Read(Span\u00601 buffer)\r",
" at ZstdSharp.DecompressionStream.Read(Byte[] buffer, Int32 offset, Int32 count)\r",
" at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)\r",
" at Shared.Core.PackFiles.PackFileCompression.DecompressZstd(BinaryReader reader, UInt32 uncompressedSize) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\PackFileCompression.cs:line 152\r",
" at Shared.Core.PackFiles.PackFileCompression.Decompress(Byte[] data) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\PackFileCompression.cs:line 133\r",
" at Shared.Core.PackFiles.Models.PackedFileSource.ReadData(Int32 size) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\Models\DataSource.cs:line 144\r",
" at Editors.AnimationTextEditors.AnimationPack.Converters.AnimationBinWh3FileToXmlConverter.IsAnimFile(String file, IPackFileService pfs, ErrorList errorList, String animationSlot) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\AnimationBinWh3FileToXmlConverter.cs:line 240\r",
" at Editors.AnimationTextEditors.AnimationPack.Converters.AnimationBinWh3FileToXmlConverter.Validate(XmlFormat type, String s, IPackFileService pfs, String filepath) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\AnimationBinWh3FileToXmlConverter.cs:line 194\r",
" at CommonControls.Editors.AnimationPack.Converters.BaseAnimConverter\u00602.ToBytes(String text, String filePath, IPackFileService pfs, SaveError\u0026 error) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\BaseAnimConverter.cs:line 71\r",
" at CommonControls.Editors.AnimationPack.AnimPackViewModel.SaveActiveFile() in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\AnimPackViewModel.cs:line 185\r",
" at CommonControls.Editors.AnimationPack.AnimPackViewModel.\u003CItemSelected\u003Eb__40_0() in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\AnimPackViewModel.cs:line 161\r",
" at CommunityToolkit.Mvvm.Input.RelayCommand.Execute(Object parameter)\r",
" at System.Windows.Controls.Button.OnClick()\r",
" at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)\r",
" at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r",
" at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r",
" at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)\r",
" at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r",
" at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r",
" at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)\r",
" at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)\r",
" at System.Windows.Input.InputManager.ProcessStagingArea()\r",
" at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)\r",
" at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean\u0026 handled)\r",
" at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean\u0026 handled)\r",
" at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r",
" at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)"
]
}
],
"CurrentEditorName": "AnimPackViewModel",
"EditorInputFile": "testing.animpack",
"EditorInputFileFull": "animations\database\battle\bin\testing.animpack",
"EditorInputFilePack": "testing",
"LogHistory": [
"[20:10:02 Warning] [1] GameWorld.Core.Services.SkeletonAnimationLookUpHelper::FileDiscovered : Skipping loading of known broken file - animations\battle\humanoid13\ogre\rider\hq3b_stonehorn_wb\sword_and_crossbow\missile_action\crossbow\hu13_hq3b_sp_rider1_shoot_ready_crossbow_01.anim \r\n",
"[20:10:02 Warning] [1] GameWorld.Core.Services.SkeletonAnimationLookUpHelper::FileDiscovered : Skipping loading of known broken file - animations\battle\humanoid13\ogre\rider\hq3b_stonehorn_wb\sword_and_crossbow\missile_action\crossbow\hu13_hq3b_swc_rider1_reload_crossbow_01.anim \r\n",
"[20:10:02 Warning] [1] GameWorld.Core.Services.SkeletonAnimationLookUpHelper::FileDiscovered : Skipping loading of known broken file - animations\battle\humanoid13\ogre\rider\hq3b_stonehorn_wb\sword_and_crossbow\missile_action\crossbow\hu13_hq3b_swc_rider1_shoot_back_crossbow_01.anim \r\n",
"[20:10:02 Warning] [1] GameWorld.Core.Services.SkeletonAnimationLookUpHelper::FileDiscovered : Skipping loading of known broken file - animations\battle\humanoid13b\golgfag\docking\hu13b_golgfag_docking_armed_02.anim \r\n",
"[20:10:02 Warning] [1] GameWorld.Core.Services.SkeletonAnimationLookUpHelper::FileDiscovered : Skipping loading of known broken file - animations\battle\raptor02\subset\colossal_squig\deaths\rp2_colossalsquig_death_01.anim \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerSetAsMainEditableEvent to MainViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerSetAsMainEditableEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerRemovedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerAddedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerFilesUpdatedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerFilesAddedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerFilesRemovedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerFolderRemovedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerFolderRenamedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:03 Information] [1] Shared.Core.Events.EventHub::Register : Registering event PackFileContainerSavedEvent to PackFileBrowserViewModel on IEventHub \r\n",
"[20:10:24 Information] [1] Shared.Core.ErrorHandling.PackFileLog::LogPackCompression : Loading testing.pack (3 files, 0.44 KB) | File Compression \u2013 None: 3 files, 0.32 KB (Disk Size) \r\n",
"[20:10:24 Information] [1] Shared.Core.Events.EventHub::PublishGlobalEvent : Publshing global event PackFileContainerAddedEvent on IGlobalEventHub \r\n",
"[20:10:24 Information] [1] Shared.Core.Settings.ApplicationSettingsService::Save : Saving settings file C:\Users\johnm\AssetEditor\ApplicationSettings.json \r\n",
"[20:10:24 Information] [1] Shared.Core.Events.EventHub::PublishGlobalEvent : Publshing global event PackFileContainerSetAsMainEditableEvent on IGlobalEventHub \r\n",
"[20:10:33 Information] [1] Shared.Core.Events.EventHub::PublishGlobalEvent : Publshing global event PackFileContainerFilesAddedEvent on IGlobalEventHub \r\n",
"[20:10:40 Information] [1] Shared.Core.DependencyInjection.ScopeRepository::Add : Adding scope for Not set of type CommonControls.Editors.AnimationPack.AnimPackViewModel \r\n",
"[20:10:40 Information] [1] AssetEditor.Services.EditorManager::CreateFromFile : Opening testing.animpack with AnimPackViewModel \r\n",
"[20:10:40 Information] [1] Shared.Core.ToolCreation.EditorDatabase::GetViewTypeFromViewModel : Getting view for ViewModel - CommonControls.Editors.AnimationPack.AnimPackViewModel \r\n",
"[20:10:46 Information] [1] Shared.Core.Events.EventHub::PublishGlobalEvent : Publshing global event PackFileContainerSavedEvent on IGlobalEventHub \r\n",
"[20:11:08 Information] [1] Shared.Core.DependencyInjection.ScopeRepository::Add : Adding scope for Not set of type CommonControls.Editors.AnimationPack.AnimPackViewModel \r\n",
"[20:11:08 Information] [1] AssetEditor.Services.EditorManager::CreateFromFile : Opening animation_tables.animpack with AnimPackViewModel \r\n",
"[20:11:08 Information] [1] Shared.Core.ToolCreation.EditorDatabase::GetViewTypeFromViewModel : Getting view for ViewModel - CommonControls.Editors.AnimationPack.AnimPackViewModel \r\n",
"[20:11:50 Information] [1] Shared.Core.ToolCreation.EditorDatabase::GetViewTypeFromViewModel : Getting view for ViewModel - CommonControls.Editors.AnimationPack.AnimPackViewModel \r\n",
"[20:11:54 Information] [1] Shared.GameFormats.Animation.AnimationFile::Create : Loading animation: Shared.Core.PackFiles.Models.PackFile Size:5892 \r\n",
"[20:11:54 Fatal] [1] AssetEditor.App::DispatcherUnhandledExceptionHandler : System.IO.EndOfStreamException: Premature end of stream\r\n at ZstdSharp.DecompressionStream.Read(Span\u00601 buffer)\r\n at ZstdSharp.DecompressionStream.Read(Byte[] buffer, Int32 offset, Int32 count)\r\n at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)\r\n at Shared.Core.PackFiles.PackFileCompression.DecompressZstd(BinaryReader reader, UInt32 uncompressedSize) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\PackFileCompression.cs:line 152\r\n at Shared.Core.PackFiles.PackFileCompression.Decompress(Byte[] data) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\PackFileCompression.cs:line 133\r\n at Shared.Core.PackFiles.Models.PackedFileSource.ReadData(Int32 size) in C:\Users\ole_k\source\repos\TheAssetEditor\Shared\SharedCore\PackFiles\Models\DataSource.cs:line 144\r\n at Editors.AnimationTextEditors.AnimationPack.Converters.AnimationBinWh3FileToXmlConverter.IsAnimFile(String file, IPackFileService pfs, ErrorList errorList, String animationSlot) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\AnimationBinWh3FileToXmlConverter.cs:line 240\r\n at Editors.AnimationTextEditors.AnimationPack.Converters.AnimationBinWh3FileToXmlConverter.Validate(XmlFormat type, String s, IPackFileService pfs, String filepath) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\AnimationBinWh3FileToXmlConverter.cs:line 194\r\n at CommonControls.Editors.AnimationPack.Converters.BaseAnimConverter\u00602.ToBytes(String text, String filePath, IPackFileService pfs, SaveError\u0026 error) in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\Converters\BaseAnimConverter.cs:line 71\r\n at CommonControls.Editors.AnimationPack.AnimPackViewModel.SaveActiveFile() in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\AnimPackViewModel.cs:line 185\r\n at CommonControls.Editors.AnimationPack.AnimPackViewModel.\u003CItemSelected\u003Eb__40_0() in C:\Users\ole_k\source\repos\TheAssetEditor\Editors\SimpleAnimationEditors\AnimationPack\AnimPackViewModel.cs:line 161\r\n at CommunityToolkit.Mvvm.Input.RelayCommand.Execute(Object parameter)\r\n at System.Windows.Controls.Button.OnClick()\r\n at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)\r\n at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)\r\n at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)\r\n at System.Windows.Input.InputManager.ProcessStagingArea()\r\n at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)\r\n at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean\u0026 handled)\r\n at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean\u0026 handled)\r\n at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) \r\n"
],
"UserMessage": "",
"Culture": "en-US",
"OSVersion": "Microsoft Windows NT 10.0.19045.0"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions