Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2021.2.X, 2022.1.X
Votes
1
Found in
2021.2.0a17
2021.2.7f1
2022.1
2022.2
Issue ID
1396719
Regression
No
[Android] [IL2CPP] 'MethodAccessException: Attempt to access method' is thrown when using Faster builds IL2CPP Code Generation
How to reproduce:
1. Download the attached project 'ILMethodError.zip'
2. Set IL2CPP Code Generation to Faster (smaller) builds
3. Build and Run 'SampleScene' Scene on Android device
4. Observe logs in logcat
Expected result: No exceptions are seen in logcat
Actual result: MethodAccessException is seen in logcat with following errors:
Error Unity MethodAccessException: Attempt to access method 'System.Collections.Generic.IEnumerable<PokerCore.Model.Achievements.AchievementConfig>.GetEnumerator' on type 'System.Collections.Generic.List<UnityEngine.Events.PersistentCall>' failed.
Error Unity at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00000] in <00000000000000000000000000000000>:0
Reproducible with: 2021.2.0a17, 2021.2.8f1, 2022.1.0b4, 2022.2.0a2
Could not test with: 2019.4.34f1, 2020.3.26f1, 2021.2.0a16 (The required feature is not implemented)
Reproducible with:
VLNQA00288, Samsung Galaxy J7 (SM-J730F), Android 8.1.0, CPU: Exynos 7 Octa 7870, GPU: Mali-T830
Not reproducible with:
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76 (app crashes)
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540 (app crashes)
VLNQA00225, Qualcomm null (SDM845 for arm64), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630 (app crashes)
Iphone 11 (iOS 13.5) (app does not load)
Notes:
- The issue can be reproduced on some Android devices only
- The app crashes on standalone and some Android devices
- The app does not load when building on iOS and shows an error in Xcode: Thread 1: EXC_BAD_ACCESS (code=1, address=0x400000082)
- Does not reproduce if IL2CPP Code Generation is set to Faster runtime
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Long Prefab save times when using Unity 2022.2 and higher
- Console displays error "UnityException: Creating asset at path Assets/Scenes/ .scenetemplate failed." during scene template saving
- "Development Build" watermark is shown in non-development UWP release builds
- Console errors appear when the Inspector is set to Debug and a GameObject is selected
- A script public variable value is not used when set in the Inspector window
Resolution Note (fix version 2022.2):
Fixed in: 2022.2.0a8
Resolution Note (fix version 2022.1):
Fixed in: 2022.1.0b14
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.17f1