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:
@@ -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:
@@ -67,7 +67,7 @@
-#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))
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
Received on 2010-07-16