On Wed, 2 Mar 2011 23:30:55 +0100 Andreas Volz <li...@brachttal.net> said:

> Am Wed, 2 Mar 2011 00:22:56 +0100 schrieb Andreas Volz:
> 
> > Hello,
> > 
> > my application crashes after recompiling EFL:
> > 
> > http://codepad.org/gQc8fqaL
> > 
> > Reason is that elm_config=NULL while dereferencing and using the
> > macro ENGINE_COMPARE.
> > 
> > Any ideas?
> 
> I just found the "problematic" commit (rev. 56218): (raster)
> 
> > dont ALWAYS init elm for externals - if one isnt used.. why init it?
> > (for that matter externals has a problem in design - it loads every
> > module for externals and thus links in every lib even if never used by
> > the app/edje obj).
> 
> If I comment out e.g. the elm_shutdown() in external_elm_shutdown()
> (line 27) my application works again.
> 
> I'll explain you my application setup. I start a plain Edje application
> without any linking or initialization to elementary. Then it loads user
> defined edj files. And in some of there are Elementary widgets. I
> couldn't know this before.
> 
> Displaying my first edj file works great, but after deleting it I got
> this crash. This is problematic as the main application logic is to
> load and unload edj files...
> 
> Do you've any ideas how to solve this problem? Could you maybe revert
> your patch until a final design solution is found. If not I've to
> maintain local patches for my project. :-(

actually i wrote a quick test that inits and shuts elm down - _elm_config is
not NULL. this is a bit trickier. i thought i'd be able to reproduce the
problem in this way... the issue is somewhere else and i'd like to be able to
reproduce it and fix it. right now "it works for me". test app attached. (i did
find valgrind complaining of some deferred window deleting handling which i
have now fixed).

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com

#include <Elementary.h>

static runs = 0;

static void
win_del(void *data, Evas_Object *obj, void *event_info)
{
   elm_exit();
}

int
main(int argc, char **argv)
{
   Evas_Object *win, *bg, *lb;

   elm_init(argc, argv);
   
   win = elm_win_add(NULL, "hello", ELM_WIN_BASIC);
   elm_win_title_set(win, "Hello");
   evas_object_smart_callback_add(win, "delete,request", win_del, NULL);
   
   bg = elm_bg_add(win);
   evas_object_size_hint_weight_set(bg, 1.0, 1.0);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);
   
   lb = elm_label_add(win);
   elm_label_label_set(lb, "Hello World!");
   evas_object_size_hint_weight_set(lb, 1.0, 1.0);
   elm_win_resize_object_add(win, lb);
   evas_object_show(lb);
   
   evas_object_show(win);
   
   elm_run();

   elm_shutdown();
   runs++;
   if (runs < 3) main(argc, argv);
   return 0;
}
   
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to