>[root@mike bin]# ./gimp-1.3 >using MMX: yes >swapfile is: /big/tmp/gimpswap.30852 >swap add filename: /big/tmp/gimpswap.30852/n[Invalid UTF-8] >swapfile is still: (¹g@(¹g@/gimpswap.30852
I was just looking at the above text and suddenly realised that the path had turned to garbage in the third g_print line which I had put into base.c like this:-
void base_init (void) { gchar *swapfile; gchar *path;
#ifdef HAVE_ASM_MMX use_mmx = use_mmx && (intel_cpu_features() & (1 << 23)) ? 1 : 0; g_print ("using MMX: %s\n", use_mmx ? "yes" : "no"); #endif
toast_old_temp_files ();
/* Add the swap file */ if (base_config->swap_path == NULL) base_config->swap_path = g_strdup (g_get_tmp_dir ());
swapfile = g_strdup_printf ("gimpswap.%lu", (unsigned long) getpid ());
path = g_build_filename (base_config->swap_path, swapfile, NULL);
g_print ("swapfile is: %s\n", path);
g_free (swapfile);
tile_swap_add (path, NULL, NULL);
g_free (path);
paint_funcs_setup ();
g_print ("swapfile is still: %s\n", path); }
so for some reason the path is being messed up in the lines between my two added g_prints. Any advice?
Michael.
p.s. Just did a bit more testing and found that if I change the path to /tmp the I get this:-
swapfile is: /tmp/gimpswap.32180 swap add filename: /tmp/gimpswap.32180/n[Invalid UTF-8] swapfile is still: (¹g@(¹g@xxxxxxxxxxx
so it looks like that corruption eats into the path at some point during initialisation.