Search Issue Tracker
Won't Fix
Won't Fix in 6000.0.X
Votes
0
Found in
2022.3.45f1
6000.0.19f1
Issue ID
UUM-82353
Regression
No
Build fails with cast error when building Linux Player
Reproduction steps:
1. Open the attached “BugRepro” project
2. Click File > Build Settings…
3. Select the Linux target
4. Build the project
Expected results: The project is built successfully
Actual results: Build fails with error “cast from pointer to smaller type 'int32_t' (aka 'int') loses information“
Reproduced with: 2022.2.0a18, 2022.3.45f1, 6000.0.19f1
Can’t reproduce with: 2021.3.43f1, 2022.2.0a17 (Can’t downgrade project)
Reproduced on: Windows 10, Ubuntu 22.04
Not reproduced on: No other environment tested
Note: The Mono version builds successfully
Full error:
Building Library\Bee\artifacts\LinuxPlayerBuildProgram\zbz95\jyalehvu9tx2.o failed with output:
C:\Project\Library\Bee\artifacts\LinuxPlayerBuildProgram\il2cppOutput\cpp\GenericMethods.cpp:28119:10: error: cast from pointer to smaller type 'int32_t' (aka 'int') loses information
return (int32_t)L_0;
^~~~~~~~~~~~
1 error generated.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Comments (1)
-
Hadow
Oct 21, 2024 13:55
How to modify the IL code? Can you explain the steps in detail?
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Project provided contains invalid IL. There is a generic method that is attempting to cast an enum to an int32.
IL_0000: ldarg.0 // This is a generic value type of variable size.
IL_000b: ret // Attempting to return an int32
Changing the IL to the following 4 lines....
ldarga.s 0
conv.u
ldind.i4
ret
will achieve the same result with valid IL.
Resolution Note (6000.0.X):
Project provided contains invalid IL. There is a generic method that is attempting to cast an enum to an int32.
IL_0000: ldarg.0 // This is a generic value type of variable size.
IL_000b: ret // Attempting to return an int32
Changing the IL to the following 4 lines....
ldarga.s 0
conv.u
ldind.i4
ret
will achieve the same result with valid IL.