sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

IL2CPP builds with Codegen.OptimizeSize break due to `FullySharedGeneric`

Open pmabres opened this issue 2 years ago • 10 comments

If we check this original issue reported here: Builds on Unity 2022.1 break with aliased package #691

This still happens on Unity 2021.3.10f1 The trick to reproduce the bug is create an android Build with these options:

PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, Il2CppCompilerConfiguration.Debug);
EditorUserBuildSettings.il2CppCodeGeneration = UnityEditor.Build.Il2CppCodeGeneration.OptimizeSize;

Versions of Sentry used: 0.23.1 and also happens on 0.19.0 (I've tried upgrading to see if the issue was related to a particular version.

pmabres avatar Oct 06 '22 04:10 pmabres

Hey @pmabres and thanks for raising this. I'll check it out.

bitsandfoxes avatar Oct 06 '22 11:10 bitsandfoxes

I can't seem to reproduce the issue on an M1. On what platform are you building for Android?

bitsandfoxes avatar Oct 06 '22 12:10 bitsandfoxes

Same thing, for iOS as well

VadymTykhoniuk avatar Oct 06 '22 14:10 VadymTykhoniuk

I'm using Mac i9

VadymTykhoniuk avatar Oct 06 '22 14:10 VadymTykhoniuk

I'm using MacBook pro with an Intel arch

On Fri, 7 Oct 2022, 03:49 VadymTykhoniuk, @.***> wrote:

I'm using Mac i9

— Reply to this email directly, view it on GitHub https://github.com/getsentry/sentry-unity/issues/1006#issuecomment-1270196707, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF5C3IHBZU5555PEUHBYWLWB3RHXANCNFSM6AAAAAAQ6E2XEE . You are receiving this because you were mentioned.Message ID: @.***>

pmabres avatar Oct 06 '22 21:10 pmabres

I'll see if I can push. sample repo later

pmabres avatar Oct 06 '22 22:10 pmabres

Use just empty project with imported sentry with samples

VadymTykhoniuk avatar Oct 07 '22 08:10 VadymTykhoniuk

Thanks, @pmabres, and @VadymTykhoniuk. I can reproduce the issue and I reported it with Unity. I'll update here once we know more.

bitsandfoxes avatar Oct 07 '22 14:10 bitsandfoxes

Thanks @bitsandfoxes ! do you happen to have the tracking id for the issue?

pmabres avatar Oct 12 '22 23:10 pmabres

@pmabres not yet. It did not pass through their bug-report verification yet.

bitsandfoxes avatar Oct 13 '22 11:10 bitsandfoxes

@bitsandfoxes sorry to bother, do you have any updates from the Unity team regarding this issue?

pmabres avatar Jan 24 '23 03:01 pmabres

@pmabres no worries at all! Sorry to not have any better news but the report (with a repro) got rejected initially with "cannot reproduce" so I provided another one and that one seems to be stuck in eternal open. Thanks for reminding me. I'll give it another go.

bitsandfoxes avatar Jan 25 '23 10:01 bitsandfoxes

@pmabres an update on the Unity issue tracker

bitsandfoxes avatar Jan 27 '23 12:01 bitsandfoxes

I'm having the same issue on 2021.3.16f1. I can't upgrade to 2022 and need the full generic sharing mechanism which is enabled by "Faster (smaller) builds". Unfortunately it means I likely have to exclude Sentry from the build during the launch of the app.

polynatic avatar Jan 29 '23 23:01 polynatic

Good news! Looks like it's in progress and a fix is on it's way: https://issuetracker.unity3d.com/issues/il2cpp-build-fails-when-using-an-assembly-renamed-via-sentrys-assembly-alias-tool

bitsandfoxes avatar Feb 23 '23 14:02 bitsandfoxes

Thanks @bitsandfoxes for taking the time to report it!

pmabres avatar Feb 23 '23 22:02 pmabres

Good news, seems to have been fixed on: 2021.3.21f1, 2022.1.12f1, 2022.2.0b4, 2023.1.0a5

pmabres avatar Mar 15 '23 09:03 pmabres

Good news, seems to have been fixed on: 2021.3.21f1, 2022.1.12f1, 2022.2.0b4, 2023.1.0a5

🎉 All that's left to do is wait for the update!

bitsandfoxes avatar Mar 15 '23 09:03 bitsandfoxes

Closing this since it's fixed (tm).

bitsandfoxes avatar Apr 04 '23 17:04 bitsandfoxes