Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4
2019.3.3f1
2020.2
Issue ID
1223903
Regression
No
Calling the SendTo method on a UDP Socket causes an invalid pointer address exception
How to reproduce:
1. Open the attached project (1223903.zip)
2. Enter Play Mode and look at the Console window
Expected result: There are no errors in the Console window
Actual result: There is a "SocketException: The system detected an invalid pointer address in attempting to use a pointer argument in a call." error in the Console window
Reproducible with: 2017.4.37f1, 2018.4.19f1, 2019.3.4f1, 2020.1.0b1, 2020.2.0a2
Notes:
1. The issue reproduces when a "Socket" class instance is created where its "ProtocolType" is set to "Udp" and the "SocketType" is set to "Dgram" and then its "SendTo" method is called
2. When the same steps to create a "Socket" class instance and call the "SendTo" method are used in a C# console application it does not cause any errors
3. The "Actual result" section shows results for a Windows 10 PC, on a Mac, the thrown error is different: "SocketException: mono-io-layer-error (10022)"
4. Tested on a Windows 10 PC and Mac
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
After investigation, the sample console application provided by the use produces the same exception in Microsoft .Net 4.7.2 using IPV6. This is not an issue with Mono or Unity, most likely an IPV6 issue with DotNetty.