google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

"Bus Error" When running on Mac OSX (compiles fine) #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build ffmpegthumnailer on Mac OSX
2. Try to create a thumbnail
3. Receive error: "Bus error"

What is the expected output? What do you see instead?
Expect: Thumbnail image
Actual: Receive above error

What version of the product are you using? On what operating system?
ffmpegthumbnailer-1.2.6
OSX 10.5

Please provide any additional information below.

Packages Provided via Fink:

# for i in ffmpeg-dev libavcodec-dev libavformat-dev libavutil-dev
libswscale-dev libjpeg-dev; do
fink install $i;
done

Verify All required are installed for compile:
-----------------------------------------------
libavcodec-dev  0.4.20071217-5
libavformat-dev 0.4.20071217-5
libavutil-dev   0.4.20071217-5
libswscale-dev  0.4.20071217-5
ffmpeg  0.4.20071217-5
ffmpeg-dev      0.4.20071217-5

Compile using Fink default path:
--------------------------------
# ./configure --prefix=/sw/

Build & install
---------------
# make && make install

Test binary:
------------

# ffmpegthumbnailer
invalid arguments
Usage: ffmpegthumbnailer [options]

Options:
  -i<s>  : input file
  -o<s>  : output file
  -s<n>  : thumbnail size (default: 128)
  -t<n>  : time to seek to (percentage) (default: 10)
  -f     : create a movie strip overlay
  -w     : workaround issues in old versions of ffmpeg
  -h     : display this help

Try vaild file
--------------
# ffmpegthumbnailer -w -i "/path/to/an/avi/file.avi" -o samp.jpg -s 128
Bus error

I just can't seem to figure out what is being referred to as "Bus". 

Original issue reported on code.google.com by SpEnT...@gmail.com on 18 Aug 2008 at 3:35

GoogleCodeExporter commented 9 years ago
I managed to get it running through gdb but it's not helping me troubleshoot 
much more:

# gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".
(gdb) exec-file ffmpegthumbnailer
Reading symbols for shared libraries ........................ done
(gdb) run
Starting program: /sw/bin/ffmpegthumbnailer
Reading symbols for shared libraries .+++++++++++++++++++++++..... done
invalid arguments
Usage: ffmpegthumbnailer [options]

Options:
  -i<s>  : input file
  -o<s>  : output file
  -s<n>  : thumbnail size (default: 128)
  -t<n>  : time to seek to (percentage) (default: 10)
  -f     : create a movie strip overlay
  -w     : workaround issues in old versions of ffmpeg
  -h     : display this help

Program exited normally.
(gdb) run -i /Volumes/Media/Video/My.avi -o sample.png -s 128 -t 30
Starting program: /sw/bin/ffmpegthumbnailer -i
/Volumes/Media/Video/My_Super_Ex_Gf.avi -o sample.png -s 128 -t 30

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x969721e5 in strtol_l ()
(gdb) c
Continuing.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x969721e5 in strtol_l ()

(gdb) print strtol_l
$1 = {<text variable, no debug info>} 0x969721b1 <strtol_l>
(gdb) Quit
(gdb) bt
#0  0x969721e5 in strtol_l ()
#1  0x969721ab in atoi ()
#2  0x000028fe in main ()

Not sure if this helps any but I'm hoping there are eyes out there somewhere :-)

Original comment by SpEnT...@gmail.com on 18 Aug 2008 at 6:56

GoogleCodeExporter commented 9 years ago
more debugging (kind of) a list from gdb at the fault:

# gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.                                 
GDB is free software, covered by the GNU General Public License, and you are  
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions.                                    
There is absolutely no warranty for GDB.  Type "show warranty" for details.   
This GDB was configured as "i386-apple-darwin".                               
(gdb) exec-file ffmpegthumbnailer
Reading symbols for shared libraries ........................ done
(gdb) run -i /Volumes/Media/Video/My.avi -o sample.jpg -s 128 -t 30
Starting program: /sw/bin/ffmpegthumbnailer -i /Volumes/Media/Video/My.avi -o
sample.jpg -s 128 -t 30
Reading symbols for shared libraries .+++++++++++++++++++++++..... done         

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000          
0x969721e5 in strtol_l ()                                       
(gdb) list                                                      
1                                                               
2       /* png.c - location for general purpose libpng functions
3        *                                                      
4        * Last changed in libpng 1.2.21 October 4, 2007        
5        * For conditions of distribution and use, see copyright notice in png.h
6        * Copyright (c) 1998-2007 Glenn Randers-Pehrson                        
7        * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)               
8        * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, 
Inc.)
9        */                                                                     

10                                                                              

(gdb) q                                                                         

The program is running.  Exit anyway? (y or n) y

Original comment by SpEnT...@gmail.com on 18 Aug 2008 at 9:16

GoogleCodeExporter commented 9 years ago
Ok so to me it looked like there might be an issue with the png libraries ... 
so I
compiled zlib and the latest libpng ... and got the same error:

# gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".
(gdb) exec-file ffmpegthumbnailer
Reading symbols for shared libraries ........................ done
(gdb) run -i /Volumes/Media/Video/My.avi -o sample.jpg -s 128 -t 30
Starting program: /sw/bin/ffmpegthumbnailer -i
/Volumes/Media/Video/My_Super_Ex_Gf.avi -o sample.jpg -s 128 -t 30
Reading symbols for shared libraries .+++++++++++++++++++++++..... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x969721e5 in strtol_l ()
(gdb) list
1
2       /* png.c - location for general purpose libpng functions
3        *
4        * Last changed in libpng 1.2.30 [August 15, 2008]
5        * For conditions of distribution and use, see copyright notice in png.h
6        * Copyright (c) 1998-2008 Glenn Randers-Pehrson
7        * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
8        * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, 
Inc.)
9        */
10

Original comment by SpEnT...@gmail.com on 19 Aug 2008 at 12:58

GoogleCodeExporter commented 9 years ago
Sorry for the late response, I was on holiday.
Can you type backtrace in gdb?

Original comment by dirk.vdb on 20 Aug 2008 at 11:44

GoogleCodeExporter commented 9 years ago
Absolutely :)

However in my effort to trouble shoot I started compiling everything from 
scratch ...
and now I can't get ffmpegthumbnailer to build. If I can get it building again 
I will
post my backtrace.

for right now I'm fighting with this:

/bin/sh ../../libtool --tag=CXX   --mode=link g++  -I/sw/include -version-info 
2:0:0
 -o libffmpegthumbnailer.la -rpath /sw/lib moviedecoder.lo pngwriter.lo jpegwriter.lo
stringoperations.lo videothumbnailer.lo videothumbnailerc.lo -L/sw//lib -lavutil
-lavformat -lavcodec -lswscale -L/sw/lib -lpng12 -ljpeg 
libtool: link: g++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
.libs/libffmpegthumbnailer.2.dylib  .libs/moviedecoder.o .libs/pngwriter.o
.libs/jpegwriter.o .libs/stringoperations.o .libs/videothumbnailer.o
.libs/videothumbnailerc.o   -L/sw//lib -lavutil -lavformat -lavcodec -lswscale
-L/sw/lib /sw/lib/libpng12.dylib -lz /sw/lib/libjpeg.dylib    -install_name 
/sw/lib/libffmpegthumbnailer.2.dylib -compatibility_version 3 -current_version 
3.0
-Wl,-single_module
ld warning: codegen in _av_aes_init (offset 0x00000013) prevents image from 
loading
in dyld shared cache
ld warning: codegen in _av_aes_init (offset 0x000000CE) prevents image from 
loading
in dyld shared cache
ld warning: codegen in _av_aes_init (offset 0x000000D4) prevents image from 
loading
in dyld shared cache
ld warning: codegen in _av_aes_init (offset 0x00000148) prevents image from 
loading
in dyld shared cache

There's thousands of lines of this followed by:

ld warning: codegen in _yuv420_rgb15_MMX2 (offset 0x00000228) prevents image 
from
loading in dyld shared cache
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _av_aes_init from
/sw//lib/libavutil.a(aes.o) not allowed in slidable image. Use 
'-read_only_relocs
suppress' to enable text relocs
collect2: ld returned 1 exit status
make[2]: *** [libffmpegthumbnailer.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I'll see what I can figure out

Original comment by SpEnT...@gmail.com on 21 Aug 2008 at 7:09

GoogleCodeExporter commented 9 years ago
Any news on this?

Original comment by dirk.vdb on 20 Sep 2008 at 7:42

GoogleCodeExporter commented 9 years ago

Original comment by dirk.vdb on 1 Jan 2009 at 10:17