- Modifié
Runtime Error: Color Hexadecimal Length Must be 6
I've just started trying out changing colors in animations and am getting this error after exporting.
"Error reading animation: Color hexidecimal length must be 6, recieved: f7d3caff"
In the Spine Editor, you can see I have the color set to "F7D3CA00" (not ff at the end but 00?) I don't know how a hex color is of 8 length here. But if I try to edit the hex down to 6 (F7D3CA) and save. It is still "F7D3CA00" when I open it back up and the error persists. It looks like it the last two digits indicate the opacity.
EDIT: I'm using the XNA runtime
Please post the entire exception.
System.Exception was unhandled
HResult=-2146233088
Message=Error reading animation: Bash_Side
Color hexidecimal length must be 6, recieved: 45a23bff
Parameter name: hexString
Source=BootHillBounties
There's no stack trace?
The error is thrown here:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-csharp/src/SkeletonJson.cs#L1189
Without a stack trace we can't know what is calling the function with a bad value.
System.Exception was unhandled
HResult=-2146233088
Message=Error reading animation: Bash_Side
Color hexidecimal length must be 6, recieved: 77d16dff
Parameter name: hexString
Source=BootHillBounties
StackTrace:
at Spine.SkeletonJson.ReadSkeletonData(TextReader reader) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\src\SkeletonJson.cs:line 404
at Spine.SkeletonJson.BootHillReadSkeletonData(String SpineCharacterName) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\src\SkeletonJson.cs:line 119
at Spine.SpineEntity..ctor(String SpineCharacterName) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\ExampleGame.cs:line 270
at BootHillHeroes.GamePlay.GamePlayScreen.Initialize() in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\GamePlay\GamePlayScreen.cs:line 432
at Microsoft.Xna.Framework.Game.Components_ComponentAdded(Object sender, GameComponentCollectionEventArgs e)
at Microsoft.Xna.Framework.GameComponentCollection.OnComponentAdded(GameComponentCollectionEventArgs eventArgs)
at Microsoft.Xna.Framework.GameComponentCollection.InsertItem(Int32 index, IGameComponent item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at XRpgLibrary.GameStateManager.AddState(GameState newState) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\XRPG Code\GameStateManager.cs:line 115
at XRpgLibrary.GameStateManager.PushState(GameState newState) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\XRPG Code\GameStateManager.cs:line 104
at BootHillHeroes.GameScreens.BaseGameState.Update(GameTime gameTime) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\GameScreens\BaseGameState.cs:line 425
at BootHillHeroes.GameScreens.StartMenuScreen.Update(GameTime gameTime) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\GameScreens\StartMenuScreen.cs:line 837
at Microsoft.Xna.Framework.Game.<.cctor>b__19(IUpdateable updateable, GameTime gameTime)
at Microsoft.Xna.Framework.Game.SortingFilteringCollection`1.ForEachFilteredItem[TUserData](Action`2 action, TUserData userData)
at Microsoft.Xna.Framework.Game.Update(GameTime gameTime)
at BootHillHeroes.Game1.Update(GameTime gameTime) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Game1.cs:line 677
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at MonoGame.Framework.WinFormsGameWindow.RunLoop()
at MonoGame.Framework.WinFormsGamePlatform.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Microsoft.Xna.Framework.Game.Run()
at BootHillHeroes.Program.Main(String[] args) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Program.cs:line 29
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2147024809
Message=Color hexidecimal length must be 6, recieved: 77d16dff
Parameter name: hexString
ParamName=hexString
Source=BootHillBounties
StackTrace:
at Spine.SkeletonJson.ToColor(String hexString, Int32 colorIndex, Int32 expectedLength) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\src\SkeletonJson.cs:line 1209
at Spine.SkeletonJson.ReadAnimation(Dictionary`2 map, String name, SkeletonData skeletonData) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\src\SkeletonJson.cs:line 736
at Spine.SkeletonJson.ReadSkeletonData(TextReader reader) in C:\Users\DW\Dropbox\DetentionGame\Detention89\Detention22\BHB Code\Spine\src\SkeletonJson.cs:line 402
InnerException:
That's better, thanks. See this part:
at Spine.SkeletonJson.ToColor(String hexString, Int32 colorIndex, Int32 expectedLength) in ...\SkeletonJson.cs:line 1209
at Spine.SkeletonJson.ReadAnimation(Dictionary`2 map, String name, SkeletonData skeletonData) in ...\SkeletonJson.cs:line 736
Now we just need to know which version of the Spine Runtimes you are using, so we can see what is happening on SkeletonJson.cs line 736.
This is in ExampleGame.cs. Is there a better place to find the runtime version?
- Spine Runtimes License Agreement
- Last updated January 1, 2020. Replaces all prior versions.
That's the license date. You should know the runtime version by where you downloaded it and the runtime version should match your editor version. What version of the Spine editor are you using?
Nate a écritThat's the license date. You should know the runtime version by where you downloaded it and the runtime version should match your editor version. What version of the Spine editor are you using?
I think my runtime is 3.8
My Spine editor is 4.0.63 Professional
The editor and runtime versions must be the same:
Versioning - Spine User Guide: Synchronizing versions
If you are using the 4.0.xx editor, you need to use the 4.0 runtimes. You can get them here:
https://github.com/EsotericSoftware/spine-runtimes/tree/4.0