After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 666431 - Totem crashes when run with args
Totem crashes when run with args
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
3.2.x
Other Linux
: High critical
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 667630 668500 669400 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-12-18 00:39 UTC by Estêvão Samuel Procópio Amaral
Modified: 2012-02-08 13:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace with debug symbols (2.33 KB, text/plain)
2011-12-18 20:58 UTC, Estêvão Samuel Procópio Amaral
  Details
Patch for totem_options_process_for_server (909 bytes, patch)
2011-12-18 21:32 UTC, Estêvão Samuel Procópio Amaral
none Details | Review

Description Estêvão Samuel Procópio Amaral 2011-12-18 00:39:49 UTC
When you start totem with any parameter (--fullscreen, --pause, etc) it segfaults.

I'm running 3.2.1-2 on a Debian sid/experimental i686 machine.

The backtrace to the segfault is:

Program received signal SIGSEGV, Segmentation fault.
__libc_free (mem=0x2) at malloc.c:3709
3709	malloc.c: Arquivo ou diretório não encontrado.
	in malloc.c
(gdb) bt
  • #0 __libc_free
    at malloc.c line 3709
  • #1 standard_free
    at /build/buildd-glib2.0_2.30.2-4-i386-4jiwMk/glib2.0-2.30.2/./glib/gmem.c line 101
  • #2 g_free
    at /build/buildd-glib2.0_2.30.2-4-i386-4jiwMk/glib2.0-2.30.2/./glib/gmem.c line 263
  • #3 g_list_foreach
    at /build/buildd-glib2.0_2.30.2-4-i386-4jiwMk/glib2.0-2.30.2/./glib/glist.c line 938
  • #4 totem_options_process_for_server
    from /usr/lib/libtotem.so.0
  • #5 _start

Note the g_free on mem=0x2. This bt is for "totem --pause". Note that pause is the command number 0x2 in the TotemRemoteCommand enum.

When running "totem --fullscreen" the g_free tries to free the address 0xb. Taking a look at the function totem_options_process_for_server (totem-options.c line 214) there's a g_list_foreach calling g_free on every list data. The problem is that list data are not pointers, but integers. This way, to free the GList totem should use only g_list_free and should not call g_free for each item on the list.
Comment 1 André Klapper 2011-12-18 20:22:17 UTC
Thanks for taking the time to report this bug.
Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols for totem? Please see http://live.gnome.org/GettingTraces for more information on how to do so and reopen this bug or report a new one. Thanks in advance!
Comment 2 Estêvão Samuel Procópio Amaral 2011-12-18 20:58:27 UTC
Created attachment 203806 [details]
Backtrace with debug symbols

This is the backtrace with debugging symbols. Sorry for not sending it this way earlier.
Comment 3 Estêvão Samuel Procópio Amaral 2011-12-18 21:32:25 UTC
Created attachment 203807 [details] [review]
Patch for totem_options_process_for_server

This patch fixes the problem.
Comment 4 Estêvão Samuel Procópio Amaral 2011-12-18 21:36:32 UTC
Reopening the bug with more information about the problem.

If you need anything, just ask! ;]
Comment 5 Bastien Nocera 2011-12-19 10:34:29 UTC
Cheers for the patch

commit 71408a90d504b666c74e81260e8761387dc64ce5
Author: Estêvão Samuel Procópio <tevaum@gmail.com>
Date:   Sun Dec 18 19:29:41 2011 -0200

    totem-options: Should not free commands list data.
    
    In totem_options_process_for_server the commands GList holds
    integers and freeing those integers leads to a segfault.
    Only the GList needs to be freed.
    
    Closes: bgo#666431
Comment 6 Bastien Nocera 2012-01-10 16:08:10 UTC
*** Bug 667630 has been marked as a duplicate of this bug. ***
Comment 7 psymole 2012-01-17 18:12:50 UTC
Hello,

any ideas on how can I get this fix, my install hasn't been updated by ubuntu and I still have to deal with this issue.

thanks
Comment 8 Philip Withnall 2012-01-17 19:10:38 UTC
The fix will be in version 3.2.2 (which might be released at some point, but I don't think an exact date has been chosen).

Alternatively, you could file a bug against the Totem package on launchpad.net, and get the Ubuntu packagers to apply the patch from this bug report to their Totem package.
Comment 9 Philip Withnall 2012-02-05 13:49:22 UTC
*** Bug 669400 has been marked as a duplicate of this bug. ***
Comment 10 Bastien Nocera 2012-02-08 13:14:53 UTC
*** Bug 668500 has been marked as a duplicate of this bug. ***