demux/ttml: crash on missing <body>
(gdb) run
Starting program: /home/refp/work/videolan/vlc/git/builds/branches/ttml/bin/vlc-static --sub-file missing-body-ttml.xml john.mkv
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-8955-g9374565)
[New Thread 0x7fffed011700 (LWP 13378)]
[New Thread 0x7ffff7f34700 (LWP 13379)]
[New Thread 0x7ffff00a2700 (LWP 13380)]
[New Thread 0x7fffec810700 (LWP 13381)]
[New Thread 0x7fffec100700 (LWP 13382)]
[00000000006054c8] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[New Thread 0x7fffd4f06700 (LWP 13383)]
[New Thread 0x7fffca6db700 (LWP 13384)]
[Thread 0x7fffec810700 (LWP 13381) exited]
[New Thread 0x7fffec810700 (LWP 13385)]
[Thread 0x7ffff00a2700 (LWP 13380) exited]
[Thread 0x7fffec810700 (LWP 13385) exited]
[New Thread 0x7fffc02d0700 (LWP 13386)]
[New Thread 0x7fffec810700 (LWP 13387)]
[New Thread 0x7ffff00a2700 (LWP 13388)]
[New Thread 0x7fffb50f4700 (LWP 13389)]
[Thread 0x7fffb50f4700 (LWP 13389) exited]
Thread 12 "vlc-static" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff00a2700 (LWP 13388)]
0x00007fffbcb97ac2 in ReadTTML (p_demux=0x7fffb8c051b8) at ../../../../modules/demux/ttml.c:722
722 node_t* p_parent = p_parent_node->p_parent;
(gdb) p p_parent_node
$1 = (node_t *) 0x0
(gdb) bt 3
[#0](https://code.videolan.org/videolan/vlc/-/issues/0) 0x00007fffbcb97ac2 in ReadTTML (p_demux=0x7fffb8c051b8) at ../../../../modules/demux/ttml.c:722
[#1](https://code.videolan.org/videolan/vlc/-/issues/1) Open (p_this=0x7fffb8c051b8) at ../../../../modules/demux/ttml.c:932
[#2](https://code.videolan.org/videolan/vlc/-/issues/2) 0x00007ffff79437b8 in module_load (obj=obj@entry=0x7fffb8c051b8, m=m@entry=0x665e10, init=init@entry=0x7ffff7943710 <generic_start>, args=args@entry=0x7ffff00a1a38)
at ../../../../src/modules/modules.c:185
(More stack frames follow...)
Edited by Filip Roséen