Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Failed to load some AnimationClips of GI #92

Open
isHarryh opened this issue Apr 20, 2024 · 4 comments
Open

Failed to load some AnimationClips of GI #92

isHarryh opened this issue Apr 20, 2024 · 4 comments

Comments

@isHarryh
Copy link

Description

Using blk files form Genshin Impact v4.5.0 (Android, global server)

When I tried to load Genshin Impact AnimationClips into Studio GUI, I saw some AnimationClips were successfully loaded and can be correctly exported. However, there were still some other AnimationClips cannot be loaded.

Console output shown below:

[Info] Read assets...

[Error] Unable to load object
Assets CAB-ab61275a20ce808559894b370269dd84
Path E:\GenAB\Data\blocks\00\00058675.blk
Type AnimationClip
PathID 1075803652723677222
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.BinaryReader.InternalRead(Int32 numBytes)
   at System.IO.BinaryReader.ReadSingle()
   at AssetStudio.EndianBinaryReader.ReadSingle() in D:\a\Studio\Studio\AssetStudio\EndianBinaryReader.cs:line 99
   at AssetStudio.HumanGoal..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 704
   at AssetStudio.HumanPose..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 754
   at AssetStudio.ClipMuscleConstant..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 1461
   at AssetStudio.AnimationClip..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 1936
   at AssetStudio.AssetsManager.ReadAssets() in D:\a\Studio\Studio\AssetStudio\AssetsManager.cs:line 630

[Error] Unable to load object
Assets CAB-56648a099cdd76f2b98d60ef9ec1901f
Path E:\GenAB\Data\blocks\00\00058675.blk
Type AnimationClip
PathID -7810734684219431965
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at ...... (same as above)

......

[Error] Unable to load object
Assets CAB-45ee95802ed4df199b3f18cd2317982d
Path E:\GenAB\Data\blocks\00\00056431.blk
Type AnimationClip
PathID 2856890056502075666
System.OverflowException: Arithmetic operation resulted in an overflow.
   at AssetStudio.EndianBinaryReader.ReadArray[T](Func`1 del, Int32 length) in D:\a\Studio\Studio\AssetStudio\EndianBinaryReader.cs:line 237
   at AssetStudio.EndianBinaryReader.ReadSingleArray(Int32 length) in D:\a\Studio\Studio\AssetStudio\EndianBinaryReader.cs:line 324
   at AssetStudio.HandPose..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 669
   at AssetStudio.HumanPose..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 757
   at AssetStudio.ClipMuscleConstant..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 1461
   at AssetStudio.AnimationClip..ctor(ObjectReader reader) in D:\a\Studio\Studio\AssetStudio\Classes\AnimationClip.cs:line 1936
   at AssetStudio.AssetsManager.ReadAssets() in D:\a\Studio\Studio\AssetStudio\AssetsManager.cs:line 630

[Error] Unable to load object
Assets CAB-b97e8647cc58eacff6df3def543ef425
Path E:\GenAB\Data\blocks\00\00056431.blk
Type AnimationClip
PathID -7788070852356909527
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at ......

......

From the console, we can see there are two cause for this problem:

  1. System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
  2. System.OverflowException: Arithmetic operation resulted in an overflow.

To Reproduce

Steps to reproduce the behavior:

  1. Open Studio GUI and specify the target game to GI.
  2. Load file 00002343.blk (or any other Genshin Impact blk file containing AnimationClips).
  3. Error occurs while loading.

Version

Using Studio v1.36.00 e1d7f53

Sample

00002343.blk is provided here:
00002343.zip


Hope this problem can be solved. Thank you for your awesome project!

@Modder4869
Copy link

use latest gitbub action and see if that happen

@isHarryh
Copy link
Author

use latest gitbub action and see if that happen

Using d135a93 , the problem still exists with the same console output.

@Modder4869
Copy link

no idea maybe android only issue if not all animation clips error then can ignore it maybe

@isHarryh
Copy link
Author

no idea maybe android only issue if not all animation clips error then can ignore it maybe

No, AnimationClips have the same data between Android and Windows GI. Only scene models are different because Android GI uses the low-quality-optimized models.

Since I want to get some specified AniamtionClips, I hope this issue can be investigated. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants