Limit of pictures in array?

I have a really big array of pictures, about 1000 and the pictures as 20 kb each for an animation.
When I test the program in Corona it works but it takes a litte time to load.
On the Iphone it doesn´t work, it starts but then it shut down the program.

I have read somewhere that the memorylimit for the Iphone is 10 mb, sp I did remove som pictures from the array and tried with about 400 pictures but it is the same problem…

[import]uid: 5717 topic_id: 791 reply_id: 300791[/import]

In the xcode organizer you can get the crash logs. What does it say? [import]uid: 5712 topic_id: 791 reply_id: 1659[/import]

It says:

Incident Identifier: 191B32F9-0B1F-4AF0-B86E-F952AF58D2A7
CrashReporter Key: 9356886ab38d2a2ee9b33b15886e62eb0bd9822d
OS Version: iPhone OS 3.1.2 (7D11)
Date: 2010-04-14 17:18:27 +0200

Free pages: 244
Wired pages: 8259
Purgeable pages: 0
Largest process: animAp

Processes
Name UUID Count resident pages
animAp <37a9b22de9d10ca05ce9b8114bdaf6e9> 14776 (jettisoned) (active)
MobilePhone <82c9bd8583f4b09706a16b08e641a4b9> 611 (jettisoned)
notification_pro <8a7725017106a28b545fd13ed58bf98c> 65
springboardservi <0fd4a841ec415be7370e68ac21c90cb1> 83
mediaserverd <612fbbfa0546609cf6c6b13ae6f333cf> 227
notification_pro <8a7725017106a28b545fd13ed58bf98c> 65
afcd <0b60a3ade0ab40c2881d81c530d84b91> 70
ptpd 155
BTServer 186
SCHelper 92
apsd 145
notifyd 124
CommCenter 404
SpringBoard 3503 (active)
accessoryd <32ceed5c3c32625ac23cd870f61364af> 88
configd 280
fairplayd 89
mDNSResponder 120
lockdownd <171865bfe3725c3d5047df8c00ed5d77> 312
syslogd <1cb3e9f2375fad9e345bd16655be4a50> 68
launchd 72

End
[import]uid: 5717 topic_id: 791 reply_id: 1660[/import]

I don’t think it is the images. At least not because of the Iphoen limits. I read about apps for Cocos2D that run with 20mb of textures. Could be a bug in the engine. [import]uid: 5712 topic_id: 791 reply_id: 1662[/import]

400 picts at 20k each is about 8megabytes. (400*(20*1024)) = ~8 megs. Almost hitting the texture buffer, and with the app running, you most likely running out of memory.

You can scale the image down further in photoshop or other program of choice, and scale them after you load them, image.scale(…)

I done this in a sample app I did using 350 images. Each image is about 8k from 40k.

Carlos

ps: yes, it takes time to load all the images into memory. try using a default.png of the first image to give the impression something is happening.
[import]uid: 24 topic_id: 791 reply_id: 1671[/import]