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

I would like to discuss this feature.

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.

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?

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

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 :slight_smile:

1 Like

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.

As we make progress, I will share it in this forum too.

1 Like

[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.

1 Like