Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: sockbox on July 14, 2010, 02:56:29 PM

Title: Theme upload error - validator fails with font error
Post by: sockbox on July 14, 2010, 02:56:29 PM
I'm trying to upload my theme which works on my player and on the sim, but the upload page errors with this error:

Code: [Select]
Warning: join() [function.join]: Invalid arguments passed in /home/themes/www/upload.php on line 106

Your wps didn't pass checkwps. Here's the output:

Here's a screenshot:
http://farm5.static.flickr.com/4114/4793193101_2edee2ee8c_b.jpg
Title: Re: Theme upload error
Post by: Domonoky on July 14, 2010, 05:18:09 PM
Can you please upload the theme zip file somewhere, so devs can try to reproduce this ?
Title: Re: Theme upload error
Post by: sockbox on July 14, 2010, 05:59:07 PM
Uploaded here...

http://www.megaupload.com/?d=TTS54QG2
Title: Re: Theme upload error - validator fails with Font Load error
Post by: sockbox on July 17, 2010, 03:22:50 AM
Thanks for working on the site guys, but now it's erroring w/ unable to load font error which I've run into when the theme is too big to load into RAM. The theme validator is choking on the theme size. I assure you that the theme works. You can even try it out yourself. It uses 12.9kB of the allotted 13kB. 

-- update--

hmm... I dropped the theme down to 12.5kb and the validator still gives the same font error.

After playing around with the theme, fonts, and uploader/validator. I was able to figure out that the validator calculates the size of the theme in a way thats completely larger than what I'm uploading. I've stripped down my theme to the bare essentials, fonts and icons, dropping the theme down to 11.6KB and still it errors with the font loading error. It's only when I drop the size even more by stripping out the code which accesses the icons is the theme valid.

Is it possible that the validator uses fonts of a different size larger than the ones available in the font pack?  Or could the validator load icons in a different manner than the sim/player? or is my code breaking the validator?

Here is my stripped down theme which errors at 11.6KB:
http://www.megaupload.com/?d=KZN7C7NW

validator wps error:
http://farm5.static.flickr.com/4082/4801338508_5cb5e487ef.jpg
(http://farm5.static.flickr.com/4082/4801338508_5cb5e487ef.jpg)

skin ram usage:
(http://farm5.static.flickr.com/4118/4801338492_5fa575a197_m.jpg)

(http://farm5.static.flickr.com/4120/4805684624_bc230f8bb7_m.jpg)
Title: Re: Theme upload error - validator fails with font error
Post by: sockbox on July 24, 2010, 02:52:15 AM
Any updates on why the theme uploader fails at fonts for the Sansa Clip+?
Title: Re: Theme upload error - validator fails with font error
Post by: Flobber on July 24, 2010, 03:23:50 PM
The skin buffer is used for the parsed skin description, for images and for fonts.  The usage shown in the console by the simulator is before loading fonts.  On the Clips, each fonts requires 3k in the skin buffer (independent of actual fonts size).  The menu font counts, too.

The problem on the Clips is, that the buffer is much too small.  On targets with backdrop image support (color targets), the buffer is much bigger (to hold one backdrop image for each screen [menu, wps, radio, etc] but images are shared if the same).

A patch to increase the skin buffer for monochrome targets was sent to the mailing list but seems to not make it into mainline because it  decreases the cache for audio prefetching by 12K (from i.e. 6.34MB to 6.33MB).

You can slim down your theme by using the default font (it's free), use smaller/less images or make it shorter (less tokens).
Title: Re: Theme upload error - validator fails with font error
Post by: sockbox on July 25, 2010, 05:08:07 PM
You can slim down your theme by using the default font (it's free), use smaller/less images or make it shorter (less tokens).

My theme works and fits in the limited skin buffer of the Clip. The question is why is the theme validator choking on loading fonts when the theme works in the sim and the player.  Is it a bug in the site? or is there a theme limit that the validator uses that is much smaller than what is actually possible in the build.

I understand the limited skin buffer so I've had to be very careful in writing the code for the theme. It works in the sim. It works in the player. It falls well below the skin buffer limit in the sim console, leaving enough room for the included fonts. So I've established that it actually works. Why does the validator choke on it? If it's a bug in the site then I'd like to see this fixed. If it's my theme, then I'll trash it.

Here's my theme:
http://www.megaupload.com/?d=36JT55CD
Try it on the sim and player, then try to upload it.

Bug filed...
http://www.rockbox.org/tracker/task/11500