Page 2 of 16

Posted: Sat May 10, 2008 6:45 am
by D-Eagle
Still crashes. When the server crashes, an error message will pop up:

Code: Select all

Windows has triggered a breakpoint in Server.exe.

This may be due to a corruption of the heap, which indicates a bug in Server.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while Server.exe has focus.

The output window may have more diagnostic information.
And the ide will pop up an source file of the Enet library, showing the

Code: Select all

enet_free (void * memory)
{
(here's the arrow ->)   free (memory);
}
And this only happens when there's more than one clients on the server.

Posted: Sat May 17, 2008 5:19 pm
by D-Eagle
So... any suggestions?

Posted: Sun May 18, 2008 3:21 am
by BlindSide
I'll have a quick look at it today and see if I can reproduce the problem.

Posted: Sun May 18, 2008 10:17 am
by D-Eagle
a Correctly working example program would be cool :x

Posted: Sun May 18, 2008 1:25 pm
by BlindSide
Ok, the good new is, I can easily reproduce this problem. The bad news is, I can easily reproduce this problem. Also, since I can't find an easy fix, I've decided I will do a complete, more efficient, re-write of irrNetLite with compression (ZLib) and encryption (Rijndael) support, so stay tuned for that in a couple of days.

Cheers

Posted: Sun May 18, 2008 1:54 pm
by D-Eagle
Oh, that sounds fantastic!

Posted: Sat May 24, 2008 3:45 pm
by monkeycracks
I have a question about banning/kicking peers... Would it be safe to use peer->address.host for such purposes or can someone else have the same address.host and be from a different network?

Posted: Tue May 27, 2008 8:49 am
by BlindSide
Due to NAT sharing etc, banning strictly from a hardware point of view (IP Address etc) is not really safe in general, I recommend instead banning the username of an offending character in game if thats possible. Ofcourse if we are just talking about a casual shoot-em-up then using peer->address.host may be your only option. (peer->address.host is the 32-bit unsigned integer representation of their IP Address.)

Posted: Wed May 28, 2008 6:06 pm
by monkeycracks
Thanks for clearing that up. I figured as much but I'm bad at making assumptions.

Posted: Fri Jun 13, 2008 10:33 am
by D-Eagle
So, how's going with the library?

Posted: Sat Jun 14, 2008 2:37 am
by BlindSide
Exams, thanks for reminding me, expect something around the 20th.

Posted: Sun Jun 29, 2008 9:00 pm
by Ion Dune
I'm trying to make a simple project using this, but I'm getting compiler errors. I added all the .c's from the enet folder, added the enet/include path to the project directories, and included the ws2_32.lib. But I'm getting a few unresolved externals:

Code: Select all

NetManager.obj : error LNK2019: unresolved external symbol _enet_initialize referenced in function "public: __thiscall irr::net::INetManager::INetManager(class irr::net::PacketHandler *)" (??0INetManager@net@irr@@QAE@PAVPacketHandler@12@@Z)
NetManager.obj : error LNK2019: unresolved external symbol _enet_deinitialize referenced in function "public: virtual __thiscall irr::net::INetManager::~INetManager(void)" (??1INetManager@net@irr@@UAE@XZ)
NetManager.obj : error LNK2019: unresolved external symbol _enet_address_set_host referenced in function "public: int __thiscall irr::net::INetManager::setUpClient(char *,int)" (?setUpClient@INetManager@net@irr@@QAEHPADH@Z)
host.obj : error LNK2019: unresolved external symbol _enet_socket_create referenced in function _enet_host_create
host.obj : error LNK2019: unresolved external symbol _enet_socket_destroy referenced in function _enet_host_destroy
host.obj : error LNK2019: unresolved external symbol _enet_time_get referenced in function _enet_host_bandwidth_throttle
protocol.obj : error LNK2001: unresolved external symbol _enet_time_get
protocol.obj : error LNK2019: unresolved external symbol _enet_socket_send referenced in function _enet_protocol_send_outgoing_commands
protocol.obj : error LNK2019: unresolved external symbol _enet_socket_wait referenced in function _enet_host_service
protocol.obj : error LNK2019: unresolved external symbol _enet_socket_receive referenced in function _enet_protocol_receive_incoming_commands
This is in Visual Studio C++ 2008 Express. I'm a bit confused because I can't seem to find any file in the enet folder that's not included in my project. Any help?

Posted: Sun Jun 29, 2008 9:26 pm
by BlindSide
Which version of enet did you use? I've encountered something like this when using the newest version, something to do with the win32 timer functions.

I haven't tried enet with VS2008 yet, I'll give it a go sometime and see if I encounter any problems/solutions.

PS: Sorry for the delay on the new version, it's still coming. :P

Cheers

Posted: Sun Jun 29, 2008 9:50 pm
by Ion Dune
Oh. I was using the enet version that came with the irrNetLite download. I switched to the newest one, and my errors were:

Code: Select all

win32.obj : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function _enet_initialize
win32.obj : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function _enet_deinitialize
win32.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function _enet_time_get
Just like you said. I did some googling, which led me to this. When I added

Code: Select all

#pragma comment(lib, "WINMM.lib")
it compiled fine.

Posted: Mon Jun 30, 2008 4:49 am
by BlindSide
So even the old errors were gone? Thats great, I may use the new version in the next release, thanks for the tip.