14-05-2018, 04:44 AM
Hello all.
I found the crash of Unity Editer.
My enviroment are follows.
Obi Cloth version is 3.3.1.
Unity version 2017.2.0f3.
PC OS is Windows10 64bit.
When I refer Mesh at OnPreRender() of Camera, this issue will happen.
Moreover error.log says "Unity.exe caused an Access Violation (0xc0000005)" & "Read from location 00000000 caused an access violation.".
My PC Memory has enough space.
The Simple way for Reproduction is follows.
Step1
Use Obi Cloth Sample Scene named "CharacterCloth.unity" in "Sample Scene" directory.
Step2
Attach the following Script into "Main Camera".
-MeshTest.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshTest : MonoBehaviour
{
void OnPreRender()
{
MeshRenderer[] meshrenderers = Component.FindObjectsOfType<MeshRenderer>();
SkinnedMeshRenderer[] skinnedMeshRenderers = Component.FindObjectsOfType<SkinnedMeshRenderer>();
foreach (MeshRenderer r in meshrenderers)
{
Mesh m = r.GetComponent<MeshFilter>().sharedMesh;
}
foreach (SkinnedMeshRenderer r in skinnedMeshRenderers)
{
Mesh m = new Mesh();
r.BakeMesh(m);
}
}
}
Step3
Click the Play Button.
Step4
Probably you can see the Crash of Unity Editer.
Does anyone know how can I fix this issue?
I found the crash of Unity Editer.
My enviroment are follows.
Obi Cloth version is 3.3.1.
Unity version 2017.2.0f3.
PC OS is Windows10 64bit.
When I refer Mesh at OnPreRender() of Camera, this issue will happen.
Moreover error.log says "Unity.exe caused an Access Violation (0xc0000005)" & "Read from location 00000000 caused an access violation.".
My PC Memory has enough space.
The Simple way for Reproduction is follows.
Step1
Use Obi Cloth Sample Scene named "CharacterCloth.unity" in "Sample Scene" directory.
Step2
Attach the following Script into "Main Camera".
-MeshTest.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshTest : MonoBehaviour
{
void OnPreRender()
{
MeshRenderer[] meshrenderers = Component.FindObjectsOfType<MeshRenderer>();
SkinnedMeshRenderer[] skinnedMeshRenderers = Component.FindObjectsOfType<SkinnedMeshRenderer>();
foreach (MeshRenderer r in meshrenderers)
{
Mesh m = r.GetComponent<MeshFilter>().sharedMesh;
}
foreach (SkinnedMeshRenderer r in skinnedMeshRenderers)
{
Mesh m = new Mesh();
r.BakeMesh(m);
}
}
}
Step3
Click the Play Button.
Step4
Probably you can see the Crash of Unity Editer.
Does anyone know how can I fix this issue?