1. Installation issues
(2013-03-27, 20:18)bjober Wrote: The new build fail to install, see http://xbmclogs.com/show.php?id=7420.
(2013-03-28, 00:57)bjober Wrote: I've only installed flyingrats builds and the official 12.1. Could it not be flyingrats second build that is wrong? Perhaps thats why it is so different in size?
@bjober: probably my fault as I managed to f*k up packing and uploading, and for a while there were some erroneous files online. Sorry about that!
2. VideoToolbox.framework dylib path name problems
(2013-03-27, 22:29)flyingrat Wrote: Yeah, I noticed the same problem with the latest ios builds as well. It seems something screwed up the dylib load path to the VideoToolbox framework...
Problem located and solved. This started a day or two back after I upgraded xcode to v4.6 which also lifted the sdk to 6.1. The reason I've upgraded xcode is that I had a lot of problems with the compiler that froze during compilation of Mime.cpp. Sadly, the xcode upgrade didn't fix the compiler problem but the result was that the following section of the build phase "copy framework" didn't trigger since the SDK_NAME was now set to "iphoneos6.1:
Org XBMC-IOS.xcodeproj -> Build phases -> "copy framework" check that failes when SDK_NAME="iphoneos6.1":
Code:
if [ "$SDK_NAME" = "iphoneos6.0" ] ; then
echo "Fixing $TARGET_BINARY VideoToolbox dylib name"
VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
install_name_tool -change "$VTB_SDK6" "$VTB_SDK5" "$TARGET_BINARY"
fi
An updated XBMC-IOS.xcodeproj -> Build phases -> "copy framework" that works with xcode 4.6:
Code:
echo "Checking VideoToolbox dylib name (SDK_NAME=$SDK_NAME)"
echo "Project default path: $(otool -L $TARGET_BINARY | grep VideoToolbox)"
if [[ $SDK_NAME =~ iphoneos6.* ]] ; then
echo "Fixing $TARGET_BINARY VideoToolbox dylib name:"
VTB_SDK6=/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
VTB_SDK5=/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
echo "install_name_tool -change '$VTB_SDK6' '$VTB_SDK5' $TARGET_BINARY"
install_name_tool -change "$VTB_SDK6" "$VTB_SDK5" "$TARGET_BINARY"
fi
3. ATV and IOS crashes during video playback (stream or file) with the new ffmpeg n1.2 libraries.
It seems we have the same problem on ATV as on the iDevices which unfortunately seems to be directly related to the new ffmpeg libraries. Xbmc will crash if you try to playback a video stream or if you browse a directory with video files that have missing thumb nails.
Background: The crash occurs during calls to the ffmpeg assmebler function ff_pred8x8_128_dc_neon which originates upstreams from CDVDDemuxFFmpeg::Open(CDVDInputStream*). This function is called from both thread CDVDPlayer and Jobworker (ThumbExtractor). I've started the work to solve this problem but I've got a feeling it will be a bit tricky this time...
Thread 18 - CDVDPlayer
Code:
#0 0x01197c18 in ff_pred8x8_128_dc_neon at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/arm/h264pred_neon.S:405
#1 0x0121f62c in hl_decode_mb_simple_8 at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264_mb_template.c:161
#2 0x01218266 in ff_h264_hl_decode_mb at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:2415
#3 0x01225032 in decode_slice at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4207
#4 0x01224ddc in execute_decode_slices at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4357
#5 0x012174ce in decode_nal_units at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4701
#6 0x01221024 in decode_frame at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4813
#7 0x0136e252 in avcodec_decode_video2 at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/utils.c:1690
#8 0x0143675c in try_decode_frame at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavformat/utils.c:2562
#9 0x01434b1a in avformat_find_stream_info at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavformat/utils.c:2994
#10 0x001b5e92 in DllAvFormat::avformat_find_stream_info(AVFormatContext*, AVDictionary**) at xbmc-ffmpeg-v1.1-bump/lib/DllAvFormat.h:127
#11 0x001c8942 in CDVDDemuxFFmpeg::Open(CDVDInputStream*) at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp:445
#12 0x001c6024 in CDVDFactoryDemuxer::CreateDemuxer(CDVDInputStream*) at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp:117
#13 0x001fea9e in CDVDPlayer::OpenDemuxStream() at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDPlayer.cpp:645
#14 0x002020f4 in CDVDPlayer::Process() at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDPlayer.cpp:934
#15 0x0020715c in _ZThn8_N10CDVDPlayer7ProcessEv at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDPlayer.cpp:1218
#16 0x0065e646 in CThread::Action() at xbmc-ffmpeg-v1.1-bump/xbmc/threads/Thread.cpp:218
#17 0x0065d200 in CThread::staticThread(void*) at xbmc-ffmpeg-v1.1-bump/xbmc/threads/Thread.cpp:128
#18 0x3499ac1c in _pthread_start ()
#19 0x3499aad8 in thread_start ()
Thread 14 Jobworker - VideoThumbloader.cpp->CThumbExtractor:
oWork()->CDVDFileInfo::ExtractThumb
Code:
#0 0x01197c18 in ff_pred8x8_128_dc_neon at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/arm/h264pred_neon.S:405
#1 0x0121f62c in hl_decode_mb_simple_8 at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264_mb_template.c:161
#2 0x01218266 in ff_h264_hl_decode_mb at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:2415
#3 0x01225032 in decode_slice at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4207
#4 0x01224ddc in execute_decode_slices at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4357
#5 0x012174ce in decode_nal_units at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4701
#6 0x01221024 in decode_frame at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/h264.c:4813
#7 0x0136e252 in avcodec_decode_video2 at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavcodec/utils.c:1690
#8 0x0143675c in try_decode_frame at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavformat/utils.c:2562
#9 0x01434b1a in avformat_find_stream_info at xbmc-ffmpeg-v1.1-bump/lib/ffmpeg/libavformat/utils.c:2994
#10 0x001b5e92 in DllAvFormat::avformat_find_stream_info(AVFormatContext*, AVDictionary**) at xbmc-ffmpeg-v1.1-bump/lib/DllAvFormat.h:127
#11 0x001c8942 in CDVDDemuxFFmpeg::Open(CDVDInputStream*) at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp:445
#12 0x001c6024 in CDVDFactoryDemuxer::CreateDemuxer(CDVDInputStream*) at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp:117
#13 0x001d4640 in CDVDFileInfo::ExtractThumb(CStdStr<char> const&, CTextureDetails&, CStreamDetails*) at xbmc-ffmpeg-v1.1-bump/xbmc/cores/dvdplayer/DVDFileInfo.cpp:121
#14 0x00c4bee0 in CThumbExtractor::DoWork() at xbmc-ffmpeg-v1.1-bump/xbmc/video/VideoThumbLoader.cpp:95
#15 0x00696600 in CJobWorker::Process() at xbmc-ffmpeg-v1.1-bump/xbmc/utils/JobManager.cpp:67
#16 0x0065e646 in CThread::Action() at xbmc-ffmpeg-v1.1-bump/xbmc/threads/Thread.cpp:217
#17 0x0065d200 in CThread::staticThread(void*) at xbmc-ffmpeg-v1.1-bump/xbmc/threads/Thread.cpp:127
#18 0x3499ac1c in _pthread_start ()
#19 0x3499aad8 in thread_start ()
The problem originates from lib/ffmpeg/libavcodec/h264_mb_template.c
Code:
160: if (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) {
161: h->hpc.pred8x8[h->chroma_pred_mode](dest_cb, uvlinesize); <-- Crash - Thread 18 CDVDPlayer: EXC_BAD_INSTRUCTION (asm: ff_pred8x8_0l0_dc_neon)
162: h->hpc.pred8x8[h->chroma_pred_mode](dest_cr, uvlinesize);
163: }
The code above calls the assembler function ff_pred8x8_128_dc_neon in lib/ffmpeg/libavcodec/arm/h264pred_neon.S which causes the crash.
Code:
function ff_pred8x8_128_dc_neon, export=1
vmov.i8 q0, #128
b .L_pred8x8_dc_end
endfunc