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

[Bug]: First Class Yaml Byte Array Support #1381

Closed
ClutchskyVinyl opened this issue Jun 6, 2024 · 2 comments
Closed

[Bug]: First Class Yaml Byte Array Support #1381

ClutchskyVinyl opened this issue Jun 6, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ClutchskyVinyl
Copy link

ClutchskyVinyl commented Jun 6, 2024

Are you on the latest version of AssetRipper?

Yes, I'm on the latest release of AssetRipper.

Which release are you using?

Windows x64

Which game did this occur on?

Gloomwood: https://steamdb.info/app/1150760/

Which Unity version did this occur on?

2021.2.13f1

Is the game Mono or IL2Cpp?

Unknown

Describe the issue.

when exporting all the game files the console at the same point keeps giving me this error and stopping the process completley almost like it reached a limit for how much it can export error

Relevant log output

System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at AssetRipper.Yaml.Extensions.YamlArrayExtensions.ExportYaml(Byte[]) + 0xfc
   at AssetRipper.Export.UnityProjects.YamlWalker.<VisitPrimitive>g__ToNode|34_0[T](T) + 0x2d
   at AssetRipper.Export.UnityProjects.YamlWalker.VisitPrimitive[T](T) + 0x7e
   at AssetRipper.SourceGenerated.Classes.ClassID_187.Texture2DArray_2020_2_0_a12.WalkEditor(AssetWalker) + 0x644
   at AssetRipper.Export.UnityProjects.YamlWalker.ExportYamlDocument(IUnityObjectBase, Int64) + 0x107
   at AssetRipper.Export.UnityProjects.Project.YamlExporterBase.Export(IExportContainer, IUnityObjectBase, String) + 0x11e
   at AssetRipper.Export.UnityProjects.Project.YamlStreamedAssetExportCollection.ExportTexture(IExportContainer, String, String, IImageTexture) + 0x121
   at AssetRipper.Export.UnityProjects.Project.YamlStreamedAssetExportCollection.ExportInner(IExportContainer, String, String) + 0x72
   at AssetRipper.Export.UnityProjects.AssetExportCollection`1.Export(IExportContainer, String) + 0xec
   at AssetRipper.Export.UnityProjects.ProjectExporter.Export(GameBundle, CoreConfiguration) + 0x16a
   at AssetRipper.Export.UnityProjects.ExportHandler.Export(GameData, String) + 0x198
   at AssetRipper.GUI.Web.Pages.Commands.Export.<AssetRipper-GUI-Web-Pages-ICommand-Execute>d__0.MoveNext() + 0x118
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at AssetRipper.GUI.Web.Pages.Commands.<HandleCommand>d__6`1.MoveNext() + 0xaf
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at AssetRipper.GUI.Web.ErrorHandlingMiddleware.<InvokeAsync>d__0.MoveNext() + 0x9f
@ClutchskyVinyl ClutchskyVinyl added the bug Something isn't working label Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

Thank you for submitting your first issue here. Please be sure you have uploaded your AssetRipper.log file. It is in the same folder as the exe file. :)

@ds5678
Copy link
Collaborator

ds5678 commented Jun 29, 2024

This can be fixed by:

  • Add ByteArray to ScalarType.
  • In YamlScalarNode, change m_string to m_object, add a byte[] constructor, and adjust the other methods accordingly. ScalarStyle has no impact on byte arrays.
  • In YamlArrayExtensions, use the newly created constructor.

@ds5678 ds5678 added the good first issue Good for newcomers label Jun 29, 2024
@ds5678 ds5678 changed the title [Bug]: System Overflow [Bug]: First Class Yaml Byte Array Support Aug 4, 2024
@ds5678 ds5678 closed this as completed in 13edc04 Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants