iPhone X crash (iOS reboots) when playing back HEVC 4K stream
I've been testing MobileVLCKit-3.0.0a46 and I've just noticed that version 2.8.6 of the VLC app has been released with this issue still present.
Playing this file https://www.dropbox.com/s/wd2fwru2t8yq4lf/test3.ts?dl=0 will instantly crash / reboot an iPhone X.
This file was produced from a tvheadend recording of a live tv channel.
I've been trying to debug this bug (I'm compiling vlckit at the moment), but the logs output that VT is saying the content is interlaced, however HEVC interlaced video is not supported by the standard (?).
here are some debug logs from my app before the reboot happens and I loose connection to the phone:
2017-12-09 12:36:18.454111+0000 TvhClient[270:8336] pid[2815] unknown
2017-12-09 12:36:18.454149+0000 TvhClient[270:8336] first packet for pid=2815 cc=0x3
2017-12-09 12:36:18.454212+0000 TvhClient[270:8336] pid[2816] unknown
2017-12-09 12:36:18.454239+0000 TvhClient[270:8336] first packet for pid=2816 cc=0x5
2017-12-09 12:36:18.514578+0000 TvhClient[270:8336] pid[106] unknown
2017-12-09 12:36:18.516952+0000 TvhClient[270:8336] PATCallBack called
2017-12-09 12:36:18.517013+0000 TvhClient[270:8336] new PAT ts_id=1043 version=16 current_next=1
2017-12-09 12:36:18.517055+0000 TvhClient[270:8336] * number=1 pid=106
2017-12-09 12:36:18.517099+0000 TvhClient[270:8336] temporary receiving program 1
2017-12-09 12:36:18.583621+0000 TvhClient[270:8336] first packet for pid=106 cc=0x1
2017-12-09 12:36:18.583710+0000 TvhClient[270:8336] PMTCallBack called for program 1
2017-12-09 12:36:18.583745+0000 TvhClient[270:8336] new PMT program number=1 version=11 pid_pcr=2815
2017-12-09 12:36:18.583812+0000 TvhClient[270:8336] * pid=2815 type=0x24 ISO/IEC Reserved
2017-12-09 12:36:18.583869+0000 TvhClient[270:8336] - ES descriptor tag 0x52
2017-12-09 12:36:18.583903+0000 TvhClient[270:8336] - ES descriptor tag 0x38
2017-12-09 12:36:18.583942+0000 TvhClient[270:8336] => pid 2815 has now es fcc=hevc
2017-12-09 12:36:18.583996+0000 TvhClient[270:8336] selecting program id=1
2017-12-09 12:36:18.585357+0000 TvhClient[270:8336] looking for packetizer module matching "any": 24 candidates
2017-12-09 12:36:18.585424+0000 TvhClient[270:8336] using packetizer module "hevc"
2017-12-09 12:36:18.585471+0000 TvhClient[270:8336] looking for video decoder module matching "any": 7 candidates
2017-12-09 12:36:18.807729+0000 TvhClient[270:8336] AVDRegister - AppleAVD HEVC codec registered
2017-12-09 12:36:18.809983+0000 TvhClient[270:8336] Using Video Toolbox to decode 'hevc'
2017-12-09 12:36:18.810065+0000 TvhClient[270:8336] using video decoder module "videotoolbox"
2017-12-09 12:36:18.810277+0000 TvhClient[270:8336] Default program is 1
2017-12-09 12:36:18.810433+0000 TvhClient[270:8336] * pid=2816 type=0x3 ISO/IEC 11172 Audio
2017-12-09 12:36:18.810522+0000 TvhClient[270:8336] - ES descriptor tag 0x52
2017-12-09 12:36:18.810683+0000 TvhClient[270:8336] - ES descriptor tag 0xa
2017-12-09 12:36:18.810982+0000 TvhClient[270:8336] found language: eng
2017-12-09 12:36:18.811125+0000 TvhClient[270:8336] => pid 2816 has now es fcc=mpga
2017-12-09 12:36:18.811453+0000 TvhClient[270:8336] looking for packetizer module matching "any": 24 candidates
2017-12-09 12:36:18.811552+0000 TvhClient[270:8336] using packetizer module "mpegaudio"
2017-12-09 12:36:18.811683+0000 TvhClient[270:8336] looking for audio decoder module matching "any": 12 candidates
2017-12-09 12:36:18.815217+0000 TvhClient[270:8336] mpga->f32l, bits per sample: 32
2017-12-09 12:36:18.815294+0000 TvhClient[270:8336] using audio decoder module "mpg123"
2017-12-09 12:36:18.815431+0000 TvhClient[270:8336] * pid=17 listening for SDT
2017-12-09 12:36:18.815480+0000 TvhClient[270:8336] enabling pid 2815 from program 1
2017-12-09 12:36:18.815524+0000 TvhClient[270:8336] enabling pid 2816 from program 1
2017-12-09 12:36:18.815567+0000 TvhClient[270:8336] enabling pcr pid 2815 from program 1
2017-12-09 12:36:18.815701+0000 TvhClient[270:8336] first packet for pid=2815 cc=0x2
2017-12-09 12:36:18.816031+0000 TvhClient[270:8336] Buffering 0%
2017-12-09 12:36:18.816545+0000 TvhClient[270:8336] first packet for pid=2816 cc=0x9
2017-12-09 12:36:18.816677+0000 TvhClient[270:8336] Buffering 1%
2017-12-09 12:36:18.817240+0000 TvhClient[270:8336] Buffering 3%
2017-12-09 12:36:18.817611+0000 TvhClient[270:8336] Buffering 5%
2017-12-09 12:36:18.818034+0000 TvhClient[270:8336] Buffering 7%
2017-12-09 12:36:18.818451+0000 TvhClient[270:8336] Buffering 9%
2017-12-09 12:36:18.818835+0000 TvhClient[270:8336] SDTCallBack called
2017-12-09 12:36:18.818905+0000 TvhClient[270:8336] * pid=18 listening for EIT
2017-12-09 12:36:18.818949+0000 TvhClient[270:8336] * pid=20 listening for TDT
2017-12-09 12:36:18.819021+0000 TvhClient[270:8336] new SDT ts_id=1043 version=19 current_next=1 network_id=1
2017-12-09 12:36:18.819069+0000 TvhClient[270:8336] * service id=1 eit schedule=0 present=0 running=4 free_ca=0
2017-12-09 12:36:18.819714+0000 TvhClient[270:8336] - type=31 provider=SES ASTRA name=Fashion 4K
2017-12-09 12:36:18.819798+0000 TvhClient[270:8336] EsOutProgramMeta: number=1
2017-12-09 12:36:18.820054+0000 TvhClient[270:8336] Buffering 11%
2017-12-09 12:36:18.820420+0000 TvhClient[270:8336] Buffering 12%
2017-12-09 12:36:18.821722+0000 TvhClient[270:8447] MPGA channels:2 samplerate:48000 bitrate:192
2017-12-09 12:36:18.821752+0000 TvhClient[270:8336] Buffering 14%
2017-12-09 12:36:18.821798+0000 TvhClient[270:8447] restarting module due to input format change
2017-12-09 12:36:18.822092+0000 TvhClient[270:8336] Buffering 15%
2017-12-09 12:36:18.823083+0000 TvhClient[270:8447] removing module "mpg123"
2017-12-09 12:36:18.823293+0000 TvhClient[270:8447] looking for audio decoder module matching "any": 12 candidates
2017-12-09 12:36:18.823414+0000 TvhClient[270:8336] Buffering 17%
2017-12-09 12:36:18.823465+0000 TvhClient[270:8447] mpga->f32l, bits per sample: 32
2017-12-09 12:36:18.823481+0000 TvhClient[270:8446] restarting module due to input format change
2017-12-09 12:36:18.823513+0000 TvhClient[270:8447] using audio decoder module "mpg123"
2017-12-09 12:36:18.823537+0000 TvhClient[270:8446] removing module "videotoolbox"
2017-12-09 12:36:18.823602+0000 TvhClient[270:8446] looking for video decoder module matching "any": 7 candidates
2017-12-09 12:36:18.823864+0000 TvhClient[270:8336] Buffering 18%
2017-12-09 12:36:18.823865+0000 TvhClient[270:8446] Using Video Toolbox to decode 'hevc'
2017-12-09 12:36:18.823947+0000 TvhClient[270:8446] using video decoder module "videotoolbox"
2017-12-09 12:36:18.823979+0000 TvhClient[270:8447] reusing audio output
2017-12-09 12:36:18.824003+0000 TvhClient[270:8446] new VPS parsed: 0
2017-12-09 12:36:18.824055+0000 TvhClient[270:8447] VLC is looking for: 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
2017-12-09 12:36:18.824060+0000 TvhClient[270:8446] new SPS parsed: 0
2017-12-09 12:36:18.824108+0000 TvhClient[270:8446] new PPS parsed: 0
2017-12-09 12:36:18.824430+0000 TvhClient[270:8336] Buffering 20%
2017-12-09 12:36:18.825081+0000 TvhClient[270:8336] Buffering 21%
2017-12-09 12:36:18.825310+0000 TvhClient[270:8336] Buffering 22%
2017-12-09 12:36:18.831310+0000 TvhClient[270:8336] Buffering 24%
2017-12-09 12:36:18.847805+0000 TvhClient[270:8336] Buffering 26%
2017-12-09 12:36:18.863020+0000 TvhClient[270:8336] Buffering 27%
2017-12-09 12:36:18.873948+0000 TvhClient[270:8447] Output on Default, channel count: 2
2017-12-09 12:36:18.903819+0000 TvhClient[270:8336] Buffering 29%
2017-12-09 12:36:18.904090+0000 TvhClient[270:8446] VT decoder doesn't handle deinterlacing
2017-12-09 12:36:18.907538+0000 TvhClient[270:8336] Buffering 31%
2017-12-09 12:36:18.914113+0000 TvhClient[270:8336] Buffering 32%
2017-12-09 12:36:18.920410+0000 TvhClient[270:8447] not output layout, default to Stereo
2017-12-09 12:36:18.920476+0000 TvhClient[270:8447] selected 2 physical channels for device output
2017-12-09 12:36:18.920489+0000 TvhClient[270:8447] VLC will output: Stereo
2017-12-09 12:36:18.920528+0000 TvhClient[270:8447] Current AU format: [48000.000000][mcpl][9][8][1][8][2][32]
2017-12-09 12:36:18.921507+0000 TvhClient[270:8447] Current device has a latency of 7479 us
2017-12-09 12:36:18.933054+0000 TvhClient[270:8336] Buffering 34%
2017-12-09 12:36:18.949841+0000 TvhClient[270:8336] Buffering 36%
2017-12-09 12:36:18.952220+0000 TvhClient[270:8344] vt session error: 'kVTVideoDecoderBadDataErr'
2017-12-09 12:36:18.957791+0000 TvhClient[270:8344] vt session error: 'kVTVideoDecoderBadDataErr'
2017-12-09 12:36:18.960942+0000 TvhClient[270:8446] restarting vt session (dec callback failed)
2017-12-09 12:36:18.960963+0000 TvhClient[270:8446] Restarting decoder session
2017-12-09 12:36:18.967187+0000 TvhClient[270:8336] Buffering 38%
2017-12-09 12:36:18.984027+0000 TvhClient[270:8336] Buffering 39%
2017-12-09 12:36:19.000640+0000 TvhClient[270:8336] Buffering 41%
2017-12-09 12:36:19.009126+0000 TvhClient[270:8336] Buffering 42%
2017-12-09 12:36:19.018725+0000 TvhClient[270:8447] analog AudioUnit output successfully opened for f32l Stereo
2017-12-09 12:36:19.018898+0000 TvhClient[270:8447] output 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
2017-12-09 12:36:19.018958+0000 TvhClient[270:8447] looking for audio volume module matching "any": 2 candidates
2017-12-09 12:36:19.018979+0000 TvhClient[270:8447] using audio volume module "float_mixer"
2017-12-09 12:36:19.018995+0000 TvhClient[270:8447] input 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
2017-12-09 12:36:19.019028+0000 TvhClient[270:8447] looking for audio filter module matching "scaletempo": 13 candidates
2017-12-09 12:36:19.019047+0000 TvhClient[270:8447] format: 48000 rate, 2 nch, 4 bps, fl32
2017-12-09 12:36:19.019081+0000 TvhClient[270:8447] params: 30 stride, 0.200 overlap, 14 search
2017-12-09 12:36:19.019120+0000 TvhClient[270:8447] 1.000 scale, 1440.000 stride_in, 1440 stride_out, 1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode
2017-12-09 12:36:19.019156+0000 TvhClient[270:8447] using audio filter module "scaletempo"
2017-12-09 12:36:19.019180+0000 TvhClient[270:8447] conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo
2017-12-09 12:36:19.019195+0000 TvhClient[270:8447] conversion pipeline complete
2017-12-09 12:36:19.019230+0000 TvhClient[270:8447] looking for audio filter module matching "equalizer": 13 candidates
2017-12-09 12:36:19.019407+0000 TvhClient[270:8447] equalizer loaded for 48000 Hz with 10 bands 1 pass
2017-12-09 12:36:19.019430+0000 TvhClient[270:8447] 31.25 Hz -> factor:0.000000 alpha:0.001444 beta:0.997112 gamma:1.997095
2017-12-09 12:36:19.019446+0000 TvhClient[270:8447] 62.50 Hz -> factor:0.000000 alpha:0.002884 beta:0.994232 gamma:1.994165
2017-12-09 12:36:19.019462+0000 TvhClient[270:8447] 125.00 Hz -> factor:0.000000 alpha:0.005752 beta:0.988497 gamma:1.988230
2017-12-09 12:36:19.019792+0000 TvhClient[270:8447] 250.00 Hz -> factor:0.000000 alpha:0.011437 beta:0.977126 gamma:1.976067
2017-12-09 12:36:19.019813+0000 TvhClient[270:8447] 500.00 Hz -> factor:0.000000 alpha:0.022613 beta:0.954775 gamma:1.950589
2017-12-09 12:36:19.019829+0000 TvhClient[270:8447] 1000.00 Hz -> factor:0.000000 alpha:0.044203 beta:0.911595 gamma:1.895241
2017-12-09 12:36:19.019845+0000 TvhClient[270:8447] 2000.00 Hz -> factor:0.000000 alpha:0.084497 beta:0.831006 gamma:1.768616
2017-12-09 12:36:19.019860+0000 TvhClient[270:8447] 4000.00 Hz -> factor:0.000000 alpha:0.154688 beta:0.690623 gamma:1.464123
2017-12-09 12:36:19.019876+0000 TvhClient[270:8447] 8000.00 Hz -> factor:0.000000 alpha:0.260898 beta:0.478204 gamma:0.739102
2017-12-09 12:36:19.019891+0000 TvhClient[270:8447] 16000.00 Hz -> factor:0.000000 alpha:0.371900 beta:0.256201 gamma:-0.628101
2017-12-09 12:36:19.019909+0000 TvhClient[270:8447] using audio filter module "equalizer"
2017-12-09 12:36:19.019924+0000 TvhClient[270:8447] conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo
2017-12-09 12:36:19.019938+0000 TvhClient[270:8447] conversion pipeline complete
2017-12-09 12:36:19.019953+0000 TvhClient[270:8447] conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo
2017-12-09 12:36:19.019967+0000 TvhClient[270:8447] conversion pipeline complete
2017-12-09 12:36:19.019994+0000 TvhClient[270:8447] looking for audio resampler module matching "any": 1 candidates
2017-12-09 12:36:19.020010+0000 TvhClient[270:8447] using audio resampler module "ugly"
2017-12-09 12:36:19.026876+0000 TvhClient[270:8336] Buffering 43%
2017-12-09 12:36:19.028968+0000 TvhClient[270:8446] VT decoder doesn't handle deinterlacing
Please note that the crash also happens on VLC 2.8.6 if you copy the file to the local device, I just haven't grabbed the logs from VLC itself.