Bug 15561 - Very long words in text labels can cause squeezeplay to crash
: Very long words in text labels can cause squeezeplay to crash
Status: CLOSED FIXED
Product: SqueezePlay
Classification: Unclassified
Component: UI
: 7.5.x
: PC Windows (legacy)
: P2 normal (vote)
: 7.5.0
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-30 11:19 UTC by Adrian Smith
Modified: 2011-03-16 04:45 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
potential patch - split really long words onto multiple lines (910 bytes, patch)
2010-01-30 11:24 UTC, Adrian Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Smith 2010-01-30 11:19:22 UTC
Rendering very long text strings fails if the resultant image is wider than the max width of an SDL surface (16k pixels).  This results in a null SDL surface being returned and can lead to jive_surface_get_size being called with no sdl surface.  This means the label text is not shown and could trigger a crash in jive_surface_get_size depending on where it is called from.

svn 8427 fixed the crash case I am seeing - this should be considered for 7.4.x

Will add some debugging code and propose a patch to the underlying problem.
Comment 1 SVN Bot 2010-01-30 11:21:38 UTC
 == Auto-comment from SVN commit #8428 to the jive repo by adrian ==
 == https://svn.slimdevices.com/jive?view=revision&revision=8428 ==

Bug: 15561
Description: logging to understand reason for labels not being displayed and returning a null surface here (most likely cause is that they result in an SDL surface width > 16k pixels)
Comment 2 Adrian Smith 2010-01-30 11:24:18 UTC
Created attachment 6475 [details]
potential patch - split really long words onto multiple lines

Attached is a potential patch which will make the problem strings display.  I think this is a good step to resolve this bug, but looking for feedback first.  (previous commits have resolved crash condition)
Comment 3 SVN Bot 2010-01-30 11:29:40 UTC
 == Auto-comment from SVN commit #8429 to the jive repo by adrian ==
 == https://svn.slimdevices.com/jive?view=revision&revision=8429 ==

Bug: 15561
Description: don't display the problem string in the logging message
Comment 4 Chris Owens 2010-02-01 12:55:58 UTC
Ben to review this patch
Comment 5 Ben Klaas 2010-02-01 12:59:24 UTC
Patch looks fine to my eyes, but please consider that my eyes don't read C code at all. I get what's trying to be accomplished though and it looks fine and low risk.
Comment 6 Adrian Smith 2010-02-01 14:15:21 UTC
Shall I take that as a prompt to commit it?  I don't see it causing any harm other than causing very long text to wrap.
Comment 7 Adrian Smith 2010-02-02 10:23:54 UTC
Is the 7.4.2 build finalised?  I think we should be considering checkin 8427 for it as it avoids a crash case.
Comment 8 SVN Bot 2010-02-13 15:27:10 UTC
 == Auto-comment from SVN commit #8500 to the  repo by adrian ==
 == https://svn.slimdevices.com/?view=revision&revision=8500 ==

Bug: 15561
Description: split very long words onto multiple lines in labels as otherwise they break the max width of an SDL surface
Comment 9 Chris Owens 2010-04-08 17:24:25 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!