Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Particle Array Size Crash

Discussion in '5.4 Beta' started by Lyje, Jun 20, 2016.

  1. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    169
    Just installed b22 and I'm getting semi-regular editor crashes. The last error message in the editor log is always:

    particles.array_size() == count
    (Filename: C:/buildslave/unity/build/Runtime/ParticleSystem/ParticleSystem.cpp Line: 2528)

    occasionally accompanied by

    count >= toIndex
    (Filename: C:/buildslave/unity/build/Runtime/ParticleSystem/ParticleSystem.cpp Line: 2527)

    Stacktrace:
    0x0000000140EC2EDF (Unity) ParticleSystem::EndUpdateAll
    0x0000000140462BA8 (Unity) PlayerLoop
    0x0000000140BD1085 (Unity) Application::UpdateScene
    0x0000000140BD2609 (Unity) Application::UpdateSceneIfNeeded
    0x0000000140E27F34 (Unity) GUIView::processEventMessages
    0x0000000140E29D1A (Unity) GUIView::GUIViewWndProc
    0x00007FF9CF3E1169 (USER32) DispatchMessageW
    0x00007FF9CF3E0C97 (USER32) DispatchMessageW
    0x0000000140E373D2 (Unity) FindMonoBinaryToUse
    0x0000000140E38A3C (Unity) WinMain
    0x00000001415B23E4 (Unity) read
    0x00007FF9CED08102 (KERNEL32) BaseThreadInitThunk

    Not yet isolated what circumstances cause this to happen however. May also be worth noting that I get a few of these errors sporadically without crashing. Not yet tried running a build to see if builds crash similarly, will do so shortly and update.
     
  2. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    169
    Builds don't crash. Still don't feel like I've got enough to submit a bug report though, as it seems semi-random at the moment.
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    I've just checked the list of fixes for b23, and, unless you're using the new Trigger Module, I don't think there are any upcoming fixes that will improve this for you. So, if you do manage to find a good reproduction project for it, we'd love to take a look at it!
     
  4. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Just installed b22 and got exactly the same problem. Wouldn't describe it better.
    Was using b10 before so don't know if the problem appeared in b22 or in an older version.

    We have some crate destruction vfx in our game that all use the same Particle System object, which consists of one parent and one child Particle System.
    We re-position the object and replay the system when a new crate dies, all particles are generated in a burst at 0s.

    Another problem that I realized, sometimes the Particle System seems to stop (with the particles standing static in the air) until I destroy a new crate, which makes the Particle System runs again, or this bug appears.

    We have a bunch of other particle systems, but this seems to be the only one generating the problem.
     
  5. Alex-Lian

    Alex-Lian

    Guest

    Again to echo Richard's request. If we could get a bug report # with an example of these specific particle systems that are crashing, then it'd be quite useful for us to debug and get fixed!
     
  6. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    169
    I've managed to put together a repro, just about to submit. I'll post the report number here when I receive one. I'm not sure this is exactly what's been happening to me previously, but it's definitely the same area and similar stacktraces so I'd be surprised if it's just a coincidence!

    UPDATE: Fogbugz entry here:
    https://fogbugz.unity3d.com/default.asp?807929_elj58crfk655qoro
     
    Last edited: Jun 22, 2016
    richardkettlewell likes this.
  7. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    169
  8. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    I agree, I'm not 100% sure it will be a dupe either. I will take a look tomorrow and let you know what's going on.
     
    Lyje likes this.
  9. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Well, it seems that our clever QA team were right - both bugs are caused by the same underlying issue.
    I've made a fix, so we will do our best to get this out into a 5.4 release as soon as we can.

    Apologies for the inconvenience!
     
    Peter77 and Abnormalia_ like this.
  10. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    169
    That's great, thanks for the quick turnaround!
     
  11. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Not sure if this is related, but I am getting this crash quite often:
    Code (CSharp):
    1. m_size != 0
    2. (Filename: C:\buildslave\unity\build\Runtime/Utilities/dynamic_array.h Line: 297)
    3.  
    4. ========== OUTPUTING STACK TRACE ==================
    5.  
    6. 0x0000000140EBC013 (Unity) ParticleSystem::RemoveFromManager
    7. 0x0000000140EC2E3F (Unity) ParticleSystem::Clear
    8. 0x0000000140EC38FE (Unity) ParticleSystem::Stop
    9. 0x0000000140EC42B8 (Unity) ParticleSystem::Deactivate
    10. 0x000000014004A572 (Unity) GameObject::ActivateAwakeRecursivelyInternal
    11. 0x000000014004A65C (Unity) GameObject::ActivateAwakeRecursively
    12. 0x000000014004A936 (Unity) GameObject::Deactivate
    13. 0x00000001403CC4B3 (Unity) DestroyGameObjectHierarchy
    14. 0x00000001403CFECF (Unity) DestroyObjectHighLevel
    15. 0x000000014013226B (Unity) DelayedDestroyCallback
    16. 0x000000014012FA05 (Unity) DelayedCallManager::Update
    17. 0x0000000140462A16 (Unity) PlayerLoop
    18. 0x0000000140BD1085 (Unity) Application::UpdateScene
    19. 0x0000000140BD2609 (Unity) Application::UpdateSceneIfNeeded
    20. 0x0000000140BDA444 (Unity) Application::TickTimer
    21. 0x0000000140E37420 (Unity) FindMonoBinaryToUse
    22. 0x0000000140E38A3C (Unity) WinMain
    23. 0x00000001415B23E4 (Unity) read
    24. 0x00007FF8B2248102 (KERNEL32) BaseThreadInitThunk
    25.  
    26. ========== END OF STACKTRACE ===========
     
  12. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Looks very likely to be the same thing
     
  13. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    An update on this - a fix has gone into b23 for this, which will be available soon!