Bug 448126

Summary: The fbi command aborts with a stack trace.
Product: [Fedora] Fedora Reporter: Jesse Thilo <jessethilo>
Component: fbidaAssignee: Adrian Reber <adrian>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: kraxel
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 2.07-1.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-13 02:21:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Stack trace of "fbi -v logo.gif"
none
fb_fix_screeninfo and fb_var_screeninfo for /dev/fb0
none
valgrind output
none
valgrind report
none
valgrind report
none
Fix 2nd argument passed to swprintf
none
Fix 2nd argument passed to swprintf none

Description Jesse Thilo 2008-05-23 16:11:27 UTC
Description of problem: The command "fbi" aborts with a stack trace.

Version-Release number of selected component (if applicable): 2.06-5.fc9

How reproducible: Always

Steps to Reproduce:
1. switch to a framebuffer console
2. wget http://www.google.com/intl/en_ALL/images/logo.gif 
3. fbi -v logo.gif
  
Actual results: Command aborts with stack trace.

Expected results: Command displays image.

Additional info: fbida-2.06-4.fc8 works as expected. See fb0.txt (attached) for
struct fb_var_screeninfo and struct fb_fix_screeninfo information about my
framebuffer console. It is a 32-bit direct-color visual, but the 8-bit
pseudo-color visual ("fbset -depth 8") fails in the same way.

Comment 1 Jesse Thilo 2008-05-23 16:11:27 UTC
Created attachment 306516 [details]
Stack trace of "fbi -v logo.gif"

Comment 2 Jesse Thilo 2008-05-23 16:12:50 UTC
Created attachment 306517 [details]
fb_fix_screeninfo and fb_var_screeninfo for /dev/fb0

Comment 3 Adrian Reber 2008-05-28 07:12:27 UTC
I will contact upstream to see if this is a known bug. Maybe there is already a
fix for it.

Comment 4 Gerd Hoffmann 2008-05-30 12:37:05 UTC
Hmm, not reproducable.

Can you try running "valgrind fbi -v logo.gif" and attach the valgrind report
please?

Comment 5 Jesse Thilo 2008-05-30 13:18:18 UTC
Created attachment 307197 [details]
valgrind output

valgrind -v --leak-check=full --show-reachable=yes fbi -v logo.gif

Comment 6 Jesse Thilo 2008-05-30 13:20:13 UTC
I have attached the valgrind report as requested.


Comment 7 Jesse Thilo 2008-05-30 13:22:34 UTC
Created attachment 307199 [details]
valgrind report

Comment 8 Jesse Thilo 2008-06-01 19:35:57 UTC
Created attachment 307318 [details]
valgrind report

Regenerated with debuginfo packages installed.

Comment 9 Jesse Thilo 2008-06-07 03:33:09 UTC
Created attachment 308585 [details]
Fix 2nd argument passed to swprintf

I found the problem: swprintf() is called several times with an incorrect 2nd
argument. It should be the size of the 1st parameter in "wchar_t"s, not bytes.

Comment 10 Jesse Thilo 2008-06-07 15:53:28 UTC
Created attachment 308614 [details]
Fix 2nd argument passed to swprintf

Amended to use the existing ARRAY_SIZE macro.

Comment 11 Gerd Hoffmann 2008-06-09 15:05:33 UTC
Great spotting.  I've even looked at the swprintf calls and didn't see the bug.
 Oops.

fbida-2.07 release rolled out (http://dl.bytesex.org/releases/fbida/).

Comment 12 Fedora Update System 2008-06-09 19:19:47 UTC
fbida-2.07-1.fc9 has been submitted as an update for Fedora 9

Comment 13 Fedora Update System 2008-06-11 04:39:54 UTC
fbida-2.07-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fbida'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-5225

Comment 14 Adrian Reber 2008-06-11 11:11:47 UTC
Thanks for reporting, fixing and testing the new release!

Comment 15 Fedora Update System 2008-06-13 02:21:08 UTC
fbida-2.07-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.