Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK.NET Multiplayer Problem

Author
Message
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 17th Nov 2008 12:04
Hi all,

I've encountered a problem devoloping a multiplayer game with DarkGDK.NET

After the connection has established the client app crashes!!!! And the strange thing is that if I run them with Visual Studio 2008 the client app doesn't crash.

I reviewed my code and it seems correct. I tried first the Server/Client connection, then the Peer-To-Peer connection but it doesn't work anyway!

The fault module name is: ntdll.dll . I tried the game on Windows XP and also on Windows Vista but the same error occured.

Data between games is sent with the functions SendNetMessageInteger, SendNetMessageMemblock, SendNetMessageString. The game crashes (notice that only the client does) during the creation of plain objects. I checked all the ID I use and they are all unique.

On Windows Vista SP 1:

The games crashes during the game after a particular combination of NetSendXXX instructions are executed.

On Windows XP SP 3:

The game crashes after it has loaded 33 objects (only if it runs as a client)!!

Also notice that the client and the server part share most of the code (except for the code that read incoming data).

Thanks to all who will answer.

Fear leads to anger
Anger leads to hate
Hate leads to suffering
Swordsman
15
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 17th Nov 2008 16:19
Can you post some code?

I don't work with DarkGDK.NET, but I'll help where I can. It might be worth you trying to compile with /clr:pure or /clr:safe and see if that makes a difference.
If you get some compile errors with /clr:pure, make sure you are explicity stating _cdecall in all of your functions requiring the call.

Also, try a full Clean->Rebuild of your solution.

Sorry I couldn't be more help
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 18th Nov 2008 10:02
I don't need the "_cdecall" statement because .NET provides Interop Assemblies in order to access them like any other library.

My app become unstable immediately after the execution of this statement..

CDarkGDK.oDBMultiplayer.JoinNetGame(Session.ID, "Client Player")

Where Session.ID is the ID of the session obtained with the PerformChecklistForNetSession command.

Also this statement doesn't work:

CDarkGDK.oDBMultiplayer.DefaultNetGame(Session.Name, "Client Player", 10, 2)

Where Session.Name is the name of the already existing session obtained with the PerformChecklistForNetSession command.

If I try to execute this code:

Public Shared Sub CreateClient(ByVal Session As NetSession)

CDarkGDK.oDBMultiplayer.JoinNetGame(Session.ID, "Client Player")

For I As Integer = 1 To 50

Try

CDarkGDK.oDB3D.MakeObjectPyramid(I, 40.0F)
Console.WriteLine("Object " & I & " created")

Catch ex As Exception

Console.WriteLine("Object " & I & ": " & ex.Message)

End Try

Next

End Sub

I get an "AccessViolationException" after 33 objects have been created.

Fear leads to anger
Anger leads to hate
Hate leads to suffering
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 18th Nov 2008 10:08
My Visual Studio solution is composed by 2 projects: The Main project is a Console Application project which refers to a second one, a Class Library project. They both refers to the DGDK.NET assemblies. The main project initialize the DGDK.NET with the security key provided by the Authenticator.

Forgive my grammar mistakes. English is not my mother-tongue!

PS: I use the Clean -> Rebuild functions very often.

Fear leads to anger
Anger leads to hate
Hate leads to suffering

Login to post a reply

Server time is: 2024-09-30 11:35:51
Your offset time is: 2024-09-30 11:35:51