Problem statement

Keep getting errors related to abnormal mesh bounds sporadically. It seems to occur after we compound some skin combination (for mix/match chars) together and apply it. However it doesn't seem related to any certain combination of skin parts, i.e. setting some skin with hair_x and outfit_x will work most of the time but will occasionally throw this error.

Once receiving the error the skeleton animation will flicker repeatedly in the scene view along with Unity's inspector window also flickering repeatedly(when the skeleton is selected and the SkeletonAnimation component is enabled)

There aren't any reliable repro steps past just repeatedly changing the skin and finding it to occasionally happen.

Runtime information

Spine Runtimes version: 4.0.0

Errors:

Mesh 'Skeleton Mesh': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting.
Mesh bounds min=(-8213098971812331520.00, -185778111373962641408.00, 0.07), max=(11143420605137682432.00, 0.00, -0.07). Please make sure the mesh is exported without any errors.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
ERROR: SendClientException: In order to call GetTransformInfoExpectUpToDate, RendererUpdateManager.UpdateAll must be called first.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Related Discussions
...

Please share your skeleton export including the atlas. I know you said it's not easy to reproduce reliably, but maybe you can also provide a simple MonoBehaviour that switches skins the way you do, so we can see it eventually.

You do call SetToSetupPose() after setting the skin, right?

    5 days later

    Mario

    I can look into getting that skeleton export. Atm here is a simple MonoBehaviour that illustrates how we are switching skins in case you see anything apparently wrong with that setup.

    spinecontrollerexample.txt
    1kB

    That code looks fine, though the AnimationState.apply() call is unlikely to be needed.

    We'll need the skeleton export to repro this I'm afraid.

      Mario

      Hi Mario! Thanks for checking out the code, I sent you a private message regarding the export so hope we can sort something out there and narrow this down 😃

      Ah, could you send it to @Harald he's our local Unity wizard 🙂

      Thanks for getting back to me @Mario . Unfortunately it won't allow me to add @Harald to a private discussion. Could you just forward the message I sent you to him perhaps? 😃

      Thanks for sending the assets, I've received your files. I will get back to you here on the forum once I've figured out what's going wrong.

      @btremper Your exported skeleton json file failed to be imported properly when reading it with the latest spine-unity 4.0 runtime:

      "Failed to read version info at skeleton 'female_rig'. It is likely not a valid Spine SkeletonData file.
      System.FormatException: Input string was not in a correct format."

      Having a look at the file shows the following version string:
      "spine": "4.0-from-4.1.19",
      Please note that exporting as json with a lower version than the Spine Editor version is not for import by a runtime, but for downgrading a project from e.g. Editor version 4.1 and re-opening it in Spine Editor version 4.0. You have to open the json file in Spine Editor version 4.0 and export it from there to be read by a 4.0 runtime.

      Apart from that, since you don't seem to be using the latest 4.0 spine-unity runtime (as you didn't get erro upon import), please always be sure to use the latest runtime version if you encounter any issues before reporting problems.

      Your provided script code spinecontrollerexample.txt from your posting above also does not compile out of the box and was missing a few setup lines, please always make sure that your code is tested before sharing it with us.