miwarnec / DOTSNET

Public DOTSNET issue tracker
20 stars 0 forks source link

LiteNetLib broken on 1.19 #35

Closed gabrjt closed 3 years ago

gabrjt commented 4 years ago

Describe the bug Unable to connect to the server.

To Reproduce

  1. Install DOTSNET
  2. Setup a scene with LiteNetLib transports for Server and Client
  3. Start Server
  4. Connect Client
  5. See error

Expected behavior Client should connect normally.

Screenshots

litenetliberror

Desktop:

Additional context

[S]System.Net.Sockets.SocketException (0x80004005): The system detected an invalid pointer address in attempting to use a pointer argument in a call.

UnityEngine.Debug:Log(Object)
LiteNetLib.NetDebug:WriteLogic(NetLogLevel, String, Object[]) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetDebug.cs:36)
LiteNetLib.NetDebug:WriteError(String, Object[]) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetDebug.cs:74)
LiteNetLib.NetSocket:SendTo(Byte[], Int32, Int32, IPEndPoint, SocketError&) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetSocket.cs:435)
LiteNetLib.NetManager:SendRaw(Byte[], Int32, Int32, IPEndPoint) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetManager.cs:464)
LiteNetLib.NetManager:SendRaw(NetPacket, IPEndPoint) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetManager.cs:443)
LiteNetLib.NetPeer:.ctor(NetManager, IPEndPoint, Int32, Byte, NetDataWriter) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetPeer.cs:282)
LiteNetLib.NetManager:Connect(IPEndPoint, NetDataWriter) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetManager.cs:1429)
LiteNetLib.NetManager:Connect(String, Int32, NetDataWriter) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetManager.cs:1378)
LiteNetLib.NetManager:Connect(String, Int32, String) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/LiteNetLib_0.9indev/NetManager.cs:1355)
DOTSNET.LiteNetLib.LiteNetLibTransportClientSystem:Connect(String) (at Assets/DOTSNET/Scripts/ECS/Transport/Transports/LiteNetLib/DOTSNET/LiteNetLibTransportClientSystem.cs:100)
DOTSNET.NetworkClientSystem:Connect(String) (at Assets/DOTSNET/Scripts/ECS/NetworkClient/NetworkClientSystem.cs:106)
DOTSNET.NetworkClientAuthoring:Connect(String) (at Assets/DOTSNET/Scripts/Authoring/NetworkClientAuthoring.cs:33)
DOTSNET.NetworkClientHUD:OnGUI() (at Assets/DOTSNET/Scripts/Authoring/NetworkClientHUD.cs:24)
jeffposey commented 4 years ago

Yep, I just reproduced this with the Pong example by adding the LiteNet auth components and removing the Libuv ones.

miwarnec commented 3 years ago

will take a look today, sounds like a LiteNetLib bug.

miwarnec commented 3 years ago

ok can reproduce

miwarnec commented 3 years ago

seems like litenetlib ipv6 support does not work with Unity. disabled it again, which fixes this issue. thanks for reporting.