Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug [solved] ver2021.2.* "multithreaded asset garbage collection" thorows invalid argument error

Discussion in 'Editor & General Support' started by pivot_RyomaShibata, Mar 29, 2022.

  1. pivot_RyomaShibata

    pivot_RyomaShibata

    Joined:
    Oct 13, 2020
    Posts:
    8
    I would like to discuss this feature.
    https://unity3d.com/jp/unity/whats-new/2021.2.0

    I reported it as a bug, but Unity doesn't seem to be responding to it, so I want to discussing it here as well.
    Reported issue↓
    I've checked some documentation and it doesn't seem possible to deactivate "multithreaded asset garbage collection".
    (Maybe this feature is not the cause, but I have to doubt it because it works all fine in 2021.1.* )

    Does anyone know any fixes for this issue? or has anyone else faced the same problem?

    It could be a problem that doesn't show up with recent device. But sadly this is my work and I need to fix this problem.
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Hello there,
    The bug has since been marked as a (potential) duplicate to this issue, which would indicate that it might be related to Addressables?
     
  3. pivot_RyomaShibata

    pivot_RyomaShibata

    Joined:
    Oct 13, 2020
    Posts:
    8
    Hi, Thanks for the reply.
    I commented out the part of the project that uses Addressables, but it didn't change the situation.
    So, I still think the problem is caused by "multithreaded asset garbage collection" or "Android thread configuration" (both added in 2021LTS).
    https://docs.unity3d.com/2021.3/Documentation/Manual/android-thread-configuration.html
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Thank you for trying that. Your issue ticket has been reopened but requires more information from you for our QA to be able to reproduce the issue. You should have received an email about this :)
     
    pivot_RyomaShibata likes this.
  5. pivot_RyomaShibata

    pivot_RyomaShibata

    Joined:
    Oct 13, 2020
    Posts:
    8
    Thank you so much, I have recieved notify that the issue has been reopened.
    And I will send you more info to reproduce this issue in a few days.
     
  6. pivot_RyomaShibata

    pivot_RyomaShibata

    Joined:
    Oct 13, 2020
    Posts:
    8
    As we make progress, I will share it in this forum too.
     
    MartinTilo likes this.
  7. pivot_RyomaShibata

    pivot_RyomaShibata

    Joined:
    Oct 13, 2020
    Posts:
    8
    [Update]

    The problem may be solved!
    I think the cause is that we were running a build which is "Optimized Frame Pacing" enabled on a device with an Android API level of 22 or lower.

    In other words, Unity is trying to run GC using a API that Android does not support, which is probably causing invalid argument error.

    So, maybe Unity should deactivate "Optimized Frame Pacing" option, if "minimum api level" in the player setting is lower than 22.
     
    MartinTilo likes this.