Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3974 closed defect (needs_more_info)

ffplay crashing with some resolutions in linux terminal

Reported by: setup32 Owned by:
Priority: important Component: ffplay
Version: unspecified Keywords: crash
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

im new to linux.
im trying to play a video in a terminal (not in x) with ffplay.
the os is debian wheezy 7.6.0.
i installed all the ffmpeg dependencies on the debian compile guide http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu.
libgpac-dev was not in the apt-get package management so i skipped it.
i tried to play using ffplay version 2.4 and 2.3.3.
i compiled ffmpeg/ffplay source code with no extra options like --enable-libx264.
im logged in as root.
i tried this with mpeg4 native and wmv1 native codecs and both avi mpg codecs.
i always set -aspect 4:3.
tried with my integrated intel graphics and radeon 9250.

THE INPUT:
./ffplay -x 200 -y 200 -i inputvideo.avi

THE PROBLEM:
ffplayer crashes with "Segmentation Faultn" in terminal when a videos width or height (-s widthxheight) is a multiple of 80 eg. 640x480 320x240 160x120 480x640.
some dimensions dont crash but show a tiny green strip motion picture but the input video isnt green (size is maybe 10x2) and full screen doesnt fix it.

WORKING RESULTS:
ffplay plays all videos i tried perfectly in X (xdm and gdm3).
plays videos perfectly in the terminal with weird dimensions like 318x240 and 638x480 and most/all with no multiples of 80.

THE FFMPEG ERROR:
segmentation Faultn fd= blah blah blah

Attachments (2)

debug1.txt (4.7 KB ) - added by setup32 7 years ago.
debug1
valgrind1.txt (1.8 KB ) - added by setup32 7 years ago.
valgrind --log-file=valgrind1.txt ./ffplay_g -an out1.avi

Download all attachments as: .zip

Change History (37)

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedffplay
Keywords: crash added; ffplay linux terminal console removed
Priority: normalimportant

To make this a valid ticket, run ffplay within gdb and provide all information as requested on https://ffmpeg.org/bugreports.html including the complete, uncut console output that is printed before the crash.

in reply to:  description comment:2 by setup32, 7 years ago

Replying to setup32:

i tried this with mpeg4 native and wmv1 native codecs and both avi mpg codecs.

oops i meant avi mpg containers.

in reply to:  1 comment:3 by setup32, 7 years ago

Replying to cehoyos:

To make this a valid ticket, run ffplay within gdb and provide all information as requested on https://ffmpeg.org/bugreports.html including the complete, uncut console output that is printed before the crash.

will do but i dont know how to copy program text from the terminal.
if i cant figure out how to copy the text i will just send the gdb part.

comment:4 by Carl Eugen Hoyos, 7 years ago

First run ffplay and pipe the output to a file (and attach it here), then run gdb to debug, use set logging on and attach the gdb output here.

by setup32, 7 years ago

Attachment: debug1.txt added

debug1

comment:5 by setup32, 7 years ago

ok i tried to use gdb and it looked like it was working but when the video crashed the screen froze.
when the video crashes it usually takes me back to the terminal but in gdb it makes everything hang.
no ctrl+alt+F2 ctrl+alt+F3 ctrl+alt+del ctrl+c ctrl+break or q.
it did a normal shutdown when i tapped the power button (didnt have to hold it in for 5 seconds).
piping and redirecting was giving a blank file so i used ./ffplay -report.
its attached (debug1.txt).
if you want me to get the gdb report tell me how because i dont know.
here is what i typed for gdb:
gdb ffplay_g
r -i out.avi

Last edited 7 years ago by setup32 (previous) (diff)

comment:6 by Carl Eugen Hoyos, 7 years ago

Please try valgrind ./ffplay_g -an out.avi.

by setup32, 7 years ago

Attachment: valgrind1.txt added

valgrind --log-file=valgrind1.txt ./ffplay_g -an out1.avi

comment:7 by setup32, 7 years ago

let me know if you need me to run again with more options.

comment:8 by Carl Eugen Hoyos, 7 years ago

Was there a crash?

comment:9 by setup32, 7 years ago

ya the video crashed and hung in valgrind like it did in gdb.
it let me get out of the hang when i pushed q.

comment:10 by setup32, 7 years ago

do you know off hand if this crash happens on any other linux terminals?
i only have 1 linux pc so far so i cant tell.

in reply to:  9 comment:11 by Carl Eugen Hoyos, 7 years ago

Replying to setup32:

ya the video crashed and hung in valgrind like it did in gdb.
it let me get out of the hang when i pushed q.

This sounds like the normal behaviour of FFplay. Why do you think there was a problem?

comment:12 by setup32, 7 years ago

because it doesnt play the video.
here is what happens when i play my 37 sec video:

  1. ./ffplay -i out.avi
  2. less than 1 second later a black screen comes on like its going to play the video.

sometimes it has a weird green strip on it.

  1. the black screen disappears and it says "Segmentation Fault" where it usually puts the timer of how long the video played so far.
  2. ffplay closes and it gives me back control to terminal.

the whole thing takes a second or less.

comment:13 by Carl Eugen Hoyos, 7 years ago

But this did not happen when you used valgrind or did I misunderstand?

comment:14 by setup32, 7 years ago

it does the same thing in valgrind but it stops on step 2 from my last post.
step 3 and 4 dont happen.

comment:15 by Carl Eugen Hoyos, 7 years ago

Please run ulimit -S -c 0 before starting ffplay_g, this should produce a core dump that you can read with gdb.

comment:16 by setup32, 7 years ago

so i run:

  1. ulimit -S -c 0
  2. gdb ffplay_g
  3. r -i out.avi
  4. gdb will probably hang the computer so i cant do anything like last time.

then what? where does core dump go?

comment:17 by Carl Eugen Hoyos, 7 years ago

$ ulimit -S -c 0
$ ./ffplay_g out.avi
$ gdb core
...

in reply to:  17 ; comment:18 by Carl Eugen Hoyos, 7 years ago

Replying to cehoyos:

$ ulimit -S -c 0

On my system, it is necessary to specify a very large number instead of 0 (which should mean unlimited).

in reply to:  17 comment:19 by setup32, 7 years ago

Replying to cehoyos:

$ ulimit -S -c 0
$ ./ffplay_g out.avi
$ gdb core
...

i did that and the last line says:
core: no such file or directory.

comment:20 by Carl Eugen Hoyos, 7 years ago

Did you try with a very large value for ulimit?

in reply to:  18 comment:21 by setup32, 7 years ago

Replying to cehoyos:

On my system, it is necessary to specify a very large number instead of 0 (which should mean unlimited).

i did it again with 99999999999 and it dumped into ./core
i did gdb core and it says:
"./core": not in executable format. File format not recognized

comment:22 by Carl Eugen Hoyos, 7 years ago

$ gdb ffplay_g core

comment:23 by setup32, 7 years ago

GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/ffmpeg-2.3.3/ffplay_g...done.
[New LWP 3042]
[New LWP 3047]
[New LWP 3045]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Core was generated by `./ffplay_g -i out.avi'.
Program terminated with signal 11, Segmentation fault.
#0  0xb75f0819 in ?? () from /usr/lib/i386-linux-gnu/libSDL-1.2.so.0
(gdb)
Last edited 7 years ago by setup32 (previous) (diff)

comment:24 by Carl Eugen Hoyos, 7 years ago

Now please type bt so we get some useful information and can close this ticket.

comment:25 by setup32, 7 years ago

(gdb) bt
#0  0xb75f0819 in ?? () from /usr/lib/i386-linux-gnu/libSDL-1.2.so.0
#1  0x0a3b6f08 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

comment:26 by Carl Eugen Hoyos, 7 years ago

Maybe compiling with --disable-optimizations --disable-asm --enable-debug=3 makes the gdb output more useful. You could also try to install the sdl debug package from your distribution.

comment:27 by setup32, 7 years ago

what do you recommend? ill do that.

in reply to:  26 comment:28 by Carl Eugen Hoyos, 7 years ago

Replying to cehoyos:

You could also try to install the sdl debug package from your distribution.

Should be:

$ sudo apt-get install libsdl1.2-dbg

comment:29 by setup32, 7 years ago

recompile too or just sdl debug?

comment:30 by Carl Eugen Hoyos, 7 years ago

Were you able to test if installing sdl debug libraries and / or recompiling with debug options improves the backtrace?

comment:31 by setup32, 7 years ago

i didnt.
what is more likely to work?
ill do that 1 1st.

comment:32 by Carl Eugen Hoyos, 7 years ago

Did you test if installing the sdl debug libraries and / or using the configure options --disable-optimizations --disable-asm --enable-debug=3 improve the gdb output?

in reply to:  32 comment:33 by setup32, 7 years ago

is anybody else having this problem?
maybe its just my computer setup?

and
Replying to cehoyos:

Did you test if installing the sdl debug libraries and / or using the configure options --disable-optimizations --disable-asm --enable-debug=3 improve the gdb output?

no i didnt.

comment:34 by Carl Eugen Hoyos, 7 years ago

Resolution: needs_more_info
Status: newclosed

Please feel free to reopen this ticket if an improved backtrace indicates a problem that can be fixed within FFmpeg.

in reply to:  34 comment:35 by setup32, 7 years ago

Replying to cehoyos:

Please feel free to reopen this ticket if an improved backtrace indicates a problem that can be fixed within FFmpeg.

ok

Note: See TracTickets for help on using tickets.