On Sat, Sep 13, 2014 at 01:00:58PM +0100, Dominik Vogt wrote:
> On Sat, Sep 13, 2014 at 11:44:30AM +0100, Thomas Adam wrote:
> > I'm showing the fact that this NearestNeigbour function is run from
> > MvwmEvent usually, although enabling that by default causes the segfault
> > to happen more quickly so I've disabled that.
> >
>
> Do you have a reliable way to trigger this? I don't know what to do.
I've spent the whole day on this and am going cross-eyed. I've narrowed
down the segfault case to just calling the "All" conditional command.
In the case of an actual recognised command, such as:
All (CurrentDesktop) Nop
This works fine; no corruption at all.
With something like this though:
All (CurrentDesktop) CommandThatDoesntExist
Then this is where the corrpution and segfault sets in. In
conditional.c:CMD_All(), the All command will enumerate the windows for
the given condition. In both cases of supplying a command (whether it's
valid or not), we end up here:
for (i = 0; i < num; i++)
{
execute_function_override_window(
cond_rc, exc, restofline, pc, 0,
g[i]);
}
}
Where "num" is the total number of windows found for the given
condition, and hence will run a given command on each window.
Let's say there's six windows on the current desktop, and I use this
command which is invalid:
All (CurrentDesktop) CommandthatDoesntExist
First time round the loop, the command (restofline) is correctly found
to be invalid, and is printed as such. However, as soon as the comman
d is found to be invalid and there's more iterations to go through in
the for loop above, then restofline just contains garbage.
I do not see how this is possible since "restofline" is never touched in
__execute_command_line(). So I'm confused how there's corruption that's
setting in. I can't see how this has a bearing on the changes in
__execute_command_line().
Thoughts? Until I can solve this, I can't use mvwm. ;) I hope you'll
tell me the solution is so easy it's been staring me in the face for the
last six hours, but I don't see it.
Kindly,
-- Thomas Adam