Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
Votes
1
Found in
2019.4
2019.4.14f1
2020.3
2021.1
2021.2
Issue ID
1326854
Regression
No
Dns.GetHostEntry malfunction in IL2CPP builds
Reproduction steps:
1. Open user attached Project
2. Open Assets\Scenes\SampleScene
3. Build and Run a Dev build using IL2CPP
Expected result: There are no errors in the console
Actual result: There's an error in the console
Reproducible with: 2019.4.24f1, 2020.3.5f1, 2021.1.4f1, 2021.2.0a14
Notes: Does not reproduce with the Mono backend
Comments (1)
-
NNSkelly
Apr 13, 2021 21:29
For readers, bug is specifically with passing string.Empty ('') to GetHostEntry. Microsoft official docs state that this should return the machine's current IP address(es), and indeed this is the most common forum/stackoverflow advice for detecting this information at runtime. In editor and in Mono builds, the invocation works as such, but in IL2CPP builds, it results in an error
SocketException: Could not resolve host ''
with a chain of 0000 addresses in the quoted stacktrace
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
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a16
Resolution Note (fix version 2021.1):
Fixed in 2021.1.10f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.12f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.29f1