Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault after video open error #3

Open
jonnor opened this issue Nov 19, 2015 · 3 comments
Open

Segfault after video open error #3

jonnor opened this issue Nov 19, 2015 · 3 comments

Comments

@jonnor
Copy link
Contributor

jonnor commented Nov 19, 2015

Happened on 2 out of 2 .mp4 files. Probably x264 encoded.

Expected: to get a helpful error message, and no crash.
Got: a quite uninformative error, and segfault.

Should possibly be fixed in GEGL, idk. In general we don't have a very good mechanism to report error and let consuming applications catch it? Hit that issue also in imgflo

Stacktrace attached.

[jon@jon-laptop iconographer]$ gdb --args ./iconographer ./kdenlive/printed-electret-microphone.mp4
GNU gdb (GDB) 7.10
...
Reading symbols from ./iconographer...done.
(gdb) y
Undefined command: "y".  Try "help".
(gdb) r
Starting program: /home/jon/contrib/code/iconographer/iconographer ./kdenlive/printed-electret-microphone.mp4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Failed to release test userptr object! (9) i915 kernel driver may not be sane!
Failed to release test userptr object! (9) i915 kernel driver may not be sane!
Failed to release test userptr object! (9) i915 kernel driver may not be sane!

(iconographer:2360): GEGL-ff-load.c-WARNING **: ./kdenlive/printed-electret-microphone.mp4: Error while opening file


Program received signal SIGSEGV, Segmentation fault.
0x00007fffd541550d in prepare (operation=0x1256190) at ff-load.c:396
396       fprintf (stderr, "[%lu]\n", p->video_fcontext->start_time_realtime);
(gdb) print p
$1 = (Priv *) 0x12a5e80
(gdb) print *p
$2 = {width = 320, height = 200, fps = 0, loadedfilename = 0x0, audio_fcontext = 0x0, audio_codec = 0x0, audio_index = 0, audio_track = 0x0, audio_cursor_pos = 0, audio_pos = 0, 
  prevapts = 0, a_prevframe = 0, video_fcontext = 0x0, video_index = 0, video_stream = 0x0, audio_stream = 0x0, video_codec = 0x0, lavc_frame = 0x0, prevframe = 0, prevpts = 0}
(gdb) 
@jonnor
Copy link
Contributor Author

jonnor commented Nov 19, 2015

This crash also happens on entirely invalid data.

[jon@jon-laptop iconographer]$ touch zerobytes.mp4
[jon@jon-laptop iconographer]$ gdb --args ./iconographer zerobytes.mp4 
...
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a5ee0] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x12a5ee0] moov atom not found
...
(iconographer:2950): GEGL-ff-load.c-WARNING **: zerobytes.mp4: Error while parsing header or unknown format

Program received signal SIGSEGV, Segmentation fault.
0x00007fffd541550d in prepare (operation=0x1256190) at ff-load.c:396
396       fprintf (stderr, "[%lu]\n", p->video_fcontext->start_time_realtime);

@jonnor
Copy link
Contributor Author

jonnor commented Nov 19, 2015

Here is the failing MP4 file: ftp://vps.jonnor.com/imgflo/printed-electret-microphone.mp4

@jonnor
Copy link
Contributor Author

jonnor commented Nov 19, 2015

Turns out for that MP4 I was just inputting the wrong path. Bug still stands though, should not crash, and error message should be more helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant