Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity 2022.2.1f1 iOS Build crash (possibly with ParticleSystemGeometryJob?)

Discussion in 'iOS and tvOS' started by crystani, Dec 26, 2022.

  1. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Hello, I am using 2022.2.1f1 to build for iOS. The build crashes after 10-20 mins. I have reported this issue, but could there be any workaround for this?

    Hardware Model: iPhone11,2

    Date/Time: 2022-12-24 22:51:02.7799 +0900
    Launch Time: 2022-12-24 22:32:39.3257 +0900
    OS Version: iPhone OS 15.5 (19F77)
    Release Type: User
    Baseband Version: 4.04.02
    Report Version: 104

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000003a
    Exception Codes: 0x0000000000000001, 0x000000000000003a
    VM Region Info: 0x3a is not in any region. Bytes before following region: 4367171526
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
    UNUSED SPACE AT START
    --->
    __TEXT 1044dc000-1044e4000 [ 32K] r-x/r-x SM=COW ...tellar Knight
    Exception Note: EXC_CORPSE_NOTIFY
    Termination Reason: SIGNAL 11 Segmentation fault: 11
    Terminating Process: exc handler [52731]

    Triggered by Thread: 8

    Thread 8 name: Job.worker 0
    Thread 8 Crashed:
    0 UnityFramework 0x10b4397fc void TransformParticleMeshAnimatedUVs<false>(ParticleMeshData const&, int, ParticleSystemTempData const&, ParticleSystemParticlesTempData const&, ColorRGBA32, ParticleSystemRendererData const&, ParticleSystemModules const&, math::affineX const&, math::float3x3 const&, ParticleSystemParticles const&, unsigned long, unsigned char**, float**) + 4784
    1 ??? 0x10 ???
    2 UnityFramework 0x10b42e6ac void DrawMeshParticles<(ParticleSystemRenderSpace)2>(ParticleSystemTempMeshData const&, ParticleSystemTempData const&, ParticleSystemParticles const&, ParticleSystemParticlesTempData const&, ParticleSystemRendererData const&, ParticleSystemModules const&, float*, void*) + 2504
    3 UnityFramework 0x10b427d2c ParticleSystemGeometryJob::RenderJobCommon(ParticleSystemGeometryJob&, void*, void*) + 572
    4 UnityFramework 0x10b4279b0 ParticleSystemGeometryJob::RenderJob(SharedGeometryJobData*, unsigned int) + 256
    5 UnityFramework 0x10abf8ac4 ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, int) + 272
    6 UnityFramework 0x10abf8c84 lane_guts(ujob_control_t*, ujob_lane_t*, int, int) + 140
    7 UnityFramework 0x10abf9420 worker_thread_routine(void*) + 96
    8 UnityFramework 0x10acb87d4 Thread::RunThreadWrapper(void*) + 196
    9 libsystem_pthread.dylib 0x20f2749ac _pthread_start + 148
    10 libsystem_pthread.dylib 0x20f273e68 thread_start + 8
     
    Last edited: Dec 26, 2022
    rom4ik likes this.
  2. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Here are some other crash cases:

    Thread 12 name: Job.worker 1
    Thread 12 Crashed:
    0 libsystem_kernel.dylib 0x1d9553160 __pthread_kill + 8
    1 libsystem_pthread.dylib 0x1e9c701ac pthread_kill + 268
    2 libsystem_c.dylib 0x1a3258c8c abort + 180
    3 libsystem_malloc.dylib 0x1aa0bfe2c malloc_vreport + 908
    4 libsystem_malloc.dylib 0x1aa0c0010 malloc_report + 64
    5 libsystem_malloc.dylib 0x1aa0bba34 find_zone_and_free + 308
    6 UnityFramework 0x10f8c2114 MeshRenderingData::Release() + 272
    7 UnityFramework 0x10f9a5f9c CleanupParticleSystemRenderer(RenderNodeQueue&, unsigned int) + 64
    8 UnityFramework 0x10f847894 RenderNodeQueue::Reset(bool) + 112
    9 UnityFramework 0x10f8477d0 RenderNodeQueue::~RenderNodeQueue() + 24
    10 UnityFramework 0x10f39156c SharedRendererScene::~SharedRendererScene() + 424
    11 UnityFramework 0x10f391208 ScriptableRenderContextArg::~ScriptableRenderContextArg() + 108
    12 UnityFramework 0x10fa8b738 GfxDeviceMetalBase::ExecuteAsyncSetupMetal(GfxDeviceAsyncCommand*) + 544
    13 UnityFramework 0x10f3a4818 ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, int) + 308
    14 UnityFramework 0x10f3a49b4 lane_guts(ujob_control_t*, ujob_lane_t*, int, int) + 140
    15 UnityFramework 0x10f3a5150 worker_thread_routine(void*) + 96
    16 UnityFramework 0x10f464504 Thread::RunThreadWrapper(void*) + 196
    17 libsystem_pthread.dylib 0x1e9c6a6cc _pthread_start + 148
    18 libsystem_pthread.dylib 0x1e9c69ba4 thread_start + 8

    Thread 10 name: Job.worker 1
    Thread 10 Crashed:
    0 UnityFramework 0x10befb940 ParticleSystemGeometryJob::RenderJob(SharedGeometryJobData*, unsigned int) + 144
    1 UnityFramework 0x10b6cca7c ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, int) + 200
    2 UnityFramework 0x10b6cca7c ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, int) + 200
    3 UnityFramework 0x10b6ccc84 lane_guts(ujob_control_t*, ujob_lane_t*, int, int) + 140
    4 UnityFramework 0x10b6cd420 worker_thread_routine(void*) + 96
    5 UnityFramework 0x10b78c7d4 Thread::RunThreadWrapper(void*) + 196
    6 libsystem_pthread.dylib 0x20f2749ac _pthread_start + 148
    7 libsystem_pthread.dylib 0x20f273e68 thread_start + 8
     
    rom4ik likes this.
  3. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    Same here with 2022.2.2. Very frequent crashes on both iOS and Android!
    Now trying to figure out if it's caused by engine version upgrade or SRP/URP upgrade.
     
  4. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Could you reproduce the issue easily? In our case, the crash happens after a 1 to 2 hours run. This happens literally always, but so far the issue seems to happen with the actual project to be released soon. I failed to create a project to be reported that shows how it happens.

    I've tried to report this to the bug report without the project, but it was disqualified because of I didn't attach the project...
     
  5. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Checked Unity 2022.2.3 update and built the project. Still having the same issue...
     
    rom4ik likes this.
  6. crystani

    crystani

    Joined:
    Jul 29, 2011
    Posts:
    68
    Downgraded the project's unity version to 2021.3.17 and the issue doesn't happen at all.
     
    rom4ik and drpepsi716 like this.
  7. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    I downgraded to 2021.1.24 which seems to have fixed the issue for iOS but not for Android. Now I'm also releasing a version with the project downgraded to 2021.3.17 and checking the vitals. Anyone from Unity want to chime in?
     
  8. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    I released the version of my app which I downgraded to 2021.3.17 and the issue is now also gone in Android.
    I'm using latest supported URP package in all versions of Unity I've tried using.
    There is definitely something wrong with 2022.1 and 2022.2.
     
  9. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    We are also seeing similar crashes more frequently on iOS than Android. Unity 2022.2.3f1.
    Still looking for answers but running out of ideas. Downgrading is not an option for us unfortunately :(

    Turning Main Thread Checker and Thread Performance Checker off seems to have decreased the number of crashes.
    Also turning Enable Bitcode to No.

    I wonder how many other setting need flipping before we get a stable build.
     
    Last edited: Feb 2, 2023
  10. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Here is what our stack trace looks like. Not entirely sure what to look at here:
    Screen Shot 2023-02-02 at 3.23.48 PM.png
     
  11. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    And the crash most of the time happens here. But it is random and does not happen in the same place in the app. Sometimes the app works well for a while. Others is crashes almost at the start:
    Screen Shot 2023-02-02 at 3.26.20 PM.png
     
  12. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    354
    Our game also encountered this issue. In our case, it happens because an asset bundle containing a mesh is unloaded and the mesh is still used by a particle system (used it in a job, so it's run asynchronously):
    If the particle system can be destroyed before the asset bundle is destroyed, I think this issue can be avoided.

    Here is the issue tracker ID: https://issuetracker.unity3d.com/issues/addressables-crash-in-transformparticlemesh
     
  13. Acttogreen

    Acttogreen

    Joined:
    Oct 11, 2015
    Posts:
    2
    Same issues, hope it get fixed soon
     
  14. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Been waiting for over a month... :(
     
  15. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Has anyone tried 2022.2.10f1 by any chance?
     
  16. vuthang

    vuthang

    Joined:
    Mar 7, 2017
    Posts:
    43
    This issue show in unity 2022.2.9
     
  17. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    From what we can tell this issue seems to have been resolved on 2022.2.11f1. If anyone can confirm that would be great.
    There was nothing in the release note related to this, but I figure I would try things an the app run like a champ.
     
    sandolkakos likes this.
  18. HoneyButterAlmond

    HoneyButterAlmond

    Joined:
    Oct 27, 2016
    Posts:
    6
    Same. Unity 2022.2.13f1.
     
    Tupolov73, viktorcode and sandolkakos like this.
  19. wechat_os_Qy00SMssqDAasQINMuXv5IrCE

    wechat_os_Qy00SMssqDAasQINMuXv5IrCE

    Joined:
    May 4, 2023
    Posts:
    1
    Yeah, we also have this problem, I dealt with it according to the solution of #12 floor. After testing, the problem lies in the fact that when the effect is played, we will directly to destroy. I just set the effect SetActive(false) before destroying, which can solve the problem of crash after many tests