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] - AnbMaker export-raw fails to extract ANB file correctly #796

Open
McArdellje opened this issue Apr 18, 2023 · 1 comment
Open

[BUG] - AnbMaker export-raw fails to extract ANB file correctly #796

McArdellje opened this issue Apr 18, 2023 · 1 comment
Labels
Bug Something is not working as intended, or at all. CLI Tools Concerning OpenKH.Command.* Novice Issue An easy to solve issue, good for newcomers.

Comments

@McArdellje
Copy link

OpenKH Build
471

OpenKH Program
OpenKh.Command.AnbMaker

Describe the Bug
running AnbMaker export-raw throws an error at (what I think is) this line:

foreach (var _ in Enumerable.Repeat(0, RawMotionHeader.BoneCount * RawMotionHeader.TotalFrameCount))

To Reproduce
Steps to reproduce the behavior:
Run .\OpenKh.Command.AnbMaker.exe export-raw with any anb file

Expected behavior
An FBX containing the animation to be created

Additional context
I was trying to extract the anb files from anm/ex/p_ex100 from Kingdom Hearts 2

program output:

Writing to: C:\Users\mcard\Downloads\openkh\EEX00001C.motion.fbx
FATAL ERROR: Specified argument was out of the range of valid values. (Parameter 'count')
   at System.Linq.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
   at System.Linq.Enumerable.Repeat[TResult](TResult element, Int32 count)
   at OpenKh.Kh2.Motion.RawMotion..ctor(Stream stream)
   at OpenKh.Command.AnbMaker.Commands.ExportRawCommand.<>c.<OnExecute>b__9_6(Entry barEntry, Int32 barEntryIndex)
   at System.Linq.Enumerable.SelectIterator[TSource,TResult](IEnumerable`1 source, Func`3 selector)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at OpenKh.Command.AnbMaker.Commands.ExportRawCommand.OnExecute(CommandLineApplication app)
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](IConsole console, String[] args)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](String[] args)
   at OpenKh.Command.AnbMaker.Program.Main(String[] args)
@McArdellje McArdellje changed the title [BUG] - Name of the Issue [BUG] - AnbMaker export-raw fails to extract ANB file correctly Apr 18, 2023
@Vladabdf Vladabdf added Bug Something is not working as intended, or at all. Novice Issue An easy to solve issue, good for newcomers. CLI Tools Concerning OpenKH.Command.* labels Jun 19, 2024
@Vladabdf
Copy link
Collaborator

Verified bug. Happened to all anb files I have tried. Same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended, or at all. CLI Tools Concerning OpenKH.Command.* Novice Issue An easy to solve issue, good for newcomers.
Projects
None yet
Development

No branches or pull requests

2 participants