On Fri, 22 Oct 99 19:33:20, Asbjoern Pettersen wrote:
>>
>>I 'cvs update'd again, recompiled, and everything works fine now. I can
>>even run plugins which use fonts! However, clicking twice on the font
>>button will still crash script-fu, although selecting a font and running
>>the script will not crash until the script is finished running and script
>>fu cleans up its widgets. This makes script-fu functional for me again,
>>even if I have to restart the Gimp every time I run a script that uses a
>>fontselector :)
>
>I've been debug on OS/2 version and it crash when the font dialog is destroyed.
>
>It's in function script_fu_cleanup_widgets()
>
> case SF_FONT:
> if (script->arg_values[i].sfa_font.dialog != NULL)
> {
> /* crash HERE !!*/
> gtk_widget_destroy (script->arg_values[i].sfa_font.dialog);
> script->arg_values[i].sfa_font.dialog = NULL;
> break;
>
>The dialog pointer is correct so there can be a bug in gtk_widget_destroy()
>for GTK 1.2.5/1.2.6
>
>If you comment the destroy call out it works normally!
>
>So far so good.
>
>Asbjoern
Dowload all software and compiled an IRIX version of gimp.
The bug is in GLIB's 1.2.6 gcache.c ! node is NULL !?
My patch is inside #if 1.
void
g_cache_remove (GCache *cache,
gpointer value)
{
GRealCache *rcache;
GCacheNode *node;
gpointer key;
g_return_if_fail (cache != NULL);
rcache = (GRealCache*) cache;
key = g_hash_table_lookup (rcache->value_table, value);
node = g_hash_table_lookup (rcache->key_table, key);
#if 1
/* patch for removing GIMP scrip-fu crash */
if (node == NULL)
return;
#endif
node->ref_count -= 1;
if (node->ref_count == 0)
{
g_hash_table_remove (rcache->value_table, value);
g_hash_table_remove (rcache->key_table, key);
(* rcache->key_destroy_func) (key);
(* rcache->value_destroy_func) (node->value);
g_cache_node_destroy (node);
}
}
***********************************************************
* Asbj�rn Pettersen Phone work: +47 77 66 08 91 *
* Kongsberg Spacetec a.s Phone home: +47 77674022 *
* Telefax: +47 77 65 58 59 *
* Prestvannveien 38 www:http://www.spacetec.no *
* N-9005 Tromsoe, Norway email:[EMAIL PROTECTED] *
***********************************************************