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 / Subscript out of bounds - again...

Author
Message
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 7th Apr 2014 10:11
I'm getting a 'subscript out of bounds' error reported with GetLastError() .

So I know this is more than likely something wrong in my code, but the issue I have is that this error is not reported on the windows build, but is reported on the iOS build.

Surely this is is something which should be consistent across all platforms?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Apr 2014 12:27
hmm, with v108 19 i get filename and line in error message
at subscript out of bounds.
i remember some version did not response a subscript out of bounds
error. the v 107 show as filename "null".

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 7th Apr 2014 13:48
I'm using v108 19.

I have had those errors reported in the windows version in the past.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Apr 2014 13:58 Edited at: 7th Apr 2014 13:58
if you run this at windows from ide you get message or not?



AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 7th Apr 2014 14:14
Yes, it reports an error.

My problem is that whatever is causing the issue is not being handled in the same way on the different platforms. It's making it very difficult to debug.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 7th Apr 2014 14:38
Possibly a typed array out of bounds. IIRC they generate random errors.

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 7th Apr 2014 20:28
UDT arrays won't generate the out of bounds error on Windows. AppGameKit just chugs along. On iOS and Android it crashes. I asked for an enhancement/fix for this over a year ago... I'm hoping Paul builds it in to the new compiler.
In the meantime all of your types should have a count integer that you can fill with the array size.
I do this with my regular arrays too. Saves a ton of headache.

This is the number 1 reason for random crashes.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Apr 2014 20:50
@Naphier
my example with a simple udt above show me a message at windows.
did u have a example that did not work - for me as test?

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 7th Apr 2014 20:53
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Apr 2014 21:53 Edited at: 7th Apr 2014 21:55
@naphier
i agree there is something wrong.

can you test it some starts with v .21?


AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670

Login to post a reply

Server time is: 2024-05-11 06:18:46
Your offset time is: 2024-05-11 06:18:46