Wind River Support Network

HomeDefectsLIN8-7934
Fixed

LIN8-7934 : Psplash - bug in calculating width of on-screen messages

Created: Oct 11, 2017    Updated: Feb 11, 2020
Resolved Date: Oct 26, 2017
Found In Version: 8.0
Fix Version: 8.0.0.23
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace

Description

I am putting the customers description as it is very  complete:

Using the "psplash-write MSG <message_text>" command, you can display messages when the splash screen is running. As part of this, psplash needs to calculate the height and width of the box to render on the screen to hold the text (which will appear on top of the background image), which it does in the psplash_fb_text_size() function in psplash-fb.c. 

If the message contains multiple lines (i.e. it contains one or more newline characters), then it looks like the intention is for psplash to use the length of the longest single line as the width of this text box. However, there's a bug in this calculation that leads to some multi-line messages being rendered off the left edge of the screen, instead of properly centered. 

To fix this, each time a newline is encountered, if the width of the current line (w) is greater than the maximum line width (mw), update the maximum width. Also, reset the current line width to zero so we can correctly calculate the width of the next line. 

Other Downloads


Live chat
Online