"Schaaf, Jonathan P (GE Healthcare)" <jonathan.p.sch...@ge.com> writes:

>> Sorry, I've tried just setting LC_TYPE to ru_RU.UTF-8.
>> That doesn't seem to be sufficient to cause the problem.
>> Any more hint's would be helpful.
>
> My reproduction procedure involves more superstition than science, so
> it's probably less than helpful.  I can't get it to work myself when I
> move to a different computer, and can't find any identifiable settings
> that should have an impact:
>
> set LC_CTYPE, 
> start the gimp, 
> open a .jpg file, 
> use "save as" to save to a new filename, 
> accept the compression settings, 
> select file-> close, 
> then file->quit.  
>
> If that doesn't work the first time... save yourself some time and
> don't try again.  If it does work, it seems to repeat almost every
> time.
>
> I haven't figured out what's going on yet, but here are my observations so 
> far:
>
> (1) The LC_CTYPE environment variable is causing gimp/firefox/whatever
> to use names that are localized, which creates a name_list in
> Flocale.c.  This means that the LC_CTYPE variable does NOT need to be
> set when launching FVWM.
> (2) Just before the crash, I see two completely different functions causing 
> the same name_list to be freed.  
>        a) The first to free is within EWMH_WMName(), when it calls
> free_window_names(fw, True, False).  This ultimately frees
> fw->name.name_list.
>        b) The second free is within destroy_icon(), when it calls
> free_window_names(fw, False, True).  This ultimately frees
> fw->icon_name.name_list.
> 3) For reasons I do not yet understand, in the crash situation
> fw->icon_name and fw->name of a different window have an identical
> name_list.  When the second free of the list happens, fvwm crashes.
>
> I'll keep tinkering with this in my spare time, and I'll see what I can 
> figure out.

There's a bit of a mess in there, but every free should be accompanied
by a setting of the pointer to the freed item being set to NULL or in some
cases "Untitled".  As long as the areas are checked before free,
everything should be okay.

There's also the case where name and name_list represent the same
object.  That's why we see this in Flocale.c:

if (ptext->name != NULL && ptext->name != *ptext->name_list)
  XFree(ptext->name);

name and name_list represent the same thing so it only wants
to free one of them.

Like I say, a bit of a mess.  But I need to be able to create the
problem before making a fix.  So far I'm unable to even get into
the code, but I'm American and hopeless with foreign languages.
I did get Russian in my title bars, but no tracing of the area
with the abend.

If this is inconsistent, efence might help.  It will report
problems even when it doesn't crash.

-- 
Dan Espen

Reply via email to