Dereferencing an Uninitialized Pointer (generated by vala)

Bug #769531 reported by Guido Trentalancia
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME DVB Daemon
Fix Released
Undecided
Unassigned

Bug Description

gnome-dvb-daemon crashes on startup.

Starting program: /usr/bin/gnome-dvb-daemon
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffed6d8700 (LWP 13244)]
[New Thread 0x7fffeced7700 (LWP 13245)]
[New Thread 0x7fffe7fff700 (LWP 13246)]
[New Thread 0x7fffe77fe700 (LWP 13248)]

Program received signal SIGSEGV, Segmentation fault.
0x000000000043fa77 in dvb_channel_get_Sid (self=0x81de70) at src/Channel.c:351
351 result = self->priv->sid;
(gdb) where
#0 0x000000000043fa77 in dvb_channel_get_Sid (self=0x81de70) at src/Channel.c:351
#1 0x00000000004618df in dvb_schedule_restore (self=0x81d620) at src/Schedule.c:433
#2 _dvb_schedule_restore_gsource_func (self=0x81d620) at src/Schedule.c:2203
#3 0x00007ffff481879c in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#4 0x00007ffff4819050 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
#5 0x00007ffff48196aa in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#6 0x0000000000452a8a in main_main (args=0x7fffffffe338, args_length1=1) at src/Main.c:837
#7 0x0000000000452ac2 in main (argc=1, argv=0x7fffffffe338) at src/Main.c:846
(gdb) print self
$1 = (DVBChannel *) 0x81de70
(gdb) print self->priv
$2 = (DVBChannelPrivate *) 0xaaaaaaaaaaaaaaaa

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Which version are you running?

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :

Same problem here with dvb-daemon 0.1.23 after upgrade to glib 2.28 under gentoo:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000470e0d in dvb_channel_get_Sid (self=0x823b40) at src/Channel.c:351
351 result = self->priv->sid;
(gdb) where
#0 0x0000000000470e0d in dvb_channel_get_Sid (self=0x823b40) at src/Channel.c:351
#1 0x0000000000491add in dvb_schedule_restore (self=<value optimized out>) at src/Schedule.c:496
#2 _dvb_schedule_restore_gsource_func (self=<value optimized out>) at src/Schedule.c:2308
#3 0x00007ffff5356ff9 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#4 0x00007ffff535b538 in ?? () from /usr/lib64/libglib-2.0.so.0
#5 0x00007ffff535b9fd in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#6 0x0000000000481ead in main_main (args=0x7fffffffdff8, args_length1=1) at src/Main.c:677
#7 0x00007ffff4fd8bbd in __libc_start_main () from /lib64/libc.so.6
#8 0x000000000041ade9 in _start ()

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Could you please describe the steps that lead to this error?

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :

The error occurs right after program start. It must have something to do with epg, because there is no error if I start with --disable-epg-scanner (see attachment).

GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/local/bin/gnome-dvb-daemon...done.
(gdb) run
Starting program: /usr/local/bin/gnome-dvb-daemon
[Thread debugging using libthread_db enabled]
** Message: Main.vala:59: Creating new Manager D-Bus service
** Message: Main.vala:80: Creating new RecordingsStore D-Bus service

** (gnome-dvb-daemon:4339): CRITICAL **: RecordingsStore.vala:70: Recording with id 2 already available

** (gnome-dvb-daemon:4339): CRITICAL **: RecordingsStore.vala:70: Recording with id 3 already available

** (gnome-dvb-daemon:4339): CRITICAL **: RecordingsStore.vala:70: Recording with id 1 already available

** (gnome-dvb-daemon:4339): CRITICAL **: RecordingsStore.vala:70: Recording with id 6 already available

** (gnome-dvb-daemon:4339): CRITICAL **: RecordingsStore.vala:70: Recording with id 5 already available
** Message: Main.vala:161: Restoring 2 device groups
[New Thread 0x7ffff2e05700 (LWP 4344)]
** Message: Manager.vala:448: Restoring timers of device group 1
[New Thread 0x7ffff1cdd700 (LWP 4345)]
** Message: Manager.vala:448: Restoring timers of device group 2

Program received signal SIGSEGV, Segmentation fault.
0x0000000000470e0d in dvb_channel_get_Sid (self=0x823b40) at src/Channel.c:351
351 result = self->priv->sid;

Revision history for this message
Guido Trentalancia (guido.trentalancia-deactivatedaccount) wrote :

version 0.1.90 (I have not tried other versions)

steps to reproduce: start gnome-dvb-daemon
how often it happens: always or almost always
notes: there might be bugs in the ttusb_dec driver as well (i've never managed to watch tv on linux using that device, it works fine on windows)

Revision history for this message
Guido Trentalancia (guido.trentalancia-deactivatedaccount) wrote :

and least but not last: it also happens when EPG scan is disabled.

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Could please create a core dump with gdb by running "generate-core-file" inside of gdb when the program crashes and upload it here.

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :

Core dump attached.

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Could you please check if the attached patch helps.

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :

Could you please provide a patch against 0.1.23. The git version does not compile on my system due to pygobject < 2.28.

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Please check if the attached patch works.

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :
Download full text (7.4 KiB)

Version 0.1.23 does not compile with patch from post #11:

make all-recursive
make[1]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23'
Making all in client
make[2]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client'
Making all in gnomedvb
make[3]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client/gnomedvb'
  CC userdirs/__userdirs_la-__userdirsmodule.lo
  CCLD __userdirs.la
make[3]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client/gnomedvb'
Making all in totem-plugin
make[3]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client/totem-plugin'
/usr/bin/intltool-merge ../../po dvb-daemon.totem-plugin.in dvb-daemon.totem-plugin -d -u -c ../../po/.intltool-merge-cache
Generating and caching the translation database
Merging translations into dvb-daemon.totem-plugin.
make[3]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client/totem-plugin'
make[3]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client'
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client'
make[2]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/client'
Making all in data
make[2]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data'
Making all in icons
make[3]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data/icons'
make[3]: Für das Ziel »all« ist nichts zu tun.
make[3]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data/icons'
make[3]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data'
LC_ALL=C /usr/bin/intltool-merge -d -u -c ../po/.intltool-merge-cache ../po gnome-dvb-control.desktop.in gnome-dvb-control.desktop
Found cached translation database
Merging translations into gnome-dvb-control.desktop.
LC_ALL=C /usr/bin/intltool-merge -d -u -c ../po/.intltool-merge-cache ../po gnome-dvb-setup.desktop.in gnome-dvb-setup.desktop
Found cached translation database
Merging translations into gnome-dvb-setup.desktop.
make[3]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data'
make[2]: Leaving directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/data'
Making all in po
make[2]: Entering directory `/home/bernhard/Desktop/gnome-dvb-daemon-0.1.23/po'
file=`echo ar | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file ar.po
file=`echo cs | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file cs.po
file=`echo da | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file da.po
file=`echo de | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file de.po
file=`echo el | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file el.po
file=`echo en_GB | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file en_GB.po
file=`echo es | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file es.po
file=`echo fi | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfmt -o $file fi.po
file=`echo fr | sed 's,.*/,,'`.gmo \
   && rm -f $file && /usr/bin/gmsgfm...

Read more...

Revision history for this message
Sebastian Pölsterl (sebp) wrote :

Sorry, that I missed. Try the new patch, please.

Revision history for this message
Bernhard D (bernhard-d-telering) wrote :

Patch from post #13 makes dvb-daemon 0.1.23 working again with epg-scanner enabled.
Thanks.

Changed in gnome-dvb-daemon:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.