irrNetLite 2.1 [BETA]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
D-Eagle
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Post 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.
D-Eagle
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Post by D-Eagle »

So... any suggestions?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I'll have a quick look at it today and see if I can reproduce the problem.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
D-Eagle
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Post by D-Eagle »

a Correctly working example program would be cool :x
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
D-Eagle
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Post by D-Eagle »

Oh, that sounds fantastic!
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post 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?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Thanks for clearing that up. I figured as much but I'm bad at making assumptions.
D-Eagle
Posts: 25
Joined: Fri Jan 25, 2008 11:03 pm

Post by D-Eagle »

So, how's going with the library?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Exams, thanks for reminding me, expect something around the 20th.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post 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?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post 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.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply