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 / Array Type Assignment Error

Author
Message
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 23rd Apr 2014 03:55 Edited at: 23rd Apr 2014 03:56
For about a year I've been removing from dynamic arrays with the same code, but for the past 2 weeks I discovered it did not work properly in one of my arrays, but not through any doing of mine. It seems there is an rare and strange bug within AGK.

Essentially I,


yet it shifts improperly for one of my arrays. Yet if I,


then it works properly. I'm using the most recent stable AppGameKit 1 build. I thought these bugs had been fixed, but perhaps not (or I've made a mistake so foolish I haven't noticed XD) It seems assigning types to types doesn't work 100% of the time. It's irritating to have to copy every value over, but I'd suggest doing that for the time being. So, am I crazy? I don't know how to replicate the error without reproducing all of my code as is (it's about 1200 lines atm). I did not touch this piece of code and originally it was working fine for the problem array, but as the project grew, it appeared from thin air

Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 23rd Apr 2014 06:39
Quote: "I thought these bugs had been fixed"

There was a bug with copying subtypes of globals which was;
https://code.google.com/p/agk/issues/detail?id=170&can=1&sort=status&start=300
But I don't know if this applied to arrays.
IMO, It's worth the overhead of copying the individual fields to be sure the copy was done.
There have been issues reported with re-dimming UDT arrays. Does the problem still exists if you don't do the re-dim?
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 23rd Apr 2014 07:15
re-dimming UDT arrays has been stable for awhile. It wasn't in one of the 1081x betas, but since at least 10819 it has been good. I ran lots of tests on it to make sure, but I did note some strange behavior with UDT arrays on android. The solution for me was to zero out the arrays before used.

I've never tried to move entire types in an array like you're doing. I always move all of the elements. Basically because I didn't trust that AppGameKit was doing it right. Looks like I was correct in doing so.

If you can make this reproducible then I'd submit some code right to Paul because he's right in the thick of the compiler right now.

Login to post a reply

Server time is: 2024-04-25 00:17:44
Your offset time is: 2024-04-25 00:17:44