The segmentation fault occurs everytime when calling g_fprintf() in
update-mime-database.c, first on line 3849.
See the gdb output below (on a build with debugging symbols).
Could this be related to libglib2 somehow not being fully configured yet
when first installing shared-mime-info?
I don't understand, but I effectively worked around the problem by
replacing g_fprintf() with standard printf().

(gdb) break update-mime-database.c:3624
Breakpoint 1 at 0x40a6d2: file update-mime-database.c, line 3624.
(gdb) run /usr/share/mime
Starting program: /usr/bin/update-mime-database.real /usr/share/mime
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=2, argv=0x7fffffffe3a8) at
update-mime-database.c:3624
3624                    g_fprintf(globs,
(gdb) bt
#0  main (argc=2, argv=0x7fffffffe3a8) at update-mime-database.c:3624
(gdb) print globs
$1 = (FILE *) 0x64c600
(gdb) print globs_path
$2 = 0x21a7ac0 "/usr/share/mime/globs.new"
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77f5191 in g_fprintf () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0  0x00007ffff77f5191 in g_fprintf () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x000000000064c600 in ?? ()
#2  0x000000000040a6eb in main (argc=2, argv=0x7fffffffe3a8) at
update-mime-database.c:3624

Reply via email to