LCDproc development and user support list

Text archives Help


[Lcdproc] CVS: Segmentation fault caused by reporting patch? (was: CVS: segfault)


Chronological Thread 
  • From: reenoo AT gmx.de (Rene Wagner)
  • Subject: [Lcdproc] CVS: Segmentation fault caused by reporting patch? (was: CVS: segfault)
  • Date: Sat Dec 1 12:29:02 2001

Hi all!

To me the reporting patch seems to be the problem.
The code as of before the reporting patch works fine.

Rene Wagner
<reenoo AT gmx.de>
wrote:
> I don't know why, but the latest CVS version segfaults on my system.
> According to gdb it's lcdm001_num() that causes this.
>
> int y, dx;
>
> debug (RPT_DEBUG, "LCDM001: Writing big number \"%d\" at x = %d",
> num, x);
>
> for (y = 1; y < 5; y++)

everything seems to work fine until the following line (I added some printf
functions)

> for (dx = 0; dx < 3; dx++)

When running for the first time the only thing it does is to set dx to 0,
right?
So it just can't cause a segmentation fault :(
dx is a local variable, not even a pointer :(

> lcdm001_chr (x + dx, y, num_icon[num][y-1][dx])

LCDd does not even seem to get as far as this line, so the num_icon array
shouldn't be the problem.

...

> Joris,
>
> in sed1330.c you used a private_data struct to store data in. Should I do
> the same? Might that solve my problems?

My driver uses the private_data struct as well now, but still segfaults at
the same place.

>
> Another thing:
> What does this mean?
> screenlist: Didn't find screen 0x 805d9d0!
>
> Doesn't sound good to me :(

It seems like there's a bogus pointer or something.

But the most strange thing is that after
./configure --enable-debug
LCDd doesn't crash any more :(

Joris,

What part of your changes (reporting, etc.) might have caused all this
trouble?

This is the output of gdb:
[reno@Antarktis 20011201.reno]$ gdb server/LCDd
GNU gdb 20010813 (MI_OUT)
(gdb) run -c LCDd.conf
Starting program: /home/reno/lcd/lcdproc-cvs/20011201.reno/server/LCDd -c
LCDd.conf
LCDd version dev starting
Set report level to 3, output to stderr
listening for queries on port 13666
Server running in foreground
added a screen (K) to the display

Program received signal SIGSEGV, Segmentation fault.
0x08053c1b in lcdm001_num ()
(gdb) bt
#0 0x08053c1b in lcdm001_num ()
#1 0x0804f729 in draw_frame ()
#2 0x0804ed66 in draw_screen ()
#3 0x0804d724 in do_mainloop ()
#4 0x0804c998 in main ()
#5 0x4008a5b0 in __libc_start_main () from /lib/libc.so.6
(gdb)

Regards,

Rene



  • [Lcdproc] CVS: Segmentation fault caused by reporting patch? (was: CVS: segfault), Rene Wagner, 12/01/2001

Archive powered by MHonArc 2.6.18.

Top of page