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.

AppGameKit Classic Chat / Networking - GetNetworkClientInteger() crashes App

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jun 2012 19:27 Edited at: 13th Jun 2012 19:34
Here's my scenario...

I connect to a network as a client, this is successful. I immediately get a value which has been set to -1 by the host, to prove I'm connected:





This is successful, here's my log file:

Quote: "
20.272 * Connected to Network *
20.272 Network Id of connected network = 10001
20.272 Host Id of connected network = 1
20.272 Got a parameter from Host, the value is -1
"



Now, my client keeps checking to see if the game has started. For the purpose of debugging, I'm logging the GetNetworkClientInteger() command, wrapped in 2 debug statements, to prove this really is the line:



And here again is the log file to show it continuously getting the value successfully:

Quote: "
20.372 here...
20.372 netPlaying = -1
20.539 here...
20.539 netPlaying = -1
20.706 here...
20.706 netPlaying = -1
"


Now the host sets the value to 1 as the game starts:




And the Client should now see a value of 1, and I should see this in the log file. But I don't! The log file stops here...

Quote: "
26.373 here...
26.373 netPlaying = -1
26.539 here...
26.539 netPlaying = -1
26.706 here...
"


Which indicates it was the GetNetworkClientIneteger() that crashed the program. The screen freezes and I have to end the process in Task Manager. It is using 0% CPU.

Any comments/ideas appreciated.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jun 2012 19:33 Edited at: 13th Jun 2012 19:35
Some good news, writing this post helped me think through the issue. This only fails with Integers, Floats are fine. I have a workaround

I also tested with positive integers only, this doesn't fix it.

I guess this means a bug report is in order.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Jun 2012 02:54
I assume this is when running on Windows? If so can you email me the project and I'll take a look in the debugger at where it freezes.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Jun 2012 13:40
Yes, it's Windows. The project is several thousand lines and highly modularised, I'll try and extract a simpler example later in the week. My workaround of using floats has got me going again for now.

PALMER
16
Years of Service
User Offline
Joined: 20th Jan 2008
Location: West Sussex
Posted: 24th Jun 2012 05:24
I have been asked to make a App for a take away.

Can AppGameKit be used to take card orders and if It can is there any information about how others have taken on the challenge.

Mince

Login to post a reply

Server time is: 2024-05-19 13:04:22
Your offset time is: 2024-05-19 13:04:22