Recent posts (max 5) - Browse or Archive for more

Efreet and XDG temporary breakages!

Hello all,

Users of recent SVN may notice recent breakages around things that use Efreet and FreeDesktop.org (XDG) standards.

The breaks were introduced after changeset:46726 "Eet cache for efreet desktop". The commit title says it all, Sebastian is speeding up our previously quite slow and memory heavy code with Eet-powered cache to be shared amongst multiple processes.

Efreet was the slowest bit in whole E platform, a real pity. But Sebastian invested quite of time to have a third party process to parse all ".desktop" files, generating an optimized blob stored into Eet.

Eet data structures will be quite fast and strings will be only pointers to memory if using functions like eet_eina_file_data_descriptor_class_set(). This is quite good for both load time performance and runtime memory consumption, as no strings need to be allocated (so less Virtual Memory pressure), the pages are shared among different processes and can be sent back to file system, helping applications that actually need memory (less OOM cases). This is quite easy to use, and highly recommended for applications, even when you do not share with other processes.

So why do we have breakages, you might wonder? The crashes are due the way Efreet API was exposed and used. Instead of providing opaque Efreet_Destop structures with getters and setters to fields, it was exposed as direct access struct with public members, making cases such as the following common:

void name_changed(Efreet_Desktop *desk, const char *name)
{
     free(desk->name); /* crash if name is a pointer to mmap()ed file region! */
     desk->name = strdup(name);
}

This is spread all over E17, but major user is desktop file editor. Other parts may do it as well, such as changing the border or ibar/ibox icons.

These issues should be fixed soon. If you'd like to help with patches, just mail them to enlightenment-devel mail list. If you can't avoid these crashes, be sure to checkout the old Efreet meanwhile:

svn checkout -r 46726 http://svn.enlightenment.org/svn/e/trunk/efreet

Sorry about the inconvenience.

Welcoming new developers

Every free software project aims to bring more developers. However once we get people interested, how are they received, how to proceed and get started on E17/EFL development? This topic is becoming more and more common as E17 becomes more "ready" for it's final release and also EFL is being used in lots of devices, specially mobile devices like phones, pdas, ebook readers and so on.

E Community is trying to solve this with documentation, template generators and now screencasts!

Documentation

We now have daily updated API documentation generated from Doxygen, these are at http://www.enlightenment.org/p.php?p=docs (click "Docs" in E website). Rasterman started Elementary with great docs from start, Eina is a good example as well, with tutorials and such, ProFUSION also helped a bit with review and documentation patch requested by clients.

Template Generators

We had E-MODULES-EXTRA/skel for a long time, but that was not enough. Then elementary-generator was created with helper script and even nice GUI to create all the boring parts: makefiles, configure.ac, license file, C source file with gettext support and even Elementary's quicklaunch feature. The generator itself is easily extensible, all one need is to add files to some directories (description, screenshot and source).

 Elive guys created a similar tool "emodule-creator"  deb, which is handy to start writing E17 modules with minimal effort.

Screencast

As Thanatermesis put very well in his mail:

Now there's only one thing needed to motivate new ppl to make e17 modules, something "to see".

The ppl dont' read, not much ppl at least... the ppl are lazy to download something and to try it, the best is a tutorial explaining the creation of an e17 module, but finally, what's better for that than a video that shows how we can build and customize an e17 module in less than 10 minutes ? :)

and then announced his nice screencast:  http://www.youtube.com/watch?v=abNsVyYTSkU

Windows Installer

I have built new Windows installers (with or without debug symbols). It installs everything which is needed for Elementary and Ewl, and Expedite. It is built with source code of September the 27th 2009, with some local modifications that will be committed upstream later.

The link is in the binary packages page (at the bottom).

Please test and report problems

Introducing Eina Logging module

Hi all, developers and users, this topic should be of interest of you: logging.

Update: I did a replica of this page in wiki as EinaLog, please add improvements and suggestions there so we use it as documentation.

Users

For users, this will help you to figure out source of problems. Developers may ask you the output and give you the exact command line to run, but one example is:

EINA_LOG_LEVEL=4 expedite -e xlib

This will run expedite benchmark tool with all logging domains at level 4 (debug, the greater the number, the more verbose it will be). It should show lots of output lines like:

DBG:eina_module eina_amalgamation.c:8811 eina_module_list_load() array 0x65ca10, count 0

The line is easily grep-able, the first 3 letters are the log level name or number if it's less than zero or greater than 4. Then follows the domain name (eina_module in the example) followed by the source file (eina_amalgamation.c), line (8811), function name (eina_module_list_load) and then the message.

It should be colored as well, making it easier to spot different levels and domains.

To disable colors, use the environment variable EINA_LOG_COLOR_DISABLE=1

If one dislikes having both file/line and function (often they are redundant), then disable one of them with EINA_LOG_FILE_DISABLE=1 or EINA_LOG_FUNCTION_DISABLE=1. Do not use both, in that case just function will be disabled as file/line is more specific (and thus useful).

If program is multi-threaded and thread-safe logging is initialized (eina_log_threads_enable()), then logging from other threads (any other thread than the one that called eina_init()) you'll see another component: [T:XXXX] where XXXX is the thread number. This is to make sure the code is running in the proper place.

What is interesting about eina log is domain support. This enables us to see debug log for one module while seeing information for another and just warnings for the rest. Let's say we want to see debug for eina_module, info for eina_stringshare but just warning for everything else, we'd use the following command:

EINA_LOG_LEVEL=2 EINA_LOG_LEVELS=eina_module:4,eina_stringshare:3 expedite -e xlib

The first variable sets the generic log, as explained above. The new variable EINA_LOG_LEVELS specifies a comma separated list of domain:level. Domain names are specified in source code and is not dependent on file name, so developers should document available domains.

Developers

For developers it's easy: either use the global domain EINA_LOG_DOMAIN_GLOBAL or register your own domain.

Using the global domain can be handy to quick debug, but it's not recommended for the long run. To use it, one can use pre-defined macros: EINA_LOG_CRIT(), EINA_LOG_ERR(), EINA_LOG_WARN(), EINA_LOG_INFO() and EINA_LOG_DBG(). These macros are like printf() and should be easy to convert an application using printf() or fprintf() to it.

To register your own domain it's as simple as calling the function eina_log_domain_register(), it returns the log domain identifier that should be used with macros like EINA_LOG(), EINA_LOG_DOM_CRIT(), EINA_LOG_DOM_ERR() and so on. To make life easier, it's advised that applications declare their own macros. Example:

Using in a single C file

#include <Eina.h>

static int _log_dom = -1

#define ERR(...) EINA_LOG_DOM_ERR(_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)

Eina_Bool my_code_init(void) {
   if (!eina_init()) { /* you should init eina before registering log */
      return EINA_FALSE;
   }

   if (_log_dom < 0) {
      _log_dom = eina_log_domain_register("my_code", NULL);
      if (_log_dom < 0) {
         EINA_LOG_CRIT("could not register log domain 'my_code'");
         eina_shutdown();
         return EINA_FALSE;
      }
   }

   DBG("initialized!");
   return EINA_TRUE;
}

void my_code_shutdown(void) {
    if (_log_dom >= 0) {
       DBG("shutdown!");
       eina_log_domain_unregister(_log_dom);
       _log_dom = -1;
       eina_shutdown();
    }
}

void my_code_func(int val) {
    DBG("val=%d", val);
    if (val < 1) ERR("val less than 1, val=%d", val);
}

Using from multiple C files

Your private (my_code_private.h) header should contain:

#include <Eina.h>
extern int _my_code_log_dom = -1

#define ERR(...) EINA_LOG_DOM_ERR(_my_code_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_my_code_log_dom, __VA_ARGS__)

Your main source file:

#include "my_code_private.h"

Eina_Bool my_code_init(void) {
   if (!eina_init()) { /* you should init eina before registering log */
      return EINA_FALSE;
   }

   if (_log_dom < 0) {
      _my_code_log_dom = eina_log_domain_register("my_code", NULL);
      if (_my_code_log_dom < 0) {
         EINA_LOG_CRIT("could not register log domain 'my_code'");
         eina_shutdown();
         return EINA_FALSE;
      }
   }

   DBG("initialized!");
   return EINA_TRUE;
}

void my_code_shutdown(void) {
    if (_my_code_log_dom >= 0) {
       DBG("shutdown!");
       eina_log_domain_unregister(_log_dom);
       _my_code_log_dom = -1;
       eina_shutdown();
    }
}

Your secondary files:

#include "my_code_private.h"

void my_code_func(int val) {
    DBG("val=%d", val);
    if (val < 1) ERR("val less than 1, val=%d", val);
}

Extra developer features

One can define EINA_LOG_ABORT=1 to make eina abort on levels less or equal to critical. This level is used by safety checks and other paths and can make debug easier, just run it from inside gdb and it will stop on failure.

ECN 2009/34

e17 News

  • Gustavo added an Aspell plug-in to the Everything module. This means it can now tell you how to write words correctly (in multiple languages).
    http://download.enlightenment.org/att/blog/ecn200934/ecn2009_34_everything01.png
    changeset:41536
  • Raster worked around the 100% CPU batget issue. It now gets battery changes not as soon they happen, but only in a certain interval. A proper fix for very recent kernel versions is still wanted.
    changeset:41836
  • He also is working on a successor of the illume module for small touchscreen devices, called illume2.
    changeset:41883

EFL News

  • Enhance, the Glade/XML based Etk-GUI-Builder is unmaintained and has been moved to "OLD/". So has Extrackt which is based on Enhance.
  • Turran added two new EFL research projects to SVN: Ekeko, a object/property system and Eon, a canvas/toolkit system.
    changeset:41542
  • Although raster didn't believe in it, Gustavo is still planning to merge Guarana and Elementary. There are still quite some hurdles to take and it will require time and a lot of help from other people, but it looks like it's going to happen. The first step will be a change in the Evas_Smart_Class system which is currently up to discussion on the  mailinglist.
  • Cedric added the ecore_thread_run function to spawn threads that are well integrated with the EFL. This also features automatic detection for CPUs with multithreading functionality (also multicores and so on).
    changeset:41555
  • Thanks to Dave Andreoli, Elementary finally has a neat file selector widget. Although it's in a really early state, you can already use/test it.
    http://download.enlightenment.org/att/blog/ecn200934/ecn2009_34_elm_fileselector01.png
    changeset:41709
  • Another new Elm widget has been added by Michael Bouchaud: progress bars. Really rare is that the bars can be also vertical and go from top to down or left to right and vice versa.
    http://download.enlightenment.org/att/blog/ecn200934/ecn2009_34_elm_progressbar01.png
    changeset:41710
  • Last but not least, Quaker added horizontal and vertical separator widgets.
    changeset:41911
  • Brought to you by Hanspeter Portner, Edje finally received Lua support. This means you can now use Embryo and Lua embedded in your Edje files to do awesome stuff. In the long term only Lua will stay, so you better start using it. :)
    changeset:41802
  • A long missing feature has finally found its way into the SVN: Eina can now count your hamsters.
    changeset:41727
  • Mikhail Gusarov provided ARGB -> Grayscale64 conversion support for Evas. This should allow to render on gray scale displays like the well known e-Ink displays found in some eBook-readers.
    changeset:41825
  • According to Vincent, ecore_config is going to be removed soon. Don't forget to change your applications.

Application News

  • Raster committed his Elementary-based presentation tool (you can find it in trunk/TMP/st/).
    changeset:41729
  • Watchwolf is currently writing Elementary front-ends for Eyelight. Initial support for the editor is in svn.
    changeset:41819

i18n News

  • According to Gustavo there are some problems for Arabic EFL users with Fribidi, so Arabic letters won't show correctly. This is caused by a too old Fribidi version, 0.19 is known to work.

Developer Requests

  • Cedric added caching support for the _edje_part_recalc_single function in Edje. This is still not much tested and might cause graphic problems in applications using Edje. If you experience any problems, feel free to report them on the list.
    changeset:41663

Community News

  • This year's GSoC is nearing its end with the evaluation deadline on August 24th and the announcement of the results one day later.
  • The people of ProFUSION announced their newest project, an EFL powered car entertainment software solution called Memphis. It is based on their earlier multimedia project Canola2 and available completely under a free license with optional commercial support. Let's hope to see this deployed in a production car soon! In the mean time, check out the demo media on their site:  Memphis by ProFUSION
  • Following some other projects in this direction, the developers of the Pandora handheld gaming console (which is actually rather a quite powerful linux based tiny notebook) are  evaluating e17 as their main desktop for the device.
  • Posted: 2009-08-23 10:45 (Updated: 2009-09-28 00:15)
  • Author: thomasg
  • Categories: ECN
  • Comments (0)