Dear developers,
since some weeks now I have trouble running elsa: The X server starts,
but elsa_client never comes up. I was able to hunt down the
error. Currently I am using rev 60908.
In elsa/src/daemin/elsa_server.c lines 135-142:
dirs = efreet_data_dirs_get();
EINA_LIST_FREE(dirs, path)
{
snprintf(buf, sizeof(buf), "%s/xsessions", path);
_elsa_server_scan_desktops(buf);
eina_stringshare_del(path);
}
efreet_shutdown();
The data structure dirs points to is freed, but the static variable
xdg_data_dirs (defined in efreet/src/lib/efreet_base.c:48) still points
to it. efreet_shutdown() leads to efreet/src/lib/efreet_base.c:87
IF_FREE_LIST(xdg_data_dirs,eina_stringshare_del);
The macro IF_FREE_LIST checks whether xdg_data_dirs is a NULL pointer
(which it is not) but not whether the Eina_List pointed to is already
freed and tries to free it again leading to a hang up of elsa. So I
suggest the following patch:
diff -Naur elsa/src/daemon/elsa_server.c
elsa.neu//src/daemon/elsa_server.c ---
elsa/src/daemon/elsa_server.c 2011-07-01 09:29:03.000000000
+0200 +++ elsa.neu//src/daemon/elsa_server.c 2011-06-26
12:35:35.000000000 +0200 @@ -122,7 +122,7 @@
_elsa_server_init_desktops() {
char buf[PATH_MAX];
- Eina_List *dirs;
+ Eina_List *dirs, *l;
const char *path;
efreet_init();
@@ -133,11 +133,12 @@
snprintf(buf, sizeof(buf), "%s/xsessions", efreet_data_home_get());
_elsa_server_scan_desktops(buf);
dirs = efreet_data_dirs_get();
- EINA_LIST_FREE(dirs, path)
+ //EINA_LIST_FREE(dirs, path)
+ EINA_LIST_FOREACH(dirs, l, path)
{
snprintf(buf, sizeof(buf), "%s/xsessions", path);
_elsa_server_scan_desktops(buf);
- eina_stringshare_del(path);
+ //eina_stringshare_del(path);
}
efreet_shutdown();
}
Another correction should be done to elsa/src/daemon/elsa.c:
diff -Naur elsa/src/daemon/elsa.c elsa.neu//src/daemon/elsa.c
--- elsa/src/daemon/elsa.c 2011-06-26 12:25:38.000000000 +0200
+++ elsa.neu//src/daemon/elsa.c 2011-06-26 13:21:18.000000000
+0200 @@ -290,6 +290,7 @@
elsa_pam_shutdown();
ecore_shutdown();
elsa_close_log();
+ _remove_lock(); //_remove_lock() still uses elsa_config
elsa_config_shutdown();
if (elsa_session_logged_get())
{
@@ -299,7 +300,7 @@
putenv(buf);
_elsa_wait();
}
- _remove_lock();
+ //_remove_lock(); // elsa_config is already freed here
return 0;
}
Best regards
Christian
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel