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
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
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.