Xfdiff4 crashes when it was launched from Xffm
edscott wilson garcia
edscott at xfce.org
Wed Feb 23 14:48:38 CET 2005
El mié, 23-02-2005 a las 15:33 +0900, Daichi Kawahata escribió:
> Hi,
>
> I've compiled xffm CVS-HEAD (4.3.0.26) with gcc 3.4.3 on IRIX 6.5.
>
> >From command-line/desktop-menu, xfdiff4 is launched ordinary, while
> it causes segfault against xffm itself when it was launched from
> 'Main menu -> Tools -> Differences'. At that time, message
>
> xffm Core dump --> file main.c: line 85 (finishit): should not
> be reached
>
> was logged in ~/.cache/xfce4/xffm/xffm_error.log.
>
> Backtrace (manually newlined) is,
>
> #0 0x0fa57e98 in _prctl () at /xlv46/6.5.22m/work/irix/lib/libc/
> libc_n32_M4/proc/prctl.s:15
> 15 /xlv46/6.5.22m/work/irix/lib/libc/libc_n32_M4/proc/prctl.s:
> No such file or directory.
> in /xlv46/6.5.22m/work/irix/lib/libc/libc_n32_M4/proc/prctl.s
> (gdb) bt full
> #0 0x0fa57e98 in _prctl () at /xlv46/6.5.22m/work/irix/lib/libc/
> libc_n32_M4/proc/prctl.s:15
> No locals.
> #1 0x0c06f974 in pthread_kill () at sig.c:149
> No locals.
> #2 0x0c070988 in _SGIPT_libc_raise () at sig.c:660
> No locals.
> #3 0x0fade6c4 in _raise () at raise.c:26
> No locals.
> #4 0x0fa7c038 in abort () at abort.c:52
> No locals.
> #5 0x10004c70 in finishit (sig=263532792) at main.c:85
> green = 0
> __PRETTY_FUNCTION__ = "finishit"
> #6 0x0c070260 in _SGIPT_libc_sigaction () from /usr/lib32/libpthread.so
> No locals.
> Current language: auto; currently asm
> (gdb) list
> 85 assert_not_reached();
> 86 }
> 87 exit(1);
> 88 }
> 89 }
> 90
> 91
> 92 static gboolean setup_dir(gchar *path){
> 93 struct stat st;
> 94 if(stat(path, &st) < 0)
>
> Is there any hint?
Apparently the backtrace is not shedding much light on the cause of the
problem, but from your description of how to reproduce the situation
occurs in xffm/libs/xfdiff.c at function do_diff():
static void do_diff(void)
{
char *argv[4];
GError *error = NULL;
gint tree_id = get_active_tree_id();
GtkTreeSelection *selection =
tree_details->treestuff[tree_id].selection;
const gchar *working_directory=g_get_home_dir();
if (!working_directory) working_directory=g_get_tmp_dir();
diff_selected = 0;
diff_file[0] = diff_file[1] = NULL;
gtk_tree_selection_selected_foreach(selection, tag_select, NULL);
argv[0] = "xfdiff4";
argv[1] = diff_file[0];
argv[2] = diff_file[1];
argv[3] = NULL;
chdir(GETWD);
if (!g_spawn_async (working_directory,argv,NULL,
G_SPAWN_SEARCH_PATH,NULL,NULL,NULL,&error)){
gchar *msg = g_strcompress (error->message);
print_diagnostics("xfce/error_icon",msg,":\n",argv[0],NULL);
g_free (msg);
g_error_free (error);
}
}
The only situation I can imagine could cause the results you see is that
when you perform the action, there is something borked with the
selection. Could you try this patch under the same selection
circumstances?
--- /usr/home/common/CVS/lunar/xfce_4_2/xffm/libs/xfdiff.c.orig
2004-09-23 12:11:37.000000000 -0500
+++ /usr/home/common/CVS/lunar/xfce_4_2/xffm/libs/xfdiff.c 2005-02-23
07:41:56.000000000 -0600
@@ -56,7 +56,7 @@
if(diff_selected >= 2)
return;
gtk_tree_model_get(treemodel, iter, ENTRY_COLUMN, &en, -1);
- diff_file[diff_selected++] = en->path;
+ if (en) diff_file[diff_selected++] = en->path;
return;
}
thanks,
Edscott
More information about the Xfce4-dev
mailing list