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 / Strange! Getting user to register using SendHTTPRequestASync

Author
Message
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 31st Jan 2015 17:51
Hi,

I've got a basic test application working which sends some data to a PHP page on my website. It was all working fine until I used GetDeviceID() to put the unique device ID into the Post message:



This bombs out completely.

Strangely, over here,when the &org= part of the Post data is longer than 'ABC' it doesn't crash!

Also, if I don't use GetDeviceID(), it doesn't crash!

I'd appreciate it if anyone could try this, run it a few times and report back. I'm using Alpha 10.

Thanks very much,

James
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 1st Feb 2015 11:18
After further investigation, it seems that it doesn't crash if the &org= part is >4 characters long.

I have no idea why this is, and I think I'm just going to leave it like that, make sure the org is always >4 characters, and hope nothing surfaces later to bite me on the backside.

If anyone has any ideas in the meantime, please let me know!

Cheers,

James
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 1st Feb 2015 11:37
I use SendHTTPRequestASync too but was using an ID generated per install, not deviceID. I just changed my code to use getDeviceID as a test and although it didn't bomb out, it did crash on hitting escape.

Testing your code:
1st time: Connected with a server response 'New'.
2nd time: Immediate AppGameKit crash.
3rd time: Server response was 'None'. Crash on hitting escape.
4th - 8th time: Crash straight away
9th time: Server response 'None', no crash on hitting escape.

These tests all done on Windows btw.
Definitely something screwy going on; do you use 'strip_tags' on the php side?

Twitter: @itanican
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 1st Feb 2015 13:24
I've tried it with and without strip_tags with the same result.

I'm glad you're getting the crash as well - thought I was going mad.

Thanks very much for testing it, Wilf.

James
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Feb 2015 20:09
The crash was caused by GetDeviceID corrupting memory which would cause it to crash at some point in the future. Fixed for 2.0.12

Login to post a reply

Server time is: 2024-05-26 05:21:48
Your offset time is: 2024-05-26 05:21:48