cant use socket in real hololens 2

Copper Contributor

I am developing a app for hololens2 with unity 2019.4.4f & Vs2017 & holones 2.
in the unity editor, I can send & receive TCP packets with socket very well, but when i deploy is to the real hololens 2,. the APP will crash soon because of "stack overflow"
below is my code and the error info:


error info:
Exception thrown at 0x766053DF in TIDVoice.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x10D6D840.
Exception thrown at 0x766053DF in TIDVoice.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x10D6D840.
Exception thrown at 0x740E61E6 (vcruntime140d_app.dll) in TIDVoice.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x10C72FF8).
Unhandled exception at 0x740E61E6 (vcruntime140d_app.dll) in TIDVoice.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x10C72FF8).


Exception thrown at 0x766053DF in TIDVoice.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x10D6D840.
Exception thrown at 0x766053DF in TIDVoice.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x10D6D840.
Exception thrown at 0x77025D38 (ntdll.dll) in TIDVoice.exe: 0xC0000005: Access violation writing location 0x10C70FBC.


my code:

public class MediaPlay : MonoBehaviour
{
.....................
#region private field
TcpClient client = new TcpClient("192.168.124.102", 12345); ===》 if delete this line, everything is ok
.......................
// serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ====> this line has the same reult

anyone else has meet the same problem? need your support , thanks very much

0 Replies