Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Posts: 3
Registered: ‎12-20-2010
My Device: Not Specified

Can't install in simulator-- max file limit?

[ Edited ]

I'm making a package that includes a folder containing 7,075 files-- they are the solutions to all the puzzles in my game.

 

Until now, I've only had 6 files in there to test with, and everything has worked fine. Everything still works fine if I remove all but 6.

 

I am using the command line because of the nature of my application... with my 7,075 files, I get:

 

Sending Install request...

Action: Install
File size: 3903215
Installing ...
actual_dname::
actual_id::
actual_version::
result::failure
Sending Launch request...
Action: Launch

 

I have tried using airpackager to package, which seems to work fine, and deploy to install, which gives the same failure messages. I have tried splitting my files into folders of 1000 files each and folders of folders of 100 files each, which didn't seem to help. I've tried making a new simulator vm, which didn't help either. I'd like to get it working, but I can test okay without all those files in the simulator. If I could just get confirmation that my app will install on an actual playbook I'd feel better.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Can't install in simulator-- max file limit?

[ Edited ]

You might try a few more times, just in case it's an intermittent thing. I have certainly had that "result::failure" output show up a number of times (with much smaller apps) but usually a retry has succeeded.

 

In the likelihood that doesn't work for you, a few suggestions:

 

  1. Binary search: chop the size of that folder in half, and if that works, expand by 150% and try again. If it fails, chop by half again... soon you'll probably find a practical limit. Maybe it will tell us something... maybe be enough for you for now.
  2. Are those files discovered on the fly by your app, or effectively hardcoded into it somehow? If you can upload a package without all those files in it, it's possible to install those files after the fact in the application's folder. It's not documented, but I can describe the approach through email, if you think this will work for you (and, preferably, if you've already tried the first two ideas). Send me a private message through the forum if you want to try this route.

(Edited to fix formatting.)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 137
Registered: ‎10-26-2010
My Device: Bold 9900 + PlayBook
My Carrier: Rogers

Re: Can't install in simulator-- max file limit?

Is the total package size over 64MB? I believe that is currently not supported from the command line deployment tool.
--------
Taylor Byrnes
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Can't install in simulator-- max file limit?

Taylor, his output above shows it's only 3.7MB, but regardless I'd appreciate knowing where you might have seen that limit, as I use the command line stuff exclusively (right now). (Though for that matter, I suspect Flash Builder just calls the same command line tools so it would have the same limit.)

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Can't install in simulator-- max file limit?

hey peter,

 

it was mentioned by RIM in one of the webcasts that the limit was 64 mb as of right now.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 137
Registered: ‎10-26-2010
My Device: Bold 9900 + PlayBook
My Carrier: Rogers

Re: Can't install in simulator-- max file limit?

Looks like you're right. I'd never paid enough attention to the output on my computer so I wasn't sure of the units (could have be KB).

I suspect the limit arises from how the file is transferred to the simulator. It's done as a HTTPS upload, and most web servers have a size limit on POST data.
--------
Taylor Byrnes
New Contributor
Posts: 3
Registered: ‎12-20-2010
My Device: Not Specified

Re: Can't install in simulator-- max file limit?

Yes, the full size of my app is only about 4MB-- I worked hard to invent a binary format to make my puzzle files very small to avoid this kind of thing...

 

It looks like it dies somewhere between 6,000 and 7,000 files. I can get by with 6,000 but it's obnoxious.

 

Also, I have a theory that if I were to unzip my .bar, put the files in manually, and rezip it, it might work. Unfortunately, it doesn't like my zips-- unzipping and rezipping a working bar causes it to break. Has anyone done this and are there special settings required to zip these things?

Developer
Posts: 137
Registered: ‎10-26-2010
My Device: Bold 9900 + PlayBook
My Carrier: Rogers

Re: Can't install in simulator-- max file limit?

I don't think the issue is with special settings but the manifest. It has to list every file in the archive, and have hashes for them. There may be an overall hash too.
--------
Taylor Byrnes
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Can't install in simulator-- max file limit?

 


digicide wrote:

Yes, the full size of my app is only about 4MB-- I worked hard to invent a binary format to make my puzzle files very small to avoid this kind of thing...

 

It looks like it dies somewhere between 6,000 and 7,000 files. I can get by with 6,000 but it's obnoxious.

 

Also, I have a theory that if I were to unzip my .bar, put the files in manually, and rezip it, it might work. Unfortunately, it doesn't like my zips-- unzipping and rezipping a working bar causes it to break. Has anyone done this and are there special settings required to zip these things?


 

Have you compared the overall size of the package with your binary format versus something like a simple textual format that is then compressed with zip?  Compression routines can take advantage of patterns in your data that no sane designer would attempt to take into account.

 

On another note, it occurs to me that the problem may not be the package size, but the size of the manifest file, either in bytes or in lines.  Do either of those look suspiciously close to some round number (e.g. 64K) around the 6-7K file mark?

 

Also, it doesn't seem like there should be any reason why rezipping would work for you, but in any case I was just able to unzip a .bar, then rezip it (using Windows 7 "send to compressed folder"), and it installed just fine.  I did not, however, modify the contents of any of the files inside, and Taylor is quite right that the manifest has hashes for each entry, that look like this:

 

Archive-Asset-SHA-512-Digest: EI9gfVfs9rV0TlErFqYsOopmXPkoPznIOJLmPzT9RcBLtrUQdbKNQ-5kJoFUTYS93t46gRfcYu77C48Vvo8Xkw

 I can't actually tell offhand what sort of encoding that is (not base64, apparently) so I couldn't say how we could recalculate it, but it would definitely make a package with modified contents look invalid.

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Can't install in simulator-- max file limit?

Can you open a bug and submit your application as attachment? We can investigate what is causing it. Looks like some sort of limit.