Search Issue Tracker
Fixed in 5.4.0
Votes
1
Found in
5.4.0b6
Issue ID
770224
Regression
Yes
[Shuriken] "StackOverflowException" appears and Editor freezes while using "Particle Callbacks demo" project
Regression from at least Version 5.3.2p3 (b6c1a63227dc)
Steps:
1. Open project https://www.assetstore.unity3d.com/en/#!/content/11903
==>
Delete the script that causes a compilation error
2. Run "particleCallbacks" scene
3. Click several times on the barrel with the fire
==>
Editor freezes and "StackOverflowException" appears
Please, find attached movie for details
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Profiler - Taking you to the wrong section when using 'show'
- Draw Renderers custom pass doesn't work with SSGI
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
hunterloftis
Mar 21, 2016 06:36
An onParticleCollision callback by itself doesn't cause the issue. This code caused no issues:
void OnParticleCollision(GameObject other) {
List<ParticleCollisionEvent> collisions = new List<ParticleCollisionEvent>();
ps.GetCollisionEvents(other, collisions);
foreach (ParticleCollisionEvent c in collisions) {
PlayHitSound(c.intersection);
DamageDestroyables(other.GetComponentInParent<Destroyable>(), c.intersection);
}
}
Further down the chain, DamageDestroyables() led to this:
damageParticles.transform.position = location;
//damageParticles.Play();
The commented out line is what caused the stack overflow. Changing that to:
if (!damageParticles.isPlaying) damageParticles.Play();
...Did not help anything. Still a stack overflow.
hunterloftis
Mar 21, 2016 06:12
I'm getting the same thing with a project that was previously working (5.3.2-something). I'm using an "OnParticleCollision" callback to determine when a bullet hits a player and it causes a series of StackOverflowException errors with no extra information. The editor also freezes as in this description.