index=1024 length=1024

Monkey Forums/Monkey Programming/index=1024 length=1024

pantson(Posted 2012) [#1]
Hi
I'm getting a strange error on tablet devices.
I've tested in the emulator and on a Sony Tablet S (res 1280*800)
Monkey runtime error: index=1024 length=1024

Has anyone else seen this before?

I'm using v49d

In the meantime I'll do more investigation

many thanks


pantson(Posted 2012) [#2]
Hi

I've tried a very basic monkey app and that works fine.
So what could that error mean? If some-one can shed any light on the error message or where it may happen, I can start to troubleshoot.. plugins, modules etc

many thanks


AdamRedwoods(Posted 2012) [#3]
If you do a trace from the emulator you may be able to see where the error is originating from.


DruggedBunny(Posted 2012) [#4]
I've moved this out of Bug Reports for now, because there's really not much Mark can do without any code or any other way to reproduce the problem, especially if basic samples work fine.

It reads like an array index being out of bounds, but a test shows that this is specifically reported as such (tested on my Android phone).

Dumb questions to kick things off:

· Do you have anything in your code that's exactly 1024 in size?

· When you say it happens on tablet devices, does that mean it doesn't happen on non-tablet devices like phones?

· Probably important: does it happen with the latest stable release, V51? (You can install alongside your existing version: just copy the /bin/config.[OS].txt over.)


pantson(Posted 2012) [#5]
cheers for the pointers everyone.. I'll try some debugging in the emulator (didn't know this existed)

Yeah for some reason it works in smaller resolutions on 320*480 it works fine on boot
on the next resolution up 384*something (I'll confirm this,I forget what it is), the app keeps restarting with no error message in the emulator (works fine on the Sony PSP phone with the same resolution

On 1280*800 the error message appears on both emulator and tablet
I dont think I have anything thats 1024 in size. again I'll double check

I'll also test in the latest v51.

Looks like a fun day for me ;-)


pantson(Posted 2012) [#6]
oh dear.. this is really embarrasing :-(
I fixed an array size a while back to1024 in some kind of lazy programming assuming no device resolution would be greater than 1024

TADA...
here comes the the high res tablets!

thanks for all your help in this one.. must try harder next time

#hangsheadinshame


DruggedBunny(Posted 2012) [#7]
Ooh, that's gotta hurt.

Curious that you didn't get an 'array index out of bounds' error instead, like I did. What did you do to that poor array?


pantson(Posted 2012) [#8]
yeah... confused at the error message but at least its been found
(I'm sure I've seen "Array index out of bounds" before too