ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] RP freezes and crashes after `C-t : defwinname RET'


From: Shawn Betts
Subject: Re: [RP] RP freezes and crashes after `C-t : defwinname RET'
Date: Thu Aug 26 13:05:19 2004
User-agent: SquirrelMail/1.4.0

> Trent Buck <address@hidden> writes:
>
>> Quoth Alexander Voeltz on or about 2004-08-25:
>> >
>> > When I start ratpoison without a `~/.ratpoisonrc' file present,
>> > then (before doing anything else) type `C-t : defwinname RET',
>> > ratpoison freezes for 5-10 seconds (i.e., nothing happens, no keys are
>> > recognized), and crashes after that, throwing me back to my XDM
>> prompt.
>>
>> I run RP (customized) on Debian, so I may be able to help.
>
> Actually, I can reproduce this on two different systems: home (Debian)
> and uni (SuSE, the one I am using at the moment).
>
>> * What version of XFree86 are you running?
>
> Here it is 4.3.0.1, at home I don't know.
>
>> * Can you compile with debugging turned on, and send (me | the list)
>> the output when RP crashes?
>>
>> (If you need a walkthru to enable debugging, i'll post one)
>
> Shawn already sent me some instructions.  Thanks for this.  Here's the
> output of gdb:
>
> ---snip---
> Program received signal SIGSEGV, Segmentation fault.
> 0x40157f7e in vfprintf () from /lib/libc.so.6
> (gdb) bt
> #0  0x40157f7e in vfprintf () from /lib/libc.so.6
> #1  0x401738ca in vsnprintf () from /lib/libc.so.6
> #2  0x08054c5f in xvsprintf (fmt=0x805bc87 " %s: %s ", ap=0xbffffa90)
>     at main.c:120
> #3  0x0805098a in marked_message_printf (mark_start=0, mark_end=0,
>     fmt=0x805bc87 " %s: %s ") at bar.c:202

yeah this function is bogus! Who wrote this thing?? :)

I'm guessing the reason it's crashing is because:

for (i=0; set_vars[i].var; i++)
    {
      if (!strcmp (var, set_vars[i].var))
        {
          result = set_vars[i].set_fn (rest);
==>       free (var);
          /* If rest is not NULL then result must be NULL. */
          if (rest == NULL)
            {
              if (interactive)
                {
                  marked_message_printf (0, 0, " %s: %s ", var, result);
                  free (result);
                  return NULL;
                }
              else
                return result;
            }
          free (rest);
          return NULL;
        }
    }

The above line frees var but then it's used a couple lines later. Should
be pretty easy to fix.

Shawn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]