Bug 486165 - immediate SEGV crash in BLT, including its own demos
Summary: immediate SEGV crash in BLT, including its own demos
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: blt
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Wart
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-18 17:53 UTC by Przemek Klosowski
Modified: 2010-01-26 01:03 UTC (History)
2 users (show)

Fixed In Version: 2.4-32.z.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-26 00:55:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Ross Erwin's patches to BLT (68.72 KB, application/octet-stream)
2009-12-08 21:35 UTC, Przemek Klosowski
no flags Details

Description Przemek Klosowski 2009-02-18 17:53:16 UTC
Description of problem:
BLT crashes on simplest input, including its own demos

Version-Release number of selected component (if applicable):
blt-2.4-28.z.fc10.i386

How reproducible: happens every time

Steps to Reproduce:
1. cd /usr/share/tcl8.5/blt2.4/demos
2  ./barchart1.tcl 

Actual results: Segmentation fault

Expected results: demo should show up

Additional info:
When ran in gdb, I get this:

Program received signal SIGSEGV, Segmentation fault.
0x001a02ba in DisplayText (clientData=0x8166798) at ../bltHtext.c:3368

The issue seems to be that a HText structure passed into DisplayText using the clientData pointer has a nulled out field lineArr, but the code tries to access the zero-th element of lineArr (looks like  a fencepost error).

Comment 1 Wart 2009-07-12 01:56:00 UTC
I've been able to reproduce this error and am looking at a fix now.  I apologize for the long delay in addressing this bug.

Comment 2 Bug Zapper 2009-11-18 11:08:51 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Przemek Klosowski 2009-11-25 19:27:52 UTC
confirmed that the problem is still not fixed in Fedora 12 
blt-2.4-31.z.fc12.i686

Comment 4 Przemek Klosowski 2009-11-25 19:28:48 UTC
Ross Erwin has a fix for it. I will submit patches in few days.

Comment 5 Przemek Klosowski 2009-12-08 21:35:01 UTC
Created attachment 377016 [details]
Ross Erwin's patches to BLT

The patches affect six files and sddress those issues:

1. Tk_DrawChars can no longer draw to a bitmap was fixed by drawing to a 
pixmap and averaging the pixmap to a bitmap. Note that the nice 
antialiased fonts may not look top notch for rotated text because of 
using the bitmap. This can be fixed in Tk by allowing
xft to draw rotated text which it can do easily.

2. Tk_ConfigureWidget no longer supports setting the 
TK_CONFIG_OPTION_SET flag, was fixed by wrapping Tk_ConfigureWidget in 
Blt_ConfigureWidget which does set this flag

3. SEG faults on debuggnig are because BLT uses the private Tcl memory 
alloc functions, changed this to the public (API) ones.

4. Blt was trying to get namespace for a variable using private 
structures that changed, was fixed by using the namespace command.

5. Htext wasnt set to draw page on dirty-text fixed.

Comment 6 Andrew Lofthouse 2010-01-01 21:57:15 UTC
I've re-built the blt rpm on Fedora 12 (x86_64) with Ross Erwin's patches above, and it seems to fix the problems -- demos now seem to work without segfaults or other errors.

As an aside, in order to use blt with the python Pmw library, the BLT shared lib needs to be linked to libtcl8.5 and libtk8.5, as described at http://old.nabble.com/-Bug-26259--libblt2,-RESOLVED:-libBLT24.so-needs-to-be-linked-with-tcl8.-4-and-tk8.4-libs-td12354190.html and http://bebop.bigasterisk.com/scribblings/blt.  I got around this by hacking src/shared/Makefile.in and adding -L/usr/lib64 -ltcl8.5 -ltk8.5 to the SHLIB_LD_FLAGS variable.  I'm sure there's a better way to do this.  Perhaps this should be a new bug report?

Comment 7 Fedora Update System 2010-01-12 23:44:29 UTC
blt-2.4-32.z.fc12 has been pushed to the Fedora 12 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 blt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0417

Comment 8 Fedora Update System 2010-01-12 23:49:52 UTC
blt-2.4-31.z.fc11 has been pushed to the Fedora 11 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 blt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-0409

Comment 9 Fedora Update System 2010-01-26 00:55:04 UTC
blt-2.4-31.z.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-01-26 01:03:03 UTC
blt-2.4-32.z.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.