Closed balintkissdev closed 5 years ago
In Engine::Server, enet_host_service() was crashing because mHost was null on my Windows 10 machine after call to enet_host_create().
Engine::Server
enet_host_service()
mHost
enet_host_create()
void Server::update() { ENetEvent event; while (enet_host_service(mHost, &event, 0)) // Crash here { ... } }
Server::Server(FAWorld::World& world, LocalInputHandler& localInputHandler) : mWorld(world), mLocalInputHandler(localInputHandler) { mAddress.port = 6666; mAddress.host = ENET_HOST_ANY; mHost = enet_host_create(&mAddress, 32, 2, 0, 0); // mHost will be null }
Setting the address to the localhost ("127.0.0.1") with enet_address_set_host() solved the issue for me. Not sure if it was removed previously for some reason.
enet_address_set_host()
In
Engine::Server
,enet_host_service()
was crashing becausemHost
was null on my Windows 10 machine after call toenet_host_create()
.Setting the address to the localhost ("127.0.0.1") with
enet_address_set_host()
solved the issue for me. Not sure if it was removed previously for some reason.