Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294488 - media-video/transcode: transcode crashes in
Summary: media-video/transcode: transcode crashes in
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Media-video project
Depends on:
Reported: 2009-11-24 21:42 UTC by Christopher Byrne
Modified: 2010-01-23 11:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

explicitly set do_fancy_downsampling to FALSE (transcode-1.1.5-jpeg-7.patch,464 bytes, patch)
2010-01-23 07:28 UTC, Christopher Byrne
Details | Diff
transcode-1.1.5-r1.ebuild patch (transcode-1.1.5-r1.ebuild.patch,66 bytes, patch)
2010-01-23 07:30 UTC, Christopher Byrne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2009-11-24 21:42:47 UTC
transocde has stopped working correctly since the jpeg 6.2->7.0 upgrade. If built against jepg 6.2, it runs and compiles files, but if done against jpeg 7.0, it compiles OK but segfaults when run. Both the current stable and unstable transcode have the same problem. transcode is being run as part of todisc (todisc had to be patched to work against the current unstable transcode).

emerge --info

Portage (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686)
System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Celeron-R-_CPU_2.66GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 24 Nov 2009 04:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
CFLAGS="-march=pentium4 -O2 -pipe -g"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -g"
FEATURES="buildpkg ccache distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow 3dnowext X a52 aac accessibility acl acpi alsa avahi berkdb bluetooth branding bzip2 cairo caps cddb cdr cli consolekit cracklib crypt cups dbus dri dts dv dvd dvdr dvdread eds emboss encode evo fam ffmpeg flac fortran gdbm gif gnome gnome-keyring gnutls gpm gstreamer gtk hal iconv ipod ipv6 java jpeg ldap libnotify logrotate mad mikmod mmx mmxext modules mono mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime readline reflection samba sasl sdl session spell spl sse ssl startup-notification svg sysfs tcl tcpd thunar tiff tk truetype unicode usb v4l2 vorbis x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev vesa nv nvidia"

backtrace of transcode-1.0.7 (current stable)

Core was generated by `transcode --print_status 10 --write_pid /tmp/todisc-work.0/ -q 1 -i /'.
Program terminated with signal 11, Segmentation fault.

#0  jpeg_fdct_16x16 (data=0xbfc5f940, sample_data=0x9369298, start_col=0)
    at jfdctint.c:2188
#1  0xb59203a6 in forward_DCT (cinfo=0xbfc5fb68, compptr=0x9372574,
    sample_data=0x9369298, coef_blocks=0x93730e4, start_row=0, start_col=0,
    num_blocks=1) at jcdctmgr.c:82
#2  0xb591f9c9 in compress_data (cinfo=0xbfc5fb68, input_buf=0xb7f930ac)
    at jccoefct.c:180
#3  0xb591d957 in jpeg_write_raw_data (cinfo=0xbfc5fb68, data=0xb7f930ac,
    num_lines=16) at jcapistd.c:153
#4  0xb7f8fbfd in write_yuv_JPEG_file (filename=<value optimized out>,
    quality=75, input=0xbfc5fde0, _width=320, _height=240) at export_jpg.c:124
#5  0xb7f901a8 in tc_export (opt=13, para1=0xbfc5fe64, para2=0x9367008)
    at export_jpg.c:307
#6  0x0805fcbe in tcv_export (opt=13, para1=0xbfc5fe64, para2=0x9367008)
    at dl_loader.c:66
#7  0x0805f21a in encoder (vob=0x9367008, frame_a=869, frame_b=1468)
    at encoder.c:734
#8  0x08058b6e in main (argc=20, argv=0xbfc60af4) at transcode.c:4009 

backtrace of transcode-1.1.5 (current unstable)

Core was generated by `transcode --progress_meter 1 --progress_rate 10 --write_pid /tmp/todisc-work.0/'.
Program terminated with signal 11, Segmentation fault.

#0  jpeg_fdct_16x16 (data=0xbfb36e40, sample_data=0x8a37d00, start_col=0)
    at jfdctint.c:2188
#1  0xa5d883a6 in forward_DCT (cinfo=0xbfb37068, compptr=0x8a5bcd4, 
    sample_data=0x8a37d00, coef_blocks=0x8a5c844, start_row=0, start_col=0, 
    num_blocks=1) at jcdctmgr.c:82
#2  0xa5d879c9 in compress_data (cinfo=0xbfb37068, input_buf=0xb7f830ac)
    at jccoefct.c:180
#3  0xa5d85957 in jpeg_write_raw_data (cinfo=0xbfb37068, data=0xb7f830ac, 
    num_lines=16) at jcapistd.c:153
#4  0xb7f7fbbd in write_yuv_JPEG_file (filename=<value optimized out>, 
    quality=75, input=0xbfb372e0, _width=320, _height=240) at export_jpg.c:117
#5  0xb7f80159 in tc_export (opt=13, para1=0x80a1e24, para2=0x8a35008)
    at export_jpg.c:297
#6  0x0805baa6 in tcv_export (opt=13, para1=0x80a1e24, para2=0x8a35008)
    at dl_loader.c:66
#7  0x0805c7a8 in tc_encoder_loop (vob=0x8a35008, frame_first=869, 
    frame_last=1468) at encoder.c:1208
#8  0x08054c3e in main (argc=0, argv=0xeb851eb8) at transcode.c:466
Comment 1 Christopher Byrne 2010-01-16 16:11:47 UTC
The situation is no better with jpeg 8 either (trasncode 1.1.5)

Core was generated by `transcode --progress_meter 1 --progress_rate 10 --write_pid /tmp/todisc-work.0/'.
Program terminated with signal 11, Segmentation fault.

#0  jpeg_fdct_16x16 (data=0xbfdca640, sample_data=0x831bd50, start_col=0)
    at jfdctint.c:2188
#1  0xa563f5d6 in forward_DCT (cinfo=0xbfdca85c, compptr=0x833fd24, 
    sample_data=0x831bd50, coef_blocks=0x8340894, start_row=0, start_col=0, 
    num_blocks=1) at jcdctmgr.c:82
#2  0xa563ec3e in compress_data (cinfo=0xbfdca85c, input_buf=0xb78420ac)
    at jccoefct.c:180
#3  0xa563cc77 in jpeg_write_raw_data (cinfo=0xbfdca85c, data=0xb78420ac, 
    num_lines=16) at jcapistd.c:153
#4  0xb783ebbd in write_yuv_JPEG_file (filename=<value optimized out>, 
    quality=75, input=0xbfdcaae0, _width=320, _height=240) at export_jpg.c:117
#5  0xb783f159 in export_jpg_encode (opt=13, para1=0x80a1e24, para2=0x8319008)
    at export_jpg.c:297
#6  tc_export (opt=13, para1=0x80a1e24, para2=0x8319008) at export_def.h:101
#7  0x0805bad6 in tcv_export (opt=13, para1=0x80a1e24, para2=0x8319008)
    at dl_loader.c:66
#8  0x0805c7d8 in OLD_encoder_export (vob=0x8319008, frame_first=3, 
    frame_last=602) at encoder.c:1208
#9  encoder_export (vob=0x8319008, frame_first=3, frame_last=602)
    at encoder.c:833
#10 tc_encoder_loop (vob=0x8319008, frame_first=3, frame_last=602)
    at encoder.c:1390
#11 0x08054c6e in transcode_mode_default (argc=0, argv=0xeb851eb8)
#12 main (argc=0, argv=0xeb851eb8) at transcode.c:2740

Comment 2 Christopher Byrne 2010-01-23 07:28:40 UTC
Created attachment 217204 [details, diff]
explicitly set do_fancy_downsampling to FALSE 

Apparently, when settings dinfo.raw_data_in,
previous version jpeg automatically set dinfo.do_fancy_downsampling to
FALSE. Newer versions (since 7) of media-libs/jpeg do not do that anymore and
the program must do it explicitly (although I have not found any documentation
to that effect). 

Compile tested only, but a similar fix in mjpegtools (but output rather than input) works.
Comment 3 Christopher Byrne 2010-01-23 07:30:16 UTC
Created attachment 217205 [details, diff]
transcode-1.1.5-r1.ebuild patch

Patch to ebuild to apply new patch transcode-1.1.5-jpeg-7.patch
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-01-23 11:55:23 UTC
Thank you again.

+*transcode-1.1.5-r1 (23 Jan 2010)
+  23 Jan 2010; Samuli Suominen <>
+  +transcode-1.1.5-r1.ebuild, +files/transcode-1.1.5-jpeg-7.patch:
+  Fix segmentation fault with jpeg-7 and above wrt #294488 by Salah Coronya.