segfault with 1.3.44 and graphlcd 0.1.3

Message ID 1142771837.5192.7.camel@wopr.deltab.de
State New
Headers

Commit Message

Andreas Brachold March 19, 2006, 12:37 p.m. UTC
  Hi,

Am Sonntag, den 19.03.2006, 13:20 +0100 schrieb Friedhelm Büscher:
> with vanilla vdr-1.3.44 and graphlcd-0.1.3 i get a segfault at startup.
> graphlcd is configured to use the GU140X32F Driver. a gdb-backtrace says:
> 
> (gdb) bt
> #0  0xb7d31e84 in mallopt () from /lib/tls/libc.so.6
> #1  0xb7d30dcb in free () from /lib/tls/libc.so.6
> #2  0xb7eb0d23 in operator delete () from /usr/lib/libstdc++.so.5
> #3  0xb7eb0d7f in operator delete[] () from /usr/lib/libstdc++.so.5
> #4  0xb7c31e38 in GLCD::cDriverGU140X32F::DeInit (this=0xb7df0e80) at
> gu140x32f.c:219
> #5  0xb7c6cfcf in cPluginGraphLCD::~cPluginGraphLCD () from
> ./PLUGINS/lib/libvdr-graphlcd.so.1.3.44
> #6  0x080d6068 in cDll::~cDll ()
> #7  0x0810b13b in cListBase::Del ()
> #8  0x080d7097 in cPluginManager::Shutdown ()
> #9  0x0810dadc in main ()


This could be only a secondary effect.
I attacted a patch avoid this segmentation fault.


But, don't ask my why cPluginManager::Shutdown is called at statup.
You see maybe more informations at syslog.



Regards,
Andreas
  

Comments

Friedhelm Büscher March 19, 2006, 2:36 p.m. UTC | #1
Different, but not better. vdr simply ends without doing anything.

since there is no coredump, i tried a strace with follow threads. I
uploaded the strace-output to

http://steckrue.be/vdr_debug.tbz

Just 4 Info, syslog says nothing:

Mar 19 15:35:41 localhost vdr: [3844] VDR version 1.3.44 started
Mar 19 15:35:41 localhost vdr: [3844] loading plugin:
./PLUGINS/lib/libvdr-graphlcd.so.1.3.44
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/setup.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/sources.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/diseqc.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/channels.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/timers.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/commands.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/reccmds.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/svdrphosts.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/remote.conf
Mar 19 15:35:41 localhost vdr: [3844] loading /video0/keymacros.conf
Mar 19 15:35:44 localhost vdr: [3844] found 1 video device
Mar 19 15:35:44 localhost vdr: [3844] initializing plugin: graphlcd
(0.1.3): Output to graphic LCD
Mar 19 15:35:44 localhost vdr: [3844] graphlcd: No config file
specified, using default (/etc/graphlcd.conf).
Mar 19 15:35:44 localhost vdr: [3844] graphlcd: WARNING: No display
specified, using first one (gu140x32f).
Mar 19 15:35:46 localhost vdr: [3844] deleting plugin: graphlcd
Mar 19 15:35:47 localhost vdr: [3844] exiting


everything works wonderfull, if using vdr-1.3.43 ..


regards,
Friedhelm.


Andreas Brachold wrote:
> Hi,
> 
> Am Sonntag, den 19.03.2006, 13:20 +0100 schrieb Friedhelm Büscher:
>> with vanilla vdr-1.3.44 and graphlcd-0.1.3 i get a segfault at startup.
>> graphlcd is configured to use the GU140X32F Driver. a gdb-backtrace says:
>>
>> (gdb) bt
>> #0  0xb7d31e84 in mallopt () from /lib/tls/libc.so.6
>> #1  0xb7d30dcb in free () from /lib/tls/libc.so.6
>> #2  0xb7eb0d23 in operator delete () from /usr/lib/libstdc++.so.5
>> #3  0xb7eb0d7f in operator delete[] () from /usr/lib/libstdc++.so.5
>> #4  0xb7c31e38 in GLCD::cDriverGU140X32F::DeInit (this=0xb7df0e80) at
>> gu140x32f.c:219
>> #5  0xb7c6cfcf in cPluginGraphLCD::~cPluginGraphLCD () from
>> ./PLUGINS/lib/libvdr-graphlcd.so.1.3.44
>> #6  0x080d6068 in cDll::~cDll ()
>> #7  0x0810b13b in cListBase::Del ()
>> #8  0x080d7097 in cPluginManager::Shutdown ()
>> #9  0x0810dadc in main ()
> 
> 
> This could be only a secondary effect.
> I attacted a patch avoid this segmentation fault.
> 
> 
> But, don't ask my why cPluginManager::Shutdown is called at statup.
> You see maybe more informations at syslog.
> 
> 
> 
> Regards,
> Andreas
> 
> 
> ------------------------------------------------------------------------
> 
> Index: gu140x32f.c
> ===================================================================
> --- gu140x32f.c	(Revision 58)
> +++ gu140x32f.c	(Arbeitskopie)
> @@ -95,7 +95,9 @@
>  
>  
>  cDriverGU140X32F::cDriverGU140X32F(cDriverConfig * config)
> -:	config(config)
> +: config(config)
> +, m_pDrawMem(0)
> +, m_pVFDMem(0)
>  {
>  	oldConfig = new cDriverConfig(*config);
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Andreas Brachold March 19, 2006, 3:09 p.m. UTC | #2
Am Sonntag, den 19.03.2006, 15:36 +0100 schrieb Friedhelm Büscher:
> Different, but not better. vdr simply ends without doing anything.
> 
> since there is no coredump, i tried a strace with follow threads. I
> uploaded the strace-output to
> 
> http://steckrue.be/vdr_debug.tbz
> 

------------
open("/video0/plugins/graphlcd/fonts.conf", O_RDONLY) = -1 ENOENT (No
such file or directory)
gettid()                                = 3192
mprotect(0xb6787000, 8192, PROT_READ|PROT_WRITE) = 0
time([1142778548])                      = 1142778548
rt_sigaction(SIGPIPE, {0xb7e36a70, [], 0}, {SIG_DFL}, 8) = 0
send(3, "<11>Mar 19 15:29:08 vdr: [3192] graphlcd plugin: ERROR: Could
not load /video0/plugins/graphlcd/fonts.conf!\n", 108, 0) = 108
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
------------





You haven't read release notes to graphlcd 0.1.3 !?
At strace and probably at syslog pointed that 
vdr/plugins/graphlcd/fonts.conf are missed !


Here a sample file, which i use for a gu140x32f.

#> cat /etc/vdr/plugins/graphlcd/fonts.conf
Large Font = fnt:fnt7x7.fnt
Normal Font = fnt:fnt6x6.fnt
Small Font = fnt:f5n.fnt
Symbol Font = fnt:sym7.fnt






Regards,
Andreas
  
Friedhelm Büscher March 19, 2006, 4:04 p.m. UTC | #3
seems to be an issue of RTFM.

Sorry.



Andreas Brachold wrote:
> Am Sonntag, den 19.03.2006, 15:36 +0100 schrieb Friedhelm Büscher:
>> Different, but not better. vdr simply ends without doing anything.
>>
>> since there is no coredump, i tried a strace with follow threads. I
>> uploaded the strace-output to
>>
>> http://steckrue.be/vdr_debug.tbz
>>
> 
> ------------
> open("/video0/plugins/graphlcd/fonts.conf", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> gettid()                                = 3192
> mprotect(0xb6787000, 8192, PROT_READ|PROT_WRITE) = 0
> time([1142778548])                      = 1142778548
> rt_sigaction(SIGPIPE, {0xb7e36a70, [], 0}, {SIG_DFL}, 8) = 0
> send(3, "<11>Mar 19 15:29:08 vdr: [3192] graphlcd plugin: ERROR: Could
> not load /video0/plugins/graphlcd/fonts.conf!\n", 108, 0) = 108
> rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
> ------------
> 
> 
> 
> 
> 
> You haven't read release notes to graphlcd 0.1.3 !?
> At strace and probably at syslog pointed that 
> vdr/plugins/graphlcd/fonts.conf are missed !
> 
> 
> Here a sample file, which i use for a gu140x32f.
> 
> #> cat /etc/vdr/plugins/graphlcd/fonts.conf
> Large Font = fnt:fnt7x7.fnt
> Normal Font = fnt:fnt6x6.fnt
> Small Font = fnt:f5n.fnt
> Symbol Font = fnt:sym7.fnt
> 
> 
> 
> 
> 
> 
> Regards,
> Andreas
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> 
>
  
Stefan Taferner March 19, 2006, 5:45 p.m. UTC | #4
Am Sonntag, 19. März 2006 17:04 schrieb Friedhelm Büscher:
> seems to be an issue of RTFM.

IMHO software must not terminate without comment. The plugin
should at least print an error message upon exit in this case.

--Stefan
  
Andreas Regel March 21, 2006, 7:03 p.m. UTC | #5
Stefan Taferner wrote:
> Am Sonntag, 19. März 2006 17:04 schrieb Friedhelm Büscher:
>> seems to be an issue of RTFM.
> 
> IMHO software must not terminate without comment. The plugin
> should at least print an error message upon exit in this case.
> 
> --Stefan

In fact, it does print a message to syslog in this case.

Andreas
  

Patch

Index: gu140x32f.c
===================================================================
--- gu140x32f.c	(Revision 58)
+++ gu140x32f.c	(Arbeitskopie)
@@ -95,7 +95,9 @@ 
 
 
 cDriverGU140X32F::cDriverGU140X32F(cDriverConfig * config)
-:	config(config)
+: config(config)
+, m_pDrawMem(0)
+, m_pVFDMem(0)
 {
 	oldConfig = new cDriverConfig(*config);