Bug 16435 - Error message flood: no SDL surface available
: Error message flood: no SDL surface available
Status: NEW
Product: SqueezePlay
Classification: Unclassified
Component: --
: 7.5.x
: PC Other
: -- minor with 1 vote (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-05 04:37 UTC by Felix Mueller
Modified: 2012-05-09 12:18 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Do not call jive_font_draw_text() for text with length 0 (2.57 KB, text/plain)
2010-08-05 04:40 UTC, Felix Mueller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Mueller 2010-08-05 04:37:21 UTC
It looks like this error message is logged whenever a text with zero length is about to be rendered and drawn. I.e. text containing "\n\n".

The error is logged in get_image_surface() which is called through these functions (call stack):

jive_surface.c - get_image_surface()
jive_surface.c - _resolve_SDL_surface()
jive_surface.c - jive_surface_blit()
jive_textarea.c - jiveL_textarea_draw()

Since everything seems to work despite this error being logged I could see three possible solutions:

1. Remove the error log or at least reduce it to a warning

2. Have jive_font_draw_text() return NULL for surface if text length is 0 and then do not call jive_surface_blit() since there is nothing to draw.

3. Check for text length and if the length is 0 do not call jive_font_draw_text() etc. at all as there is nothing to draw.

The attached patch does the third variant, but I am not sure that is the correct solution.
Comment 1 Felix Mueller 2010-08-05 04:40:31 UTC
Created attachment 6928 [details]
Do not call jive_font_draw_text() for text with length 0
Comment 2 Felix Mueller 2010-08-05 04:43:26 UTC
These error messages can easily be produced by going into the About screen or when entering text.
Comment 3 Alan Young 2011-11-06 23:24:12 UTC
Unassigned bugs cannot have a priority.