Bug 89614 - [fix] multimedia/fxtv: segfaults while changing stations
Summary: [fix] multimedia/fxtv: segfaults while changing stations
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Simon Barner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-27 01:10 UTC by Šimun Mikecin
Modified: 2005-11-30 10:24 UTC (History)
0 users

See Also:


Attachments
file.diff (664 bytes, patch)
2005-11-27 01:10 UTC, Šimun Mikecin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Šimun Mikecin 2005-11-27 01:10:06 UTC
Changing channels in fxtv tends to crash it with Segmentation fault. It doesn't happen all the time, but if you try to change stations fast your will surely encounter it.
I never experienced those kind of crashes on my previous PC (FreeBSD/i386 + GeForce 4 Ti4800SE + nvidia binary driver)
Since applying this fix I haven't encountered a single segfault.

Fix: this is a replacement file for the /usr/ports/multimedia/fxtv/files/patch-tvmenu.c:
How-To-Repeat: See description.
Comment 1 Simon Barner freebsd_committer freebsd_triage 2005-11-29 11:06:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->barner

I'll take it.
Comment 2 Simon Barner freebsd_committer freebsd_triage 2005-11-29 11:31:56 UTC
State Changed
From-To: open->feedback

The fix in the PR seems not to fix the root of the problem but to work 
around it. The question is why XtVaSetValues () fails. The code also 
contains assert()s for actual_station and temp_station to be non-NULL 
which is worked around by your patch. Could you please try and turn 
debugging on (comment out DEBUG=NO in ${WRKSRC}/Makefile)?
Comment 3 Šimun Mikecin 2005-11-29 17:29:16 UTC
If I comment DEBUG=NO in ${WRKSRC}/Makefile, fxtv segfaults during starting.
 It seems for me that sizeof(long)==8 and sizeof(void *)==8 is the cause (see
 definition of TV_INT32 in tvtypes.h) and it would require major fxtv code
 patching to do it right.
 
 

		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Comment 4 Šimun Mikecin 2005-11-29 18:58:53 UTC
It causes fxtv to segfault right away. Problem is that fxtv code makes
 assignments between pointers and integers, which on amd64 are of different
 size. Previous definition for TV_INT32 was actually better because
 sizeof(long)==sizeof(pointer). I started fixing those issues, but realised
 it is more complicated than it seems, cause it requires more understanding
 of fxtv code, and right now I don't have time to do it. On the other hand,
 it seems fxtv is working just right with the patch submited.
 
 

		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Comment 5 Simon Barner freebsd_committer freebsd_triage 2005-11-30 10:24:51 UTC
State Changed
From-To: feedback->closed

I committed the patch from the PR. The real solutiod probably be to make 
fxtv fully 64-bit clean, which seems to be non-trivial. Thanks.