Enlightenment CVS committal Author : lordchaos Project : e17 Module : proto
Dir : e17/proto/entropy/src Modified Files: Makefile.am main.c Added Files: entropy_alert.c Log Message: * Add an Enlightenment-Style crash window, for debugging purposes. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- Makefile.am 8 Dec 2005 09:01:34 -0000 1.4 +++ Makefile.am 3 Jan 2006 10:48:23 -0000 1.5 @@ -18,7 +18,8 @@ entropy_file.c \ entropy_debug.c \ entropy_config.c \ - entropy_gui.c + entropy_gui.c \ + entropy_alert.c entropy_CC = @PTHREAD_CC@ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/main.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- main.c 2 Jan 2006 12:00:29 -0000 1.2 +++ main.c 3 Jan 2006 10:48:23 -0000 1.3 @@ -5,22 +5,42 @@ #include "include/plugin_base.h" #include <Ecore.h> #include "include/entropy.h" -#include <Ewl.h> +#include "entropy_alert.h" +#include <Ecore_X.h> void entropy_sigseg_act(int x, siginfo_t *info, void *data) { - void *array[255]; - size_t size; - write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); - usleep(50000000); + ecore_x_pointer_ungrab(); + ecore_x_keyboard_ungrab(); + ecore_x_ungrab(); + ecore_x_sync(); + + entropy_alert_show("This is very bad. Entropy has segfaulted.\n" + "This is not meant to happen and is likely a sign of a\n" + "bug in Entropy or the libraries it relies on.\n" + "\n" + "You can gdb attach to this process now to try debug it\n" + "or you could exit, or just hit restart to try and get\n" + "your file manager back the way it was. This may not always\n" + "work perfectly, but it is the best we can do for now.\n" + "\n" + "Please help us debug this by compiling Entropy and\n" + "all its dependency libraries with gdb debugging enabled\n" + "and gdb attach to Entropy when this happens and try figure out\n" + "what's going on and set us gdb backtraces, variable dumps\n" + "etc."); + + exit (-11); } int main() { + entropy_alert_init(NULL); + struct sigaction action; action.sa_sigaction = entropy_sigseg_act; @@ -29,9 +49,7 @@ sigaction(SIGSEGV, &action, NULL); - entropy_core* core = entropy_core_init(); - - for (;;) {} + entropy_core_init(); return 0; } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs