On 16 July 2010 08:53, Edgar Toernig <fro...@gmx.de> wrote: > Hi, > > while creating a new WPS for my Clip+ I hit the limit of > the skin buffer size. The WPS got bigger because I had > to copy most of the classic status bar into the .wps > and I'm using three fonts. > > When hitting the limit, a segfault is thrown in the > simulator and in checkwps. The culprit is here: > > --- a/apps/gui/skin_engine/skin_parser.c > +++ b/apps/gui/skin_engine/skin_parser.c > @@ -2229,7 +2229,8 @@ static bool skin_load_fonts(struct wps_data *data) > if (font->id < 0) > { > char *dot = strchr(font->name, '.'); > - *dot = '\0'; > + if (dot) > + *dot = '\0'; > font->id = skin_font_load(font->name); > } > > The first time a font fails to load everything is fine. > But if it's used in multiple viewports, the parser tries > to load it again but this time the extension is already > stripped and 'dot' becomes NULL. > > Anyway, trying to make the WPS load I looked at skin_buffer.c > and it seems, the buffer is only sized for a single font. > Could this please be increased to i.e. 5 fonts? As more and > more themes are using multiple fonts and as the space seems > to be shared with images it gets tight easily. > > The patch I'm using atm: > > --- a/apps/gui/skin_engine/skin_buffer.c > +++ b/apps/gui/skin_engine/skin_buffer.c > @@ -67,7 +67,7 @@ > #endif > > > -#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER + SKIN_FONT_SIZE) + \ > +#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER + 5*SKIN_FONT_SIZE) + \ > (WPS_MAX_TOKENS * sizeof(struct wps_token)) > #endif > > Thanks, ET. > > > PS: Btw, the segfaulting checkwps on the theme server seems to > trigger a PHP error: > | Warning: join() [function.join]: Invalid arguments passed in > | /home/themes/www/upload.php on line 109 >
Hi, I saw that crash yesterday also, I'm rather surprised it hasnt shown up before.. The eventual goal is to make that buffer resizeable, but untill then doing that change is a waste for most people. (On the clip the font size is 3K IIRC but on targets with I tihnk more than 8MB ram it is 10K and the extra space isnt usually needed anyway.