LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-12-2014, 08:25 AM   #1
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Rep: Reputation: 93
HandBrake giving segmentation faults from SBo and Alien's script


I've installed HandBrake some time ago from SBo but never used it, today while trying to encode a video (with x264 encoder) the softwares crashes and, by running it via terminal, it reported a segmentation fault.

I went on Google and found a few things like this bugreport on Ubuntu.

Because of this part:
Quote:
Configure x264 with "--extra-cflags=-fno-aggressive-loop-optimizations" solves this problem.
Also seems that problem solved in trunk - http://git.videolan.org/?p=x264.git;...eb12504711b94f
I thought that simply using a newer version of the x264 tarball would work, I grabbed Alien's script (that also had the same problem) and edited as this:

Code:
pedro@darkstar:~/Downloads/slackware/alien_repository/handbrake/build$ diff handbrake.SlackBuild /home/pedro/SlackBuilds/14.1/handbrake/handbrake.SlackBuild                                                                                                                                                                
94c94
< X264="r2273-b3065e6"
---
> X264=20140411-2245
156,157c156,157
< SOURCE[14]="$SRCDIR/x264-$X264.tar.gz"
< SRCURL[14]="$CONTRIBURL/x264-$X264.tar.gz"
---
> SOURCE[14]="$SRCDIR/x264-snapshot-${X264}.tar.bz2"
> SRCURL[14]="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264}.tar.bz2"
pedro@darkstar:~/Downloads/slackware/alien_repository/handbrake/build$
But it still doesn't work, HandBrake keeps giving a segmentation error.

Last edited by moisespedro; 04-12-2014 at 08:31 AM.
 
Old 04-12-2014, 10:16 AM   #2
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Pittsburgh, PA
Distribution: Slackware
Posts: 223

Rep: Reputation: 52
Some backups don't run properly with Handbrake, so you may need to use makeMkv as a first step. I've not seen this encode issue from a makeMkv output.

Handbrake being only a transcoder, sometimes it needs better inputs to work from. I use aliens pre-built blob.
 
Old 04-12-2014, 11:52 AM   #3
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
I don't get what you meant. HandBrake always crashes when I try to encode a video using x264, if I switch the encoder to MPEG-4 it runs fine.
 
Old 04-12-2014, 12:35 PM   #4
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.1 64 Multi-Lib
Posts: 429

Rep: Reputation: 124Reputation: 124
I also recommend AlienBobs prebuilt binary. In fact, If there's anything I want and he has it, that's my first port of call. Period. No arguments.
 
Old 04-12-2014, 01:23 PM   #5
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
Quote:
Originally Posted by Mark Pettit View Post
I also recommend AlienBobs prebuilt binary. In fact, If there's anything I want and he has it, that's my first port of call. Period. No arguments.
I used it and still got the segmentation fault, I used his default script.
 
Old 04-12-2014, 01:50 PM   #6
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
Well, I decided to try the prebuilt package and it works. Damn, something might be wrong in my system.
 
Old 04-12-2014, 02:40 PM   #7
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Rep: Reputation: 26
Out of curiosity, I tried to test this with the SBo package. Transcoding segfaulted here as well, except if I used the "Placebo" preset. I think you make a good choice to use AlienBOB's prebuilt. I've found that his binaries are quite reliable. I do most of my transcoding using ffmpeg, but have for long been curious about HandBrake. I noted a common error just before segfaults:
Code:
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
I intend to find the meaning of these errors and figure out what is the cause.
 
Old 04-12-2014, 03:32 PM   #8
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
Quote:
Originally Posted by j_v View Post
Out of curiosity, I tried to test this with the SBo package. Transcoding segfaulted here as well, except if I used the "Placebo" preset. I think you make a good choice to use AlienBOB's prebuilt. I've found that his binaries are quite reliable. I do most of my transcoding using ffmpeg, but have for long been curious about HandBrake. I noted a common error just before segfaults:
Code:
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
I intend to find the meaning of these errors and figure out what is the cause.
I didn't understand why changing x264 version didn't fix the problem. I also used alien's script with no modifications and the generated binary gave me segmentation faults.
 
Old 04-12-2014, 04:00 PM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,259

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
I used it and still got the segmentation fault, I used his default script.
Did you install my package or did you use my handbrake.SlackBuild script to produce your own package?

Eric
 
Old 04-12-2014, 04:38 PM   #10
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Rep: Reputation: 26
This page references the bug: https://bugs.launchpad.net/ubuntu/+s...4/+bug/1241772. I have tested the added CFLAG on the SBo SlackBuild and it fixes the issue for me. I will get in touch with the maintainer after dinner.
 
Old 04-12-2014, 05:04 PM   #11
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Rep: Reputation: 26
Here is a link to the patch:

https://github.com/jvvv/slackbuilds/...segfault.patch

I'll be notifying package maintainer after I post this.

Just adding the usual SLKCFLAGS didn't work. So I saved the current environment for CFLAGS and CXXFLAGS, exported the SLKCFLAGS as CFLAGS and CXXFLAGS, and then restored the saved CFLAGS and CXXFLAGS after compilation completes; this worked for me.

Cheers
 
Old 04-12-2014, 05:24 PM   #12
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
Quote:
Originally Posted by Alien Bob View Post
Did you install my package or did you use my handbrake.SlackBuild script to produce your own package?

Eric
As I said before on the thread:
I tried SBo's stock script
I tried yours stock script
I tried a modified version of your script with a newer x264 tarball

All of them gave me the segmentation error. Now I've installed your prebuilt package and it works fine.
 
Old 04-12-2014, 05:37 PM   #13
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,259

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
As I said before on the thread:
I tried SBo's stock script
I tried yours stock script
I tried a modified version of your script with a newer x264 tarball

All of them gave me the segmentation error. Now I've installed your prebuilt package and it works fine.
My package works fine because it was compiled with gcc-4.7. The bug in x264 is only present when you compile it with gcc-4.8 ...

Eric
 
Old 04-12-2014, 05:40 PM   #14
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 892

Original Poster
Rep: Reputation: 93
Quote:
Originally Posted by Alien Bob View Post
My package works fine because it was compiled with gcc-4.7. The bug in x264 is only present when you compile it with gcc-4.8 ...

Eric
Well but since someone said this on the bugreport

Quote:
Configure x264 with "--extra-cflags=-fno-aggressive-loop-optimizations" solves this problem.
Also seems that problem solved in trunk - http://git.videolan.org/?p=x264.git;...eb12504711b94f
And the bug report is 6 months old I thought a newer tarball would fix it (I used the latest tarball avaliable)
 
Old 04-12-2014, 05:49 PM   #15
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,259

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
And the bug report is 6 months old I thought a newer tarball would fix it (I used the latest tarball avaliable)
Are you sure the build used that newer tarball? Handbrake downloads a very specific version of x264 which is hardcoded in the build script. All my SlackBuild script does is download it beforehand, so that you can do an offline build of the package.
Check your build log (you kept a log did you?) and find out if a x264 tarball was downloaded before the compilation started.

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
alien's vlc, -current and SBo's libva grissiom Slackware 2 10-28-2010 08:50 AM
segmentation faults crash88 Linux - Software 3 07-03-2006 10:22 PM
Segmentation faults winterhunter Linux - Software 5 10-14-2005 03:06 AM
Some help with segmentation faults? captainslushie Linux - Software 5 06-23-2005 02:59 PM
Segmentation Faults ryankask Mandriva 2 06-13-2005 07:10 PM


All times are GMT -5. The time now is 01:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration