Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed on expression: 'ps->array_size()' #278

Closed
lfarkas73 opened this issue Nov 6, 2023 · 9 comments
Closed

Assertion failed on expression: 'ps->array_size()' #278

lfarkas73 opened this issue Nov 6, 2023 · 9 comments
Assignees
Labels
bug Something isn't working need more info released

Comments

@lfarkas73
Copy link

Describe the bug

I get two errors when I exit play mode.
I saw this problem has been fixed earlier, but it reoccur again in the latest version.

Assertion failed on expression: 'ps->array_size()'
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Coffee.UIExtensions.UIParticleRenderer:UpdateMesh (UnityEngine.Camera) (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticleRenderer.cs:330)
Coffee.UIExtensions.UIParticle:UpdateRenderers () (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticle.cs:503)
Coffee.UIExtensions.UIParticleUpdater:Refresh () (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticleUpdater.cs:80)
UnityEngine.UI.ScrollRect:LateUpdate ()

Mesh '[UIParticleRenderer] Combine Instance Mesh': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting.
Mesh bounds min=(0.00, 0.00, 0.00), max=(16001069492125579151405399003889664.00, 79316175099297370989568178471829504.00, 308585124126850166435263369183232.00). Please make sure the mesh is exported without any errors.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Coffee.UIExtensions.UIParticleRenderer:UpdateMesh (UnityEngine.Camera) (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticleRenderer.cs:330)
Coffee.UIExtensions.UIParticle:UpdateRenderers () (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticle.cs:503)
Coffee.UIExtensions.UIParticleUpdater:Refresh () (at ./Library/PackageCache/com.coffee.ui-particle@447996ce0f/Scripts/UIParticleUpdater.cs:80)
UnityEngine.UI.ScrollRect:LateUpdate ()

To Reproduce

  1. Create and open new empty default 3D project
  2. Import latest GIT package
  3. Import UIParticle_Demo
  4. Press play in the editor.
  5. Exit play mode.
  6. See error.

Expected behavior

No errors in the console upon exiting play mode.

Environment (please complete the following)

  • Package version 4.2.2
  • Platform: Editor(Windows), IOS platform generates the same error
  • Unity version: 2022.3.7f1
  • Project options: Default project settings with built-in pipeline
@lfarkas73 lfarkas73 added the bug Something isn't working label Nov 6, 2023
@mob-sakai
Copy link
Owner

The issue is not reproduced on my environment...

Environment

  • Package version 4.2.2 (latest)
  • Platform: Editor(Windows 10)
  • Unity version: 2022.3.7f1
  • Project options: Default, built-in pipeline

I would like to know more about this issue.

@lfarkas73
Copy link
Author

lfarkas73 commented Nov 8, 2023 via email

@raveneer
Copy link

raveneer commented Mar 6, 2024

I also have same problems.
while play, it is ok, but when end play, error happen.

image

@mitay-walle
Copy link

mitay-walle commented May 10, 2024

Bounds of mesh are 0.0.0, that cause this error, I've added this check:
if (!float.IsNaN(bounds.extends.x) && !float.IsInfinity(bounds.extends.x) && bounds.extends.x > 0)
before_renderer.BakeMesh()` and error disappeared

UPD: final working code was:

if (!float.IsNaN(x) && !float.IsInfinity(x) && x > 0)
{
s_CombineInstances[0].mesh.RecalculateBounds();
}
_renderer.BakeMesh(s_CombineInstances[0].mesh, bakeCamera, ParticleSystemBakeMeshOptions.BakeRotationAndScale);

@mob-sakai
Copy link
Owner

@mitay-walle
Thank you for your reporting! 👍

github-actions bot pushed a commit that referenced this issue May 22, 2024
## [4.6.4](v4.6.3...v4.6.4) (2024-05-22)

### Bug Fixes

* assertion failed on expression: 'ps->array_size()' ([1b5c359](1b5c359)), closes [#278](#278)
* lost Material.mainTexture when using AnimatableProperties ([ea04352](ea04352)), closes [#311](#311)
* remove unnecessary code ([c37c014](c37c014))
Copy link

🎉 This issue has been resolved in version 4.6.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue May 22, 2024
## [4.6.4](v4.6.3...v4.6.4) (2024-05-22)

### Bug Fixes

* assertion failed on expression: 'ps->array_size()' ([1b5c359](1b5c359)), closes [#278](#278)
* lost Material.mainTexture when using AnimatableProperties ([ea04352](ea04352)), closes [#311](#311)
* remove unnecessary code ([c37c014](c37c014))
Copy link

🎉 This issue has been resolved in version 4.6.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue May 22, 2024
## [4.6.4](v4.6.3...v4.6.4) (2024-05-22)

### Bug Fixes

* assertion failed on expression: 'ps->array_size()' ([1b5c359](1b5c359)), closes [#278](#278)
* lost Material.mainTexture when using AnimatableProperties ([ea04352](ea04352)), closes [#311](#311)
* remove unnecessary code ([c37c014](c37c014))
@mitay-walle
Copy link

mitay-walle commented May 27, 2024

@mob-sakai sorry for missleading.

I've done more tests and find out that in my case reason was in Noise module + prewarm.

No specific parameters, but module enabling itself.
only disabling noise or prewarm helps.

Error appear when i restart scene with existing UIParticle and particleSystem emission / noise modules enabled. Important: particle shouldn't be selected when restarting scene
image

@mitay-walle
Copy link

BugReport.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info released
Projects
None yet
Development

No branches or pull requests

4 participants