Don't use eo_del/unref as counterparts to the old API. Create the objects with the new API if you would like to use them... On 29 Jan 2013 19:37, "Davide Andreoli" <d...@gurumeditation.it> wrote:
> Hi all, > I'm working/studying Eo while trying to optimize the python bindings > and I have some problems deleting eo objects. > > see this super simple example: > (pastebin.com/1C0dqdYA for a "colored" version) > > > #include <Eo.h> > #include <Elementary.h> > > void > my_win_del(void *data, Evas_Object *obj, void *event_info) > { > elm_exit(); > } > > EAPI_MAIN int > elm_main(int argc, char **argv) > { > Evas_Object *win, *r; > > win = elm_win_add(NULL, "main", ELM_WIN_BASIC); > elm_win_title_set(win, "Elementary Tests"); > evas_object_smart_callback_add(win, "delete,request", my_win_del, > NULL); > evas_object_resize(win, 320, 320); > evas_object_show(win); > > r = evas_object_rectangle_add(evas_object_evas_get(win)); > evas_object_resize(r, 100, 100); > evas_object_show(r); > > evas_object_del(r); // this one work as expected > // eo_del(r); // this give a bad warnig > // eo_unref(r); // this cause an endless loop on > elm_shutdown > > elm_run(); > elm_shutdown(); > > return 0; > } > > ELM_MAIN() > > > > The example simply create a rectangle and then delete it, the only working > way to delete the rect > seems to be the evas_object_del call (that work as expected) > > Using eo_del() to delete the rect cause this warning: > ERR<3219>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x21d9920 already deleted. > ERR<3219>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x21d9920 already deleted. > as soon as you call eo_del() > > While eo_unref() cause an endless loop on elm_shutdown with this warning > repeated forever: > CRI<3242>: lib/eo/eo.c:1081 eo_parent_set() *** Eina Magic Check Failed at > 0x1a88f80 !!! > Input handle is wrong type > Expected: a186bc32 - Eo > Supplied: afda6798 - (unknown) > *** NAUGHTY PROGRAMMER!!! > *** SPANK SPANK SPANK!!! > *** Now go fix your code. Tut tut tut! > > > I'm doing something wrong? I'm misunderstanding something? > > any help is appreciated > > thanks > davemds > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel