777: Multiple Sprite Animations Error: "invalid index (0) that falls outside the range..."

Hi
Today finally I started working with new image sheet / sprite API, and run into a strange error when trying to create sprites with multiple animations:

WARNING: Sequence (running) has an invalid index (0) that falls outside the range of valid image sheet frame indices: 1 <= index <= 10.

In order to eliminate possibility on any bug on my side, I am passing sequence data directly from Jon Bebe’s article:

local sequenceData = {  
 { name="walking", start=1, count=3 },  
 { name="running", frames={ 3, 4, 5, 6, 7, 8 }, time=50, loopCount=4 }  
 }  

There is a problem when passing “frames” as argument instead of start/count, because values in frames table get changed to zero. If I try to pass “running” sequence as continuous (using start+count), itworks.

I found only this information on internet regarding this bug:
http://www.raywenderlich.com/forums/viewtopic.php?t=2696&p=18558#p18524

I work in 777, also tried 768, didn’t work there neither.

Apparently this is a known bug, anything done about this ?

Thanks
N
[import]uid: 80100 topic_id: 24514 reply_id: 324514[/import]

Hey Nenad,

Would you mind filing this with a sample project showing the issue, please? It would help us test this. [import]uid: 52491 topic_id: 24514 reply_id: 99313[/import]

Hey sure Peach,
Here’s a simple stripped-down example:
http://bit.ly/IopiPA

Funny thing is that this example WILL load sprite animation successfully, while still throwing these weird warnings. In the code I was working on, throws the same warnings and doesn’t load the sprite.

Since the warnings look kinda fishy, I assume there is some behind problem (and apparently SpriteHelper’s creator has come to same conclusion long before me).
I assume there could be some unwanted type conversion in your C routine that reads the sequence data, so uint values are being converted to int or something like that:

WARNING: Sequence (climbing) has an invalid index (0) that falls outside the range of valid image sheet frame indices: 1 \<= index \<= 10.  
WARNING: Sequence (climbing) has an invalid index (0) that falls outside the range of valid image sheet frame indices: 1 \<= index \<= 10.  
WARNING: Sequence (climbing) has an invalid index (-25436) that falls outside the range of valid image sheet frame indices: 1 \<= index \<= 10.  
WARNING: Sequence (climbing) has an invalid index (-21450) that falls outside the range of valid image sheet frame indices: 1 \<= index \<= 10.  

For sequence like this, where frames are explicitly forwarded:

local climbSequence = {  
 name="climbing",  
 frames = { 2, 3, 4, 5 },  
 time=600, -- Optional. In ms. If not supplied, then sprite is frame-based.  
 loopCount = 0 -- Optional. Default is 0 (loop indefin itely)  
}  

Thanks :slight_smile: [import]uid: 80100 topic_id: 24514 reply_id: 99318[/import]

Hey Nenad,

Can you submit this as a bug using this form, please? http://developer.anscamobile.com/content/bug-submission

I appreciate you putting a download here for us to check out but it will be much easier to keep track of if it is in our system.

Peach :slight_smile: [import]uid: 52491 topic_id: 24514 reply_id: 99337[/import]

@nosheet: We have received your bug case and are looking into it. [import]uid: 84637 topic_id: 24514 reply_id: 99783[/import]

peach, nosheet

I posted a bug report on this very problem, and supplied a sample project. I may not have put it quite so eloquently as you, nosheet, but it was logged as 13391.

At the time it was logged as a Simulator crashing bug, but I do believe it is in fact the same problem. It just happens to crash the simulator sometimes :slight_smile: [import]uid: 276 topic_id: 24514 reply_id: 101228[/import]

Same issue here… can’t have multiple animations… [import]uid: 9592 topic_id: 24514 reply_id: 101239[/import]

I am experimenting the same problem… I wonder if this issue is affecting only the simulator?

I haven’t seen any strange issues on device but I am worried because my next game will be published in a few days O_O

Raúl Beltrán
MIU Games [import]uid: 44101 topic_id: 24514 reply_id: 104722[/import]

Any news about this? I’m having the same problem, but i don’t specify frames, i use start and count.
Here’s a link to another post where i explain my problem.
http://developer.anscamobile.com/forum/2012/05/29/some-animations-attempt-use-frame-0#comment-110491
[import]uid: 105206 topic_id: 24514 reply_id: 110496[/import]

Also wondering if there are any solutions yet? [import]uid: 170524 topic_id: 24514 reply_id: 122074[/import]

This issue was fixed a while back if memory serves me correctly.

Does this issue still affect you on the latest public release? (V894) [import]uid: 84637 topic_id: 24514 reply_id: 122273[/import]

I’m new and so I was following the directions online using copy and paste and that was the error I received. [import]uid: 170524 topic_id: 24514 reply_id: 122329[/import]

Also wondering if there are any solutions yet? [import]uid: 170524 topic_id: 24514 reply_id: 122074[/import]

This issue was fixed a while back if memory serves me correctly.

Does this issue still affect you on the latest public release? (V894) [import]uid: 84637 topic_id: 24514 reply_id: 122273[/import]

I’m new and so I was following the directions online using copy and paste and that was the error I received. [import]uid: 170524 topic_id: 24514 reply_id: 122329[/import]

yes the bug is still there… it does not show it in the Corona simulator…

I ran my app in the simulator and it worked fine, but when I moved it to the device, it would not work, So i ran it in the IOS simulator and had a look at the console log.

it says

26/10/12 4:40:12 PM [0x0-0x1c01c].com.anscamobile.Corona_Simulator[313] WARNING: Sequence (flag) has an invalid count (9) that makes the last frame index of the sequence (9) fall outside the range of valid image sheet frame indices: 1 <= index <= 8. [import]uid: 67619 topic_id: 24514 reply_id: 128726[/import]

yes the bug is still there… it does not show it in the Corona simulator…

I ran my app in the simulator and it worked fine, but when I moved it to the device, it would not work, So i ran it in the IOS simulator and had a look at the console log.

it says

26/10/12 4:40:12 PM [0x0-0x1c01c].com.anscamobile.Corona_Simulator[313] WARNING: Sequence (flag) has an invalid count (9) that makes the last frame index of the sequence (9) fall outside the range of valid image sheet frame indices: 1 <= index <= 8. [import]uid: 67619 topic_id: 24514 reply_id: 128726[/import]

I get the same error when I use
[lua]local anim1 = display.newSprite( sheet1, { name = “sprite1”, time = 720.000000, loopCount = 0, frames = {10,11,18,16,15,17,14,13,9,8,2,1,3,4,5,7,6,12,}, } )[/lua]
but if I remove frame ‘1’ from the index of frames, the error disappears… but my animation is 18 frames, starting at frame 1 and tightly packed/rotated/trimmed to fit, hence the jumbled ordering. Therefore, this works fine:
[lua]local anim1 = display.newSprite( sheet1, { name = “sprite1”, time = 720.000000, loopCount = 0, frames = {10,11,18,16,15,17,14,13,9,8,2,3,4,5,7,6,12,}, } )[/lua] [import]uid: 43253 topic_id: 24514 reply_id: 138065[/import]

I get the same error when I use
[lua]local anim1 = display.newSprite( sheet1, { name = “sprite1”, time = 720.000000, loopCount = 0, frames = {10,11,18,16,15,17,14,13,9,8,2,1,3,4,5,7,6,12,}, } )[/lua]
but if I remove frame ‘1’ from the index of frames, the error disappears… but my animation is 18 frames, starting at frame 1 and tightly packed/rotated/trimmed to fit, hence the jumbled ordering. Therefore, this works fine:
[lua]local anim1 = display.newSprite( sheet1, { name = “sprite1”, time = 720.000000, loopCount = 0, frames = {10,11,18,16,15,17,14,13,9,8,2,3,4,5,7,6,12,}, } )[/lua] [import]uid: 43253 topic_id: 24514 reply_id: 138065[/import]