Opened 5 years ago

Closed 5 years ago

Last modified 5 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 5 years ago.
debug1
valgrind1.txt (1.8 KB) - added by setup32 5 years ago.
valgrind --log-file=valgrind1.txt ./ffplay_g -an out1.avi

Download all attachments as: .zip

Change History (37)

comment:1 follow-up: Changed 5 years ago by cehoyos

  • Component changed from undetermined to ffplay
  • Keywords crash added; ffplay linux terminal console removed
  • Priority changed from normal to important

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.

comment:2 in reply to: ↑ description Changed 5 years ago by setup32

Replying to setup32:

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

oops i meant avi mpg containers.

comment:3 in reply to: ↑ 1 Changed 5 years ago by setup32

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 Changed 5 years ago by cehoyos

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.

Changed 5 years ago by setup32

debug1

comment:5 Changed 5 years ago by setup32

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 5 years ago by setup32 (previous) (diff)

comment:6 Changed 5 years ago by cehoyos

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

Changed 5 years ago by setup32

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

comment:7 Changed 5 years ago by setup32

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

comment:8 Changed 5 years ago by cehoyos

Was there a crash?

comment:9 follow-up: Changed 5 years ago by 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.

comment:10 Changed 5 years ago by setup32

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.

comment:11 in reply to: ↑ 9 Changed 5 years ago by cehoyos

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 Changed 5 years ago by setup32

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 Changed 5 years ago by cehoyos

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

comment:14 Changed 5 years ago by setup32

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 Changed 5 years ago by cehoyos

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

comment:16 Changed 5 years ago by setup32

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 follow-ups: Changed 5 years ago by cehoyos

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

comment:18 in reply to: ↑ 17 ; follow-up: Changed 5 years ago by cehoyos

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).

comment:19 in reply to: ↑ 17 Changed 5 years ago by setup32

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 Changed 5 years ago by cehoyos

Did you try with a very large value for ulimit?

comment:21 in reply to: ↑ 18 Changed 5 years ago by setup32

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 Changed 5 years ago by cehoyos

$ gdb ffplay_g core

comment:23 Changed 5 years ago by setup32

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 5 years ago by setup32 (previous) (diff)

comment:24 Changed 5 years ago by cehoyos

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

comment:25 Changed 5 years ago by setup32

(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 follow-up: Changed 5 years ago by cehoyos

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 Changed 5 years ago by setup32

what do you recommend? ill do that.

comment:28 in reply to: ↑ 26 Changed 5 years ago by cehoyos

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 Changed 5 years ago by setup32

recompile too or just sdl debug?

comment:30 Changed 5 years ago by cehoyos

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

comment:31 Changed 5 years ago by setup32

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

comment:32 follow-up: Changed 5 years ago by 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?

comment:33 in reply to: ↑ 32 Changed 5 years ago by setup32

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 follow-up: Changed 5 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

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

comment:35 in reply to: ↑ 34 Changed 5 years ago by setup32

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.