#210 melt crashes when trying to load a .melt file that is more than 1000 lines in length

unknown
closed
nobody
None
5
2014-09-13
2014-04-11
mike morrison
No

I have created a large melt file that I'm trying to load into melt but it crashes when loading.

I've attached a simple file that demonstrates this problem.

I would like to be able to load a file of arbitrary length. 1000 lines is quite limiting for what I'm trying to do.

Version:

$ melt --version
melt 0.9.0
Copyright (C) 2002-2013 Ushodaya Enterprises Limited
http://www.mltframework.org/
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Stack trace:
Error in /usr/bin/melt': corrupted double-linked list: 0x8012d5b0 *** *** Error in/usr/bin/melt': free(): invalid pointer: 0x80134681

Program received signal SIGSEGV, Segmentation fault.
GI_libc_free (mem=0x10) at malloc.c:2929
2929 malloc.c: No such file or directory.
(gdb) bt

0 GI_libc_free (mem=0x10) at malloc.c:2929

1 0xb2006414 in producer_melt_file_init () from /usr/lib/i386-linux-gnu/mlt/libmltcore.so

2 0xb7fa0ec6 in mlt_repository_create () from /usr/lib/i386-linux-gnu/libmlt.so.6

3 0xb7fa048e in mlt_factory_producer () from /usr/lib/i386-linux-gnu/libmlt.so.6

4 0xb2004950 in ?? () from /usr/lib/i386-linux-gnu/mlt/libmltcore.so

5 0xb2004c5b in producer_loader_init () from /usr/lib/i386-linux-gnu/mlt/libmltcore.so

6 0xb7fa0ec6 in mlt_repository_create () from /usr/lib/i386-linux-gnu/libmlt.so.6

7 0xb7fa048e in mlt_factory_producer () from /usr/lib/i386-linux-gnu/libmlt.so.6

8 0xb20061a6 in producer_melt_init () from /usr/lib/i386-linux-gnu/mlt/libmltcore.so

9 0xb7fa0ec6 in mlt_repository_create () from /usr/lib/i386-linux-gnu/libmlt.so.6

10 0xb7fa048e in mlt_factory_producer () from /usr/lib/i386-linux-gnu/libmlt.so.6

11 0x80001c9b in main ()

1 Attachments

Discussion

  • Dan Dennedy
    Dan Dennedy
    2014-04-12

    There are some hard-coded limits to the line length and number of lines in the code for parsing .melt files. I can increase these limits, but then there is still a bug with the new limit. I am not volunteering to providing a fully dynamically-allocated solution for .melt files. One way to fix this is to remove support for .melt file and make people use MLT XML or scripting language with MLT bindings. What do you think? Should I simply increase the line limit; would 10000 be OK?

     
  • mike morrison
    mike morrison
    2014-04-13

    Thanks. You could also put in a check to make sure the line length and number of lines does not exceed the buffer sizes. If either do, you could display an error message. You could inform the user that they can work around the .melt file limits by using mlt xml or a scripting language.

    I will have a look at the mlt xml format.

     
  • Dan Dennedy
    Dan Dennedy
    2014-04-13

    • status: open --> accepted
     
  • Dan Dennedy
    Dan Dennedy
    2014-04-13

    Fixed in git commit 0d01753 by adding bounds checks, issuing warnings, and increasing max lines to 100000. I will close this ticket after the next release.

     
  • Dan Dennedy
    Dan Dennedy
    2014-06-30

    • status: accepted --> closed