[E-devel] time retrieved in different places

2016-12-03 Thread Vincent Torri
hello,

currently, time is retrieved in ecore_time.c and eo.c, with specific
paths for Windows, Mac and other UNIX.

Why putting such code in Eina ?

Vincent

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: evas common: disable thread_queue feature on win32.

2016-12-03 Thread Vincent Torri
On Fri, Dec 2, 2016 at 6:01 AM, Carsten Haitzler  wrote:
> On Thu, 1 Dec 2016 13:04:32 +0100 Vincent Torri  
> said:
>
>> can you please at least print a message (ERR, WARN or something like
>> that) to at least remember that you made that hack ?
>>
>> this kind of hack is perfect to silently remove features on Windows
>> instead of implementing these features
>
> how is threadqueue broken on windows/ this is kind of important. there are
> tests for threadqueue in make check - do these fail? why do these not fail but
> evas fails? how? what? likely should fix threadqueue if there is an issue with
> it

I completely agree...

Vincent

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eio - have a smaller mempool as i can see 270k of stuff hanging about

2016-12-03 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2de9f552b9e54533a36dec285b9bfedcb6acc3f4

commit 2de9f552b9e54533a36dec285b9bfedcb6acc3f4
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Dec 3 18:01:53 2016 +0900

eio - have a smaller mempool as i can see 270k of stuff hanging about

eio seems to consume memory even when not in active use. this saves
most of 270k even when no longer needed. the mempool just keeps stuff
around pretty much forever. also the memory size limit doesn't work at
asll if yous set it to something other than -1. it just locks eio up.

@optimize
---
 src/lib/eio/eio_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eio/eio_private.h b/src/lib/eio/eio_private.h
index dece4c1..f1466b6 100644
--- a/src/lib/eio/eio_private.h
+++ b/src/lib/eio/eio_private.h
@@ -68,8 +68,8 @@ typedef struct stat _eio_stat_t;
 # include 
 #endif
 
-/* Keeping 32 Eio_File_Progress alive should be enought */
-#define EIO_PROGRESS_LIMIT 32
+/* Keeping 8 Eio_File_Progress alive should be enought */
+#define EIO_PROGRESS_LIMIT 8
 
 /* Huge TLB == 16M on most system */
 #define EIO_PACKET_SIZE 65536

-- 




[EGIT] [core/efl] master 01/01: eo: fix build on macOS

2016-12-03 Thread Jean Guyomarc'h
jayji pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=deda8ac8e7db8355d95d487e86389a2207b633aa

commit deda8ac8e7db8355d95d487e86389a2207b633aa
Author: Jean Guyomarc'h 
Date:   Sat Dec 3 12:10:04 2016 +0100

eo: fix build on macOS

Commit 227463bd introduces macOS-specific code, but without including the
header that provides the used declarations.
---
 src/lib/eo/eo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d57c31c..560f269 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -8,6 +8,10 @@
 
 #include 
 
+#if defined(__APPLE__) && defined(__MACH__)
+# include 
+#endif
+
 #include "Eo.h"
 #include "eo_ptr_indirection.h"
 #include "eo_private.h"

-- 




Re: [E-devel] time retrieved in different places

2016-12-03 Thread Gustavo Sverzut Barbieri
On Sat, Dec 3, 2016 at 6:04 AM, Vincent Torri  wrote:
> hello,
>
> currently, time is retrieved in ecore_time.c and eo.c, with specific
> paths for Windows, Mac and other UNIX.
>
> Why putting such code in Eina ?

i guess "why NOT putting.."  because it's missing... I agree that it
would be nicer to have an eina_monotonic_time_get() to be shared in
all these places, would have saved me lots of work in eo.c (and build
breaks)

I can migrate my code there if people agree


-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: fix build on macOS

2016-12-03 Thread Gustavo Sverzut Barbieri
ooops... my bad, and also for windows :-)

On Sat, Dec 3, 2016 at 9:11 AM, Jean Guyomarc'h  wrote:
> jayji pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=deda8ac8e7db8355d95d487e86389a2207b633aa
>
> commit deda8ac8e7db8355d95d487e86389a2207b633aa
> Author: Jean Guyomarc'h 
> Date:   Sat Dec 3 12:10:04 2016 +0100
>
> eo: fix build on macOS
>
> Commit 227463bd introduces macOS-specific code, but without including the
> header that provides the used declarations.
> ---
>  src/lib/eo/eo.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
> index d57c31c..560f269 100644
> --- a/src/lib/eo/eo.c
> +++ b/src/lib/eo/eo.c
> @@ -8,6 +8,10 @@
>
>  #include 
>
> +#if defined(__APPLE__) && defined(__MACH__)
> +# include 
> +#endif
> +
>  #include "Eo.h"
>  #include "eo_ptr_indirection.h"
>  #include "eo_private.h"
>
> --
>
>



-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eo: fix missing Evil.h include

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7a1e5923f9f60197516fdf6b60ae23d5358e3aa0

commit 7a1e5923f9f60197516fdf6b60ae23d5358e3aa0
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 09:41:09 2016 -0200

eo: fix missing Evil.h include
---
 src/lib/eo/eo.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 560f269..b5647d2 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -8,6 +8,10 @@
 
 #include 
 
+#ifdef HAVE_EVIL
+# include 
+#endif
+
 #if defined(__APPLE__) && defined(__MACH__)
 # include 
 #endif

-- 




[EGIT] [core/efl] master 01/01: eo: fix compilation without HAVE_BACKTRACE.

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e0fcbe5b46244cbae7193cd7f4513db2d28c92d

commit 2e0fcbe5b46244cbae7193cd7f4513db2d28c92d
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 09:44:44 2016 -0200

eo: fix compilation without HAVE_BACKTRACE.

time_get() function was used even in that case to log when objects
were created or deleted.

thanks @vtorri.
---
 src/lib/eo/eo.c | 72 -
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index b5647d2..a540492 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2372,42 +2372,6 @@ efl_callbacks_cmp(const Efl_Callback_Array_Item *a, 
const Efl_Callback_Array_Ite
 }
 
 #ifdef EO_DEBUG
-#ifdef HAVE_BACKTRACE
-typedef struct _Eo_Log_Obj_Entry {
-   Eo_Id id;
-   const _Eo_Object *obj;
-   const _Efl_Class *klass;
-   double timestamp;
-   Eina_Bool is_free;
-   uint8_t bt_size;
-   void *bt[];
-} Eo_Log_Obj_Entry;
-
-static void
-_eo_log_obj_find(const Eo_Id id, const Eo_Log_Obj_Entry **added, const 
Eo_Log_Obj_Entry **deleted)
-{
-   const Eo_Log_Obj_Entry *entry;
-   Eina_Array_Iterator it;
-   unsigned int idx;
-
-   *added = NULL;
-   *deleted = NULL;
-
-   EINA_ARRAY_ITER_NEXT(&_eo_log_objs, idx, entry, it)
- {
-if (EINA_UNLIKELY(id == entry->id))
-  {
- if (entry->is_free)
-   *deleted = entry;
- else
-   {
-  *added = entry;
-  *deleted = NULL; /* forget previous add, if any */
-   }
-  }
- }
-}
-
 /* NOTE: cannot use ecore_time_get()! */
 static inline double
 _eo_log_time_now(void)
@@ -2471,6 +2435,42 @@ _eo_log_time_now(void)
 #endif
 }
 
+#ifdef HAVE_BACKTRACE
+typedef struct _Eo_Log_Obj_Entry {
+   Eo_Id id;
+   const _Eo_Object *obj;
+   const _Efl_Class *klass;
+   double timestamp;
+   Eina_Bool is_free;
+   uint8_t bt_size;
+   void *bt[];
+} Eo_Log_Obj_Entry;
+
+static void
+_eo_log_obj_find(const Eo_Id id, const Eo_Log_Obj_Entry **added, const 
Eo_Log_Obj_Entry **deleted)
+{
+   const Eo_Log_Obj_Entry *entry;
+   Eina_Array_Iterator it;
+   unsigned int idx;
+
+   *added = NULL;
+   *deleted = NULL;
+
+   EINA_ARRAY_ITER_NEXT(&_eo_log_objs, idx, entry, it)
+ {
+if (EINA_UNLIKELY(id == entry->id))
+  {
+ if (entry->is_free)
+   *deleted = entry;
+ else
+   {
+  *added = entry;
+  *deleted = NULL; /* forget previous add, if any */
+   }
+  }
+ }
+}
+
 static void
 _eo_log_obj_entry_show(const Eo_Log_Obj_Entry *entry, int log_level, const 
char *func_name, const char *file, int line, double now)
 {

-- 




Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-03 Thread Gustavo Sverzut Barbieri
On Sat, Dec 3, 2016 at 12:31 AM, Carsten Haitzler  wrote:
> On Sat, 03 Dec 2016 01:45:30 + Gustavo Sverzut Barbieri
>  said:
>
>> Well, I did force and it "worked". Not much test, like I've noticed some
>> cases check for class using just the eo_id...
>
> how can you force it? literally there's missing non-eoid code paths. eo will
> mess up the pointer by mucking about with the bits in it... i'm amazed it
> worked at all.. but i guarantee you it wont be correct either way.

go to eo_private.h and do:

#undef HAVE_EO_ID

I've tested with efl_net_dialer_simple_example, which does lots of
objects and classes and inheritance. You get the following log when
using that and the double free case:

$ LD_PRELOAD=src/lib/eo/.libs/libeo_dbg.so \
   EO_LIFECYCLE_NO_DEBUG=Efl_Loop_Timer,Efl_Promise,Efl_Future \
   EO_LIFECYCLE_DEBUG=1 \
   EINA_LOG_LEVELS=eo:3,eo_lifecycle:4 \
   libtool --mode=execute valgrind
./src/examples/ecore/efl_net_dialer_simple_example tcp localhost:1234

DBG<13298>:eo_lifecycle lib/eo/eo.c:2736 _eo_log_obj_init() will log
all object allocation and free
DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
log class 'Efl_Future'
DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
log class 'Efl_Promise'
DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
log class 'Efl_Loop_Timer'
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9723470 obj_id=0x9723470 class=0x9722bb0 (Efl_Vpath_Core)
[0.1132]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9738a90 obj_id=0x9738a90 class=0x9737800 (Efl_Loop) [0.1645]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9782250 obj_id=0x9782250 class=0x97809f0 (Efl_Net_Dialer_Simple)
[0.5570]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9782650 obj_id=0x9782650 class=0x977c210 (Efl_Net_Dialer_Tcp)
[0.5736]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9783de0 obj_id=0x9783de0 class=0x9782930 (Efl_Io_Queue) [0.5963]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x9786360 obj_id=0x9786360 class=0x97841a0 (Efl_Io_Copier)
[0.6090]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x978bb70 obj_id=0x978bb70 class=0x9782930 (Efl_Io_Queue) [0.6553]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
obj=0x978bf30 obj_id=0x978bf30 class=0x97841a0 (Efl_Io_Copier)
[0.6588]
INFO: sending 'Hello World!'
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x978bb70 obj_id=0x978bb70 class=0x9782930 (Efl_Io_Queue) [0.7322]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x978bf30 obj_id=0x978bf30 class=0x97841a0 (Efl_Io_Copier)
[0.7472]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x9783de0 obj_id=0x9783de0 class=0x9782930 (Efl_Io_Queue) [0.7504]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x9786360 obj_id=0x9786360 class=0x97841a0 (Efl_Io_Copier)
[0.7536]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x9782650 obj_id=0x9782650 class=0x977c210 (Efl_Net_Dialer_Tcp)
[0.7730]
DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
obj=0x9782250 obj_id=0x9782250 class=0x97809f0 (Efl_Net_Dialer_Simple)
[0.7936]
CRI<13298>: ../src/lib/eo/efl_object.eo.c:78 efl_del() *** Eina Magic
Check Failed at 0x9782250 !!!
Input handle is wrong type
Expected: a186bc32 - Eo
Supplied:  - (unknown)
*** NAUGHTY PROGRAMMER!!!
*** SPANK SPANK SPANK!!!
*** Now go fix your code. Tut tut tut!


ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
obj_id=0x9782250 created obj=0x9782250, class=0x97809f0
(Efl_Net_Dialer_Simple) [0.5570s, 0.2536 ago]:
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e3ff1a: libeo_dbg.so+0x8f1a (in
src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e3fbdd: _efl_add_internal_start+0x1cd (in
src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10a85f: lt-efl_net_dialer_simple_example+0x285f (in
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
0x108000)
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0005c79291: __libc_start_main+0xf1 (in /usr/lib/libc.so.6
0x5c59000)
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10a38a: _start+0x2a (in
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
0x108000)
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
obj_id=0x9782250 deleted obj=0x9782250, class=0x97809f0
(Efl_Net_Dialer_Simple) [0.7936s, 0.0169 ago]:
ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e406ea: libeo_dbg.so+0x96ea (in
src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
ERR<13298>:eo_lifecyc

Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-03 Thread Gustavo Sverzut Barbieri
On Sat, Dec 3, 2016 at 9:58 AM, Gustavo Sverzut Barbieri
 wrote:
> I've noticed no valgrind kicks in and that's due the freeq... that one
> must mark the object as dead... will do it now

sorry, eina_thrash, as eina_freeq() will bypass if running inside valgrind.


-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] time retrieved in different places

2016-12-03 Thread Vincent Torri
On Sat, Dec 3, 2016 at 12:37 PM, Gustavo Sverzut Barbieri
 wrote:
> On Sat, Dec 3, 2016 at 6:04 AM, Vincent Torri  wrote:
>> hello,
>>
>> currently, time is retrieved in ecore_time.c and eo.c, with specific
>> paths for Windows, Mac and other UNIX.
>>
>> Why putting such code in Eina ?
>
> i guess "why NOT putting.."

yes, not in eina

Vincent

> because it's missing... I agree that it
> would be nicer to have an eina_monotonic_time_get() to be shared in
> all these places, would have saved me lots of work in eo.c (and build
> breaks)
>
> I can migrate my code there if people agree
>
>
> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (16) 99354-9890
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eo: do not use eina_trash when running on valgrind.

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9eba6bf2e7c78016f14d47f42e8558a1e0fb2370

commit 9eba6bf2e7c78016f14d47f42e8558a1e0fb2370
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 10:35:27 2016 -0200

eo: do not use eina_trash when running on valgrind.

This allows valgrind to show when the object was created and deleted.
---
 src/Makefile_Eo.am |  5 -
 src/lib/eo/eo.c| 12 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am
index 0bf2453..e2551bc 100644
--- a/src/Makefile_Eo.am
+++ b/src/Makefile_Eo.am
@@ -34,7 +34,10 @@ lib/eo/eo_add_fallback.h \
 lib/eo/eo_private.h \
 lib/eo/efl_future.c
 
-lib_eo_libeo_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
+lib_eo_libeo_la_CPPFLAGS = \
+-I$(top_builddir)/src/lib/efl \
+@EO_CFLAGS@ \
+@VALGRIND_CFLAGS@
 lib_eo_libeo_la_LIBADD = @EO_LIBS@
 lib_eo_libeo_la_DEPENDENCIES = @EO_INTERNAL_LIBS@
 lib_eo_libeo_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index a540492..dd6cff6 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -26,6 +26,12 @@
 #include 
 #endif
 
+#ifdef HAVE_VALGRIND
+# include 
+# include 
+#endif
+static Eina_Bool _eo_trash_bypass = EINA_FALSE;
+
 #define EO_CLASS_IDS_FIRST 1
 #define EFL_OBJECT_OP_IDS_FIRST 1
 
@@ -980,7 +986,7 @@ _eo_free(_Eo_Object *obj)
_eo_id_release((Eo_Id) _eo_obj_id_get(obj));
 
eina_spinlock_take(&klass->objects.trash_lock);
-   if (klass->objects.trash_count <= 8)
+   if ((klass->objects.trash_count <= 8) && (EINA_LIKELY(!_eo_trash_bypass)))
  {
 eina_trash_push(&klass->objects.trash, obj);
 klass->objects.trash_count++;
@@ -2027,6 +2033,10 @@ efl_object_init(void)
 
eina_init();
 
+#if HAVE_VALGRIND
+   _eo_trash_bypass = RUNNING_ON_VALGRIND;
+#endif
+
_efl_object_main_thread = eina_thread_self();
 
_eo_sz = EO_ALIGN_SIZE(sizeof(_Eo_Object));

-- 




[EGIT] [core/efl] master 01/01: elm_code: ooops, fix test from previous refactor

2016-12-03 Thread Andy Williams
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=717a0159d28ccbb0dc46a20bd94dc1217e3af4d8

commit 717a0159d28ccbb0dc46a20bd94dc1217e3af4d8
Author: Andy Williams 
Date:   Sat Dec 3 06:08:10 2016 +

elm_code: ooops, fix test from previous refactor
---
 src/tests/elementary/elm_code_test_indent.c | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/tests/elementary/elm_code_test_indent.c 
b/src/tests/elementary/elm_code_test_indent.c
index 4b71556..70ecc9e 100644
--- a/src/tests/elementary/elm_code_test_indent.c
+++ b/src/tests/elementary/elm_code_test_indent.c
@@ -66,29 +66,31 @@ START_TEST (elm_code_indent_matching_braces)
Elm_Code_Line *line;
Elm_Code *code;
const char *str;
-   unsigned int row;
 
elm_init(1, NULL);
code = elm_code_create();
file = elm_code_file_new(code);
 
-   line = elm_code_file_line_append(file, "   if ()", 8, NULL);
+   elm_code_file_line_append(file, "", 8, NULL);
+   line = elm_code_file_line_get(file, 1);
+
+   elm_code_file_line_insert(file, 1, "   if ()", 8, NULL);
str = elm_code_line_indent_matching_braces_get(line);
ck_assert_str_eq("", str);
 
-   line = elm_code_file_line_append(file, " {", 6, NULL);
+   elm_code_file_line_insert(file, 2, " {", 6, NULL);
str = elm_code_line_indent_matching_braces_get(line);
ck_assert_str_eq(" ", str);
 
-   line = elm_code_file_line_append(file, "if (){", 14, NULL);
-   str = elm_code_line_indent_matching_braces_get(line;
+   elm_code_file_line_insert(file, 3, "if (){", 14, NULL);
+   str = elm_code_line_indent_matching_braces_get(line);
ck_assert_str_eq("", str);
 
-   line = elm_code_file_line_append(file, "}", 9, NULL);
+   elm_code_file_line_insert(file, 4, "}", 9, NULL);
str = elm_code_line_indent_matching_braces_get(line);
ck_assert_str_eq(" ", str);
 
-   line = elm_code_file_line_append(file, " }", 6, NULL);
+   elm_code_file_line_insert(file, 5, " }", 6, NULL);
str = elm_code_line_indent_matching_braces_get(line);
ck_assert_str_eq("", str);
 

-- 




[EGIT] [core/efl] master 04/04: eina_btlog: compact output and keep non-bt information.

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=84a0f047db9fcd0efd2c29c85ba41fd8f624de3d

commit 84a0f047db9fcd0efd2c29c85ba41fd8f624de3d
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 12:57:24 2016 -0200

eina_btlog: compact output and keep non-bt information.

Now we keep all non-bt prefixes as well, in conjunction with compact
mode it looks like we resolved the address to lines in the output.

Example:

```
$ cat bt-new.txt
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e401ca: libeo_dbg.so+0x91ca (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e3fb42: _efl_add_internal_start+0x1c2 (in 
src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10a85f: lt-efl_net_dialer_simple_example+0x285f (in 
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
 0x108000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0005c7c291: __libc_start_main+0xf1 (in /usr/lib/libc.so.6 0x5c5c000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10a38a: _start+0x2a (in 
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
 0x108000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del() 
obj_id=0x40007feb55b9 deleted obj=0x97870b0, class=0x9785850 
(Efl_Net_Dialer_Simple) [0.9045s, 0.0198 ago]:
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e409aa: libeo_dbg.so+0x99aa (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e407f1: libeo_dbg.so+0x97f1 (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e3eee8: libeo_dbg.so+0x7ee8 (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e3f09e: _efl_object_call_end+0x4e (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e48a65: efl_del+0x105 (in src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10ac2c: lt-efl_net_dialer_simple_example+0x2c2c (in 
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
 0x108000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0005c7c291: __libc_start_main+0xf1 (in /usr/lib/libc.so.6 0x5c5c000)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x10a38a: _start+0x2a (in 
/home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
 0x108000)
ERR<24641>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del() 
obj_id=0x40007c9a1109 was already deleted 0.0287 seconds ago!
```

Results in:

```
$ cat /tmp/bt-new.txt | eina_btlog -c
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_eo_log_obj_new (in eo.c:2691)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_efl_add_internal_start (in eo.c:844)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()main 
(in efl_net_dialer_simple_example.c:375)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
__libc_start_main (in ??:375)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_start (in ??:375)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del() 
obj_id=0x40007feb55b9 deleted obj=0x97870b0, class=0x9785850 
(Efl_Net_Dialer_Simple) [0.9045s, 0.0198 ago]:
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_eo_log_obj_free (in eo.c:2714)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_eo_free (in eo.c:974)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_efl_unref_internal (in eo_private.h:342)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_efl_object_call_end (in eo.c:620)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
efl_del (in efl_object.eo.c:78)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()main 
(in efl_net_dialer_simple_example.c:447)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
__libc_start_main (in ??:447)
ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
_start (in ??:447)
ERR<24641>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del() 
obj_id=0x40007c9a1109 was already deleted 0.0287 seconds ago!
```

whi

[EGIT] [core/efl] master 01/04: eina_btlog: improve help.

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=349daa458fda75d5287146dea7721d15a579d586

commit 349daa458fda75d5287146dea7721d15a579d586
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 11:06:05 2016 -0200

eina_btlog: improve help.
---
 src/bin/eina/eina_btlog.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c
index d273f8e..3d24412 100644
--- a/src/bin/eina/eina_btlog.c
+++ b/src/bin/eina/eina_btlog.c
@@ -338,7 +338,12 @@ main(int argc, char **argv)
 if (!strcmp(argv[i], "-h"))
   {
  printf("Usage: eina_btlog [-n]\n"
-"  -n   Do not use color escape codes\n");
+"  -n   Do not use color escape codes\n"
+"\n"
+"Provide addresses logged from EFL applications to 
stdin.\n"
+"Example:\n\n"
+"\tcat log.txt | eina_btlog\n"
+"\n");
  eina_shutdown();
  return 0;
   }

-- 




[EGIT] [core/efl] master 02/04: eina_btlog: understand new backtrace format used by eo.

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2aa247b33439d5bfc73297c9de25a4984df163a4

commit 2aa247b33439d5bfc73297c9de25a4984df163a4
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 11:59:48 2016 -0200

eina_btlog: understand new backtrace format used by eo.

The output of eo backtrace is much more readable than eina's default,
but still misses addr2line translation done by eina_btlog, so make
eina_btlog understand the new format.
---
 src/bin/eina/eina_btlog.c | 39 ++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c
index 3d24412..f7d1034 100644
--- a/src/bin/eina/eina_btlog.c
+++ b/src/bin/eina/eina_btlog.c
@@ -268,6 +268,43 @@ bt_append(Eina_List *btl, const char *btline)
return btl;
 }
 
+static const char *
+bt_input_translate(char *line)
+{
+   static char local[PATH_MAX + sizeof(" 0x1234567890123456789 
0x1234567890123456789\n")];
+   const char *addrstart, *addrend, *filestart, *fileend, *basestart, *baseend;
+
+   /* new bt format is more human readable, but needs some cleanup before we 
bt_append()
+*
+* Example:
+*   ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0005c7c291: __libc_start_main+0xf1 (in /usr/lib/libc.so.6 0x5c5c000)
+*   ERR<23314>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x0004e409aa: libeo_dbg.so+0x99aa (in src/lib/eo/.libs/libeo_dbg.so 
0x4e37000)
+*/
+
+   addrstart = strstr(line, "0x");
+   if (!addrstart) return line;
+
+   addrend = strchr(addrstart, ':');
+   if (!addrend) return line;
+
+   filestart = strstr(addrend, "(in ");
+   if (!filestart) return line;
+
+   filestart += strlen("(in ");
+   basestart = strstr(filestart, " 0x");
+   if (!basestart) return line;
+   fileend = basestart;
+   basestart += strlen(" ");
+   baseend = strchr(basestart, ')');
+   if (!baseend) return line;
+
+   snprintf(local, sizeof(local), "%.*s %.*s %.*s\n",
+(int)(fileend - filestart), filestart,
+(int)(addrend - addrstart), addrstart,
+(int)(baseend - basestart), basestart);
+   return local;
+}
+
 static Eina_Bool
 _translation_function_detect(const Translation_Desc *desc)
 {
@@ -359,7 +396,7 @@ main(int argc, char **argv)
 
while (fgets(buf, sizeof(buf) - 1, stdin))
  {
-btl = bt_append(btl, buf);
+btl = bt_append(btl, bt_input_translate(buf));
  }
EINA_LIST_FOREACH(btl, l, bt)
  {

-- 




[EGIT] [core/efl] master 03/04: eina_btlog: show comments (non-bt lines)

2016-12-03 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=683a508c204197a843e13d4c64c94474332eb04d

commit 683a508c204197a843e13d4c64c94474332eb04d
Author: Gustavo Sverzut Barbieri 
Date:   Sat Dec 3 12:15:06 2016 -0200

eina_btlog: show comments (non-bt lines)

If the user paste the backtrace he may include some non-backtrace
line, such as Eo logs that includes the message saying what's the
backtrace is about.

These lines will be printed as is, unless "-C" is used to discard
them.
---
 src/bin/eina/eina_btlog.c | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c
index f7d1034..b69927e 100644
--- a/src/bin/eina/eina_btlog.c
+++ b/src/bin/eina/eina_btlog.c
@@ -48,6 +48,7 @@ struct _Bt
char *file_dir;
char *file_name;
char *func_name;
+   char *comment;
int line;
 };
 
@@ -73,6 +74,7 @@ struct _Translation_Desc
 static Translate_Func _translate = NULL;
 static const char *_prog = NULL;
 static Eina_Bool color = EINA_TRUE;
+static Eina_Bool show_comments = EINA_TRUE;
 
 static void
 path_split(const char *path, char **dir, char **file)
@@ -263,8 +265,13 @@ bt_append(Eina_List *btl, const char *btline)
   }
 btl = eina_list_append(btl, bt);
  }
-   else free(bt);
+   else
+ {
+bt->comment = strdup(btline);
+btl = eina_list_append(btl, bt);
+ }
free(bin);
+
return btl;
 }
 
@@ -376,6 +383,7 @@ main(int argc, char **argv)
   {
  printf("Usage: eina_btlog [-n]\n"
 "  -n   Do not use color escape codes\n"
+"  -C   Do not show comments (non-bt lines)\n"
 "\n"
 "Provide addresses logged from EFL applications to 
stdin.\n"
 "Example:\n\n"
@@ -385,6 +393,7 @@ main(int argc, char **argv)
  return 0;
   }
 else if (!strcmp(argv[i], "-n")) color = EINA_FALSE;
+else if (!strcmp(argv[i], "-C")) show_comments = EINA_FALSE;
  }
 
if (!_translation_function_detect(desc))
@@ -400,6 +409,7 @@ main(int argc, char **argv)
  }
EINA_LIST_FOREACH(btl, l, bt)
  {
+if (!bt->bin_dir) continue;
 len = strlen(bt->bin_dir);
 if (len > cols[0]) cols[0] = len;
 len = strlen(bt->bin_name);
@@ -419,6 +429,9 @@ main(int argc, char **argv)
  }
EINA_LIST_FOREACH(btl, l, bt)
  {
+if (bt->comment && show_comments)
+  fputs(bt->comment, stdout);
+if (!bt->bin_dir) continue;
 len = strlen(bt->bin_dir);
 for (i = 0; i < (cols[0] - len); i++) printf(" ");
 if (color)

-- 




Re: [E-devel] Edje multiseat support

2016-12-03 Thread Gustavo Sverzut Barbieri
Just seat1, seat2...

That's what I said we found unusable to get "bob", "jane" in EDC.

In C you could snprintf() and add signals, or register with ",*" and then
parse, BUT that's only in C or bindings, not EDC/Embryo since in a
script/program you can't know the signal that triggered you.

In C you can retrieve bob from seat1, seat1 from bob and map accordingly.

From edc point of view, you can only write theme based on something you
know. Like assign focus color red to seat1, green to seat2, blue to seat3.
If you get bob, you can't figure it out since it is dependent on the system
configuration.



Em sáb, 3 de dez de 2016 às 01:20, Carsten Haitzler 
escreveu:

> On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly 
> said:
>
> > Hi folks,
> >
> > now that multiseat is supported up to Evas, we’re working on Edje.
> >
> > The idea is that a developer would be able to implement an UI that
> > may be used by more than one single seat, properly handling focus,
> > and providing different feedback for different seats action.
> >
> > Let’s say, different colors on focus, different images when different
> > seat pointers are over, etc.
> >
> > I’ve done an initial implementation and wrote an example. It’s available
> > on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> > edje_multiseat example (C code + EDC).
> >
> > To make this possible, a few main changes were done:
> >   *  New signals were added, adding the seat as suffix. So “mouse,in”
> would
> > be still be emitted, but also “mouse,in,seat1”, for example
> >   * Real Parts now may be focused by multiple seats
> >   * Some actions receive an optional seat parameter. For instance,
> > FOCUS_SET may receive the seat name, or it will consider it's about the
> > default seat.
> >* Since Evas seat devices may have arbitrary names (at least using
> > wayland backend you can name them as you want using udev rules), or set
> > them on programmatic ways, Edje will have custom names for seats,
> following
> > a well established pattern. So first announced seat will be named
> “seat1”,
> > the second “seat2”... If an application supports three seats, on EDC you
> > know what signals you should expect. It makes it possible to write
> general
> > applications (in the sense of not knowing exactly seats beforehand). But
> > let’s say it’s not the case. there is a specific product built in a way
> > that they know exactly which seats are supported and configured their
> > names, or want to check if this seat has pointer, keyboard, or whatever…
> > for this cases, Edje also emits signals saying when devices were added
> (or
> > removed) and their names. With these names you can use a new Edje
> function
> > to fetch the Evas device named as “seat1”.
> >
> > Please let me know about any suggestions or concerns.
> >
> > I should make a pull request with this initial patchset soon
>
> wait... so seats can be named... udev rules. so lets say i have seats:
>
> bob
> jane
>
> i get signals like:
>
> mouse,in,bob
> mouse,out,jane
>
> right?
>
> so i ALSO get
>
> mouse,in,seat1
> mouse,out,seat2
>
> ? so i can write specific seat name handling signal stuff AND also have
> generic? or... ?
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Eo error message in my application

2016-12-03 Thread Vincent Torri
Hello

I'm rewriting my multi-document viewer. I'm using EFL git,  and i have
that Eo error message :

ERR<59568>:eo[T:3] lib/eo/eo.c:1663 efl_isa() Object 40007f56 is not a
valid object in this context: object domain: 0, current domain: 2,
local domain: 2, available domains: [  1 2  ]

does someone have an idea of the problem ?

thank you

Vincent

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: elm_code: refactoring of the elm_code_line_indent to work with lines

2016-12-03 Thread Andy Williams
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=92eacde6e7e1a4a53185691fd97b549029724320

commit 92eacde6e7e1a4a53185691fd97b549029724320
Author: Andy Williams 
Date:   Sat Dec 3 15:59:40 2016 +

elm_code: refactoring of the elm_code_line_indent to work with lines
---
 src/lib/elementary/elm_code_indent.c| 15 -
 src/lib/elementary/elm_code_indent.h|  2 +-
 src/lib/elementary/elm_code_widget.c|  6 +-
 src/tests/elementary/elm_code_test_indent.c | 87 +++--
 4 files changed, 72 insertions(+), 38 deletions(-)

diff --git a/src/lib/elementary/elm_code_indent.c 
b/src/lib/elementary/elm_code_indent.c
index b1b13d3..70b66cd 100644
--- a/src/lib/elementary/elm_code_indent.c
+++ b/src/lib/elementary/elm_code_indent.c
@@ -7,12 +7,21 @@
 #include "elm_code_private.h"
 
 EAPI char *
-elm_code_line_indent_get(const char *prevtext, unsigned int prevlength)
+elm_code_line_indent_get(Elm_Code_Line *line)
 {
-   unsigned int count = 0;
-   char *buf, *ptr = (char *)prevtext;
+   Elm_Code_Line *prevline;
+   const char *prevtext;
+   unsigned int prevlength, count = 0;
+   char *buf, *ptr;
char next, last;
 
+   if (line->number <= 1)
+ return strdup("");
+
+   prevline = elm_code_file_line_get(line->file, line->number - 1);
+   prevtext = elm_code_line_text_get(prevline, &prevlength);
+
+   ptr = (char *)prevtext;
buf = malloc((prevlength + 3) * sizeof(char));
while (count < prevlength)
  {
diff --git a/src/lib/elementary/elm_code_indent.h 
b/src/lib/elementary/elm_code_indent.h
index 1cf8891..41eaccd 100644
--- a/src/lib/elementary/elm_code_indent.h
+++ b/src/lib/elementary/elm_code_indent.h
@@ -20,7 +20,7 @@ extern "C" {
  *
  */
 
-EAPI char *elm_code_line_indent_get(const char *prevtext, unsigned int 
prevlength);
+EAPI char *elm_code_line_indent_get(Elm_Code_Line *line);
 
 EAPI char *elm_code_line_indent_matching_braces_get(Elm_Code_Line *line);
 
diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index a05cf32..f0b54fe 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1237,8 +1237,8 @@ _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget 
*widget, const char *t
 count = 0;
 while (count < curlen)
   {
- if (!_elm_code_text_char_is_whitespace(*curtext))
- break;
+ if (*curtext != ' ' && *curtext != '\t')
+   break;
 
  count++;
  curtext++;
@@ -1338,7 +1338,7 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
width = elm_code_widget_line_text_column_width_get(widget, line);
 
line = elm_code_file_line_get(code->file, row + 1);
-   leading = elm_code_line_indent_get(oldtext, oldlen);
+   leading = elm_code_line_indent_get(line);
elm_code_line_text_leading_whitespace_strip(line);
elm_code_line_text_insert(line, 0, leading, strlen(leading));
free(oldtext);
diff --git a/src/tests/elementary/elm_code_test_indent.c 
b/src/tests/elementary/elm_code_test_indent.c
index 70ecc9e..f4887d5 100644
--- a/src/tests/elementary/elm_code_test_indent.c
+++ b/src/tests/elementary/elm_code_test_indent.c
@@ -8,55 +8,80 @@
 #include "Elementary.h"
 #include "elm_code_indent.h"
 
+static void
+_indent_check(Elm_Code_File *file, const char *prev, const char *expected)
+{
+   Elm_Code_Line *line;
+   char *str;
+
+   elm_code_file_clear(file);
+
+   elm_code_file_line_append(file, prev, strlen(prev), NULL);
+   elm_code_file_line_append(file, "", 0, NULL);
+   line = elm_code_file_line_get(file, 2);
+
+   str = elm_code_line_indent_get(line);
+   ck_assert_str_eq(expected, str);
+
+   free(str);
+}
+
 START_TEST (elm_code_indent_whitespace_test)
 {
-   const char *str;
+   Elm_Code *code;
+   Elm_Code_File *file;
 
-   str = elm_code_line_indent_get("", 0);
-   ck_assert_str_eq("", str);
-   str = elm_code_line_indent_get("  ", 2);
-   ck_assert_str_eq("  ", str);
-   str = elm_code_line_indent_get("\t", 1);
-   ck_assert_str_eq("\t", str);
-   str = elm_code_line_indent_get("\t  ", 3);
-   ck_assert_str_eq("\t  ", str);
+   elm_init(1, NULL);
+   code = elm_code_create();
+   file = elm_code_file_new(code);
+
+   _indent_check(file, "", "");
+   _indent_check(file, "  ", "  ");
+   _indent_check(file, "\t", "\t");
+   _indent_check(file, "\t  ", "\t  ");
+
+   elm_shutdown();
 }
 END_TEST
 
 START_TEST (elm_code_indent_comments_test)
 {
-   const char *str;
+   Elm_Code *code;
+   Elm_Code_File *file;
+
+   elm_init(1, NULL);
+   code = elm_code_create();
+   file = elm_code_file_new(code);
 
-   str = elm_code_line_indent_get(" /**", 4);
-   ck_assert_str_eq("  * ", str);
-   str = elm_code_line_indent_get("  * ", 4);
-   ck_assert_str_eq("  * ", str);
-   str = elm_code_line_indent_get("  */", 4);
-   ck_assert_str_eq(" ", str);
-   str = elm_code_line_indent_get("\t//", 3);
-   ck_assert_str_eq("\t//", s

Re: [E-devel] Eo error message in my application

2016-12-03 Thread Gustavo Sverzut Barbieri
On Sat, Dec 3, 2016 at 1:57 PM, Vincent Torri  wrote:
> Hello
>
> I'm rewriting my multi-document viewer. I'm using EFL git,  and i have
> that Eo error message :
>
> ERR<59568>:eo[T:3] lib/eo/eo.c:1663 efl_isa() Object 40007f56 is not a
> valid object in this context: object domain: 0, current domain: 2,
> local domain: 2, available domains: [  1 2  ]
>
> does someone have an idea of the problem ?

the new efl in git provides more context to that message since
yesterday, particularly if you use EO_LIFECYCLE_DEBUG=1 (envvar),
since I was so pissed with such nebulous messages :-D

usually the object is already dead or was never created... If you're
using threads (seems so due "[T:3]"), be aware that objects are bound
to the thread they were created and you need to "import"  to use,
Raster sent some email to the list and I recall som tests in the
tree

which reminds me that my EO_LIFECYCLE_DEBUG doesn't cover the
domain... maybe it should.

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Elm_Code naming

2016-12-03 Thread Andrew Williams
A good question,

Probably rather unlikely. Lots of the elm_code api would fall over if you
sent a random file in place of the one attached to an Elm_Code instance.

Whether that's a good enough reason or not I couldn't say... I could map
them internally and throw exceptions when an invalid file is sent in.
If so then I could use a generic file definition.

Line on the other hand seems more specific as it's meaning a line of code
rather than any old text line. Though even that could have a generic line
handle I guess...

Andrew
On Fri, 2 Dec 2016 at 20:49, Carsten Haitzler  wrote:

> On Fri, 02 Dec 2016 19:58:35 + Andrew Williams 
> said:
>
> > Hi, as we're shifting everything to Eo I realised that in elm_code the
> only
> > object is Elm.Code_Widget. As the rest of elm is exposing widgets or
> > layouts I thought perhaps a larger refactor is needed than just moving
> the
> > various components to Eo.
> >
> > How about this:
> >
> > Elm.Code <- the main widget
> >
> > Elm.Code.Core (or Backend?) <- what used to be Elm_Code - the logic
> between
> > widgets and files
> > Elm.Code.File and Elm.Code.Line are pretty obvious
> >
> > Any thoughts? Alternative is to leave it as is and just port but somehow
> > Elm.Code.Widget does not feel right.
> >
> > Hopefully this could leave the unstable api at some point so I'd like to
> > get this agreed :)
>
> basically- can these interfaces ever be re-used somewhere else. line line
> api/control or file api - should it be an extension to the efl_file
> class/interface? should there be another that other objects can share?
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eo error message in my application

2016-12-03 Thread Vincent Torri
On Sat, Dec 3, 2016 at 7:44 PM, Gustavo Sverzut Barbieri
 wrote:
> On Sat, Dec 3, 2016 at 1:57 PM, Vincent Torri  wrote:
>> Hello
>>
>> I'm rewriting my multi-document viewer. I'm using EFL git,  and i have
>> that Eo error message :
>>
>> ERR<59568>:eo[T:3] lib/eo/eo.c:1663 efl_isa() Object 40007f56 is not a
>> valid object in this context: object domain: 0, current domain: 2,
>> local domain: 2, available domains: [  1 2  ]
>>
>> does someone have an idea of the problem ?
>
> the new efl in git provides more context to that message since
> yesterday, particularly if you use EO_LIFECYCLE_DEBUG=1 (envvar),
> since I was so pissed with such nebulous messages :-D

all the debug stuff does not work on Windows (it needs libunwind, or
at least DWARF parsing to get the debug symbols), but i will test on
Linux when I have time.

i've also seen some preload stuff you mentioned, which does not work
on Windows (it's a different method to do similar stuff)

> usually the object is already dead or was never created... If you're
> using threads (seems so due "[T:3]"), be aware that objects are bound
> to the thread they were created and you need to "import"  to use,
> Raster sent some email to the list and I recall som tests in the
> tree

I indeed use an ecore_thread

Vincent

> which reminds me that my EO_LIFECYCLE_DEBUG doesn't cover the
> domain... maybe it should.
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eo error message in my application

2016-12-03 Thread Gustavo Sverzut Barbieri
On Sat, Dec 3, 2016 at 7:13 PM, Vincent Torri  wrote:
> On Sat, Dec 3, 2016 at 7:44 PM, Gustavo Sverzut Barbieri
>  wrote:
>> On Sat, Dec 3, 2016 at 1:57 PM, Vincent Torri  
>> wrote:
>>> Hello
>>>
>>> I'm rewriting my multi-document viewer. I'm using EFL git,  and i have
>>> that Eo error message :
>>>
>>> ERR<59568>:eo[T:3] lib/eo/eo.c:1663 efl_isa() Object 40007f56 is not a
>>> valid object in this context: object domain: 0, current domain: 2,
>>> local domain: 2, available domains: [  1 2  ]
>>>
>>> does someone have an idea of the problem ?
>>
>> the new efl in git provides more context to that message since
>> yesterday, particularly if you use EO_LIFECYCLE_DEBUG=1 (envvar),
>> since I was so pissed with such nebulous messages :-D
>
> all the debug stuff does not work on Windows (it needs libunwind, or
> at least DWARF parsing to get the debug symbols), but i will test on
> Linux when I have time.
>
> i've also seen some preload stuff you mentioned, which does not work
> on Windows (it's a different method to do similar stuff)
>
>> usually the object is already dead or was never created... If you're
>> using threads (seems so due "[T:3]"), be aware that objects are bound
>> to the thread they were created and you need to "import"  to use,
>> Raster sent some email to the list and I recall som tests in the
>> tree
>
> I indeed use an ecore_thread

yes, reading the message again, not just the T:3 for the thread, but
also the "object domain: 0" (main thread) while "current domain: 2"
(secondary thread) would lead to a failure since raster added the
protection.

If you want to use auto-locks, then get the shared domain with:

efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
my_obj = efl_add(...);
efl_domain_current_pop();

check eo_test_general.c and Eo.h, they can give you an idea of what
can you do... basically all objects are bound to one thread (domain),
main thread or shared. Their parent must be in the same domain. This
allows TLS of eoid stuff, avoiding locks and possibly avoiding
concurrency bugs. Just the shared domains have locks as it used to be
in the whole eo.




-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Edje multiseat support

2016-12-03 Thread The Rasterman
On Sat, 03 Dec 2016 15:24:17 + Gustavo Sverzut Barbieri
 said:

> Just seat1, seat2...
> 
> That's what I said we found unusable to get "bob", "jane" in EDC.
> 
> In C you could snprintf() and add signals, or register with ",*" and then
> parse, BUT that's only in C or bindings, not EDC/Embryo since in a
> script/program you can't know the signal that triggered you.
> 
> In C you can retrieve bob from seat1, seat1 from bob and map accordingly.

ok. so edje will stick to simple seat1, seat2 etc. ok. sensible.

> From edc point of view, you can only write theme based on something you
> know. Like assign focus color red to seat1, green to seat2, blue to seat3.
> If you get bob, you can't figure it out since it is dependent on the system
> configuration.

yeah. unless the app emits these signals specifically as part of the edje <->
app "interface".

> Em sáb, 3 de dez de 2016 às 01:20, Carsten Haitzler 
> escreveu:
> 
> > On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly 
> > said:
> >
> > > Hi folks,
> > >
> > > now that multiseat is supported up to Evas, we’re working on Edje.
> > >
> > > The idea is that a developer would be able to implement an UI that
> > > may be used by more than one single seat, properly handling focus,
> > > and providing different feedback for different seats action.
> > >
> > > Let’s say, different colors on focus, different images when different
> > > seat pointers are over, etc.
> > >
> > > I’ve done an initial implementation and wrote an example. It’s available
> > > on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> > > edje_multiseat example (C code + EDC).
> > >
> > > To make this possible, a few main changes were done:
> > >   *  New signals were added, adding the seat as suffix. So “mouse,in”
> > would
> > > be still be emitted, but also “mouse,in,seat1”, for example
> > >   * Real Parts now may be focused by multiple seats
> > >   * Some actions receive an optional seat parameter. For instance,
> > > FOCUS_SET may receive the seat name, or it will consider it's about the
> > > default seat.
> > >* Since Evas seat devices may have arbitrary names (at least using
> > > wayland backend you can name them as you want using udev rules), or set
> > > them on programmatic ways, Edje will have custom names for seats,
> > following
> > > a well established pattern. So first announced seat will be named
> > “seat1”,
> > > the second “seat2”... If an application supports three seats, on EDC you
> > > know what signals you should expect. It makes it possible to write
> > general
> > > applications (in the sense of not knowing exactly seats beforehand). But
> > > let’s say it’s not the case. there is a specific product built in a way
> > > that they know exactly which seats are supported and configured their
> > > names, or want to check if this seat has pointer, keyboard, or whatever…
> > > for this cases, Edje also emits signals saying when devices were added
> > (or
> > > removed) and their names. With these names you can use a new Edje
> > function
> > > to fetch the Evas device named as “seat1”.
> > >
> > > Please let me know about any suggestions or concerns.
> > >
> > > I should make a pull request with this initial patchset soon
> >
> > wait... so seats can be named... udev rules. so lets say i have seats:
> >
> > bob
> > jane
> >
> > i get signals like:
> >
> > mouse,in,bob
> > mouse,out,jane
> >
> > right?
> >
> > so i ALSO get
> >
> > mouse,in,seat1
> > mouse,out,seat2
> >
> > ? so i can write specific seat name handling signal stuff AND also have
> > generic? or... ?
> >
> > --
> > - Codito, ergo sum - "I code, therefore I am" --
> > The Rasterman (Carsten Haitzler)ras...@rasterman.com
> >
> >
> >
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing li

Re: [E-devel] Elm_Code naming

2016-12-03 Thread The Rasterman
On Sat, 03 Dec 2016 20:07:51 + Andrew Williams  said:

> A good question,
> 
> Probably rather unlikely. Lots of the elm_code api would fall over if you
> sent a random file in place of the one attached to an Elm_Code instance.
> 
> Whether that's a good enough reason or not I couldn't say... I could map
> them internally and throw exceptions when an invalid file is sent in.
> If so then I could use a generic file definition.

ummm.. thats the file itslef. eg a .c or .h or .js or whatever file. i'm
speaking of the INTERFACE.

you have file_new, file_open, file_save, file_free, file_close, etc... so these
actions map to other stuff. i would say they do map to entry where entry
already has a save feature 9and auto-save too) you have filename_get...

in fact why so many api's? we already have a file interface in efl. file_set
and file_get. point thew object to a file and ob course that implicitle means
open it... and display it. there is a file_save too in efl's file interface.

in fact its bad because it returns a bool on success, thus forcing it to be
synchronous... the same with file_set returning a bool.

but my point is - why do you have a file interface on elm code that is
differnet tothe efl file interface? do you really need new, open, free, close,
etc? why create a whole new interface for peole to learn just to point a widget
at a file and do actions?

filename get vs path get? superfluous imho. path get is file_get - get  the
file path that was set. so drop filename get as there are apis eg in ecore_file
that will get the filename from a file path...

file_free? why? file_new? why? is a code widget not by default a "new" file in
memory? set file to NULL and its a new empty file. the moment you save it
then ... it becomes a real file? file_close? why? file_open - os that not
file_set? file_save is the same api as in the ore efl file interface...

now... file_line_ending_get and file_line_ending_chars_get - this now we are
talking about querying detected CONTENT properties or setting them, should the
be part of the file interface ? good q.

now file_clear, file_lines_get, file_line_append, insert, remove and get - do
these really being in the file interface for elm code? are they not part of
its content interface and content manipulation api?

my point here is. i've just looked at one interface for elm_code and i thing
that elm code likely shouldnt even have it and just inherit the efl file
interface. some of these funcs should be part of other content interfaces. now
line api's above - are these not sharable with elm's entry widget? do they not
really deal with the same content here? text and lines... ?

etc. i can go on...

> Line on the other hand seems more specific as it's meaning a line of code
> rather than any old text line. Though even that could have a generic line
> handle I guess...

as above. i kind of disagree. code is just a text file with lines specified by
the content (not by the screen layout with or without wrapping)... :)

> Andrew
> On Fri, 2 Dec 2016 at 20:49, Carsten Haitzler  wrote:
> 
> > On Fri, 02 Dec 2016 19:58:35 + Andrew Williams 
> > said:
> >
> > > Hi, as we're shifting everything to Eo I realised that in elm_code the
> > only
> > > object is Elm.Code_Widget. As the rest of elm is exposing widgets or
> > > layouts I thought perhaps a larger refactor is needed than just moving
> > the
> > > various components to Eo.
> > >
> > > How about this:
> > >
> > > Elm.Code <- the main widget
> > >
> > > Elm.Code.Core (or Backend?) <- what used to be Elm_Code - the logic
> > between
> > > widgets and files
> > > Elm.Code.File and Elm.Code.Line are pretty obvious
> > >
> > > Any thoughts? Alternative is to leave it as is and just port but somehow
> > > Elm.Code.Widget does not feel right.
> > >
> > > Hopefully this could leave the unstable api at some point so I'd like to
> > > get this agreed :)
> >
> > basically- can these interfaces ever be re-used somewhere else. line line
> > api/control or file api - should it be an extension to the efl_file
> > class/interface? should there be another that other objects can share?
> >
> > --
> > - Codito, ergo sum - "I code, therefore I am" --
> > The Rasterman (Carsten Haitzler)ras...@rasterman.com
> >
> >


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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eo error message in my application

2016-12-03 Thread The Rasterman
On Sat, 3 Dec 2016 20:25:46 -0200 Gustavo Sverzut Barbieri 
said:

> On Sat, Dec 3, 2016 at 7:13 PM, Vincent Torri  wrote:
> > On Sat, Dec 3, 2016 at 7:44 PM, Gustavo Sverzut Barbieri
> >  wrote:
> >> On Sat, Dec 3, 2016 at 1:57 PM, Vincent Torri 
> >> wrote:
> >>> Hello
> >>>
> >>> I'm rewriting my multi-document viewer. I'm using EFL git,  and i have
> >>> that Eo error message :
> >>>
> >>> ERR<59568>:eo[T:3] lib/eo/eo.c:1663 efl_isa() Object 40007f56 is not a
> >>> valid object in this context: object domain: 0, current domain: 2,
> >>> local domain: 2, available domains: [  1 2  ]
> >>>
> >>> does someone have an idea of the problem ?
> >>
> >> the new efl in git provides more context to that message since
> >> yesterday, particularly if you use EO_LIFECYCLE_DEBUG=1 (envvar),
> >> since I was so pissed with such nebulous messages :-D
> >
> > all the debug stuff does not work on Windows (it needs libunwind, or
> > at least DWARF parsing to get the debug symbols), but i will test on
> > Linux when I have time.
> >
> > i've also seen some preload stuff you mentioned, which does not work
> > on Windows (it's a different method to do similar stuff)
> >
> >> usually the object is already dead or was never created... If you're
> >> using threads (seems so due "[T:3]"), be aware that objects are bound
> >> to the thread they were created and you need to "import"  to use,
> >> Raster sent some email to the list and I recall som tests in the
> >> tree
> >
> > I indeed use an ecore_thread
> 
> yes, reading the message again, not just the T:3 for the thread, but
> also the "object domain: 0" (main thread) while "current domain: 2"
> (secondary thread) would lead to a failure since raster added the
> protection.

see the message is NOT nebulous. its giving you details the object belongs to
thread domain 0 but your current domain is 2. thus thread does not belong to
the same thread domain that created the object. domain 1 is the shared domain
so should you see object domain being 1 and it still isn't found that means
there is no object there at all ion the shared table.

the message is very explicit as to the core details of the issue. it's an
invalid object as far as the thread accessing it is concerned.

> If you want to use auto-locks, then get the shared domain with:
> 
> efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
> my_obj = efl_add(...);
> efl_domain_current_pop();

this isn't really an option UNLESS you created the class entirely inherited
from base class. i.e. the object class doesn't otherwise use any other
non-threadsafe data outside the object.

> check eo_test_general.c and Eo.h, they can give you an idea of what
> can you do... basically all objects are bound to one thread (domain),
> main thread or shared. Their parent must be in the same domain. This
> allows TLS of eoid stuff, avoiding locks and possibly avoiding
> concurrency bugs. Just the shared domains have locks as it used to be
> in the whole eo.

yup. and even creating shared objects comes with limitations. the intent is for
very specialized objects to become shared objects so multiple threads can chare
them. the general idea is you will have  very very very few shared objects, so
then the global mutex surrounding all shared objects isn't really a big
issue,but sometimes sharing an object is far easier and simpler than anything
else, and you are not that concerned about contention and performance. most
objects will be thread-local (and most efl objects will be main-loop local of
course).

but the error right now is very detailed and tells you exactly what it sees is
probably going wrong in the lookup so you can figure out if its a cross-thread
access problem OR that the object actually does not exist. be aware that
mainloop domain is 0, and the default domain for ALL other threads is 2. that
means create obj in one non-mainloop thread and access in another non-mainloop
thread ... both objects will have domain 1 BUT will have separate TLS based
local object tables so the same object may haver the same domain but not be
accessible across tables (there is a small chance you could get a
false-positive access, but given i now starts generation counts off at random
values per thread, its highly unlikely to have the same object id AND
generation count match).

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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-03 Thread The Rasterman
On Sat, 3 Dec 2016 09:58:20 -0200 Gustavo Sverzut Barbieri 
said:

> On Sat, Dec 3, 2016 at 12:31 AM, Carsten Haitzler 
> wrote:
> > On Sat, 03 Dec 2016 01:45:30 + Gustavo Sverzut Barbieri
> >  said:
> >
> >> Well, I did force and it "worked". Not much test, like I've noticed some
> >> cases check for class using just the eo_id...
> >
> > how can you force it? literally there's missing non-eoid code paths. eo will
> > mess up the pointer by mucking about with the bits in it... i'm amazed it
> > worked at all.. but i guarantee you it wont be correct either way.
> 
> go to eo_private.h and do:
> 
> #undef HAVE_EO_ID
> 
> I've tested with efl_net_dialer_simple_example, which does lots of
> objects and classes and inheritance. You get the following log when
> using that and the double free case:
> 
> $ LD_PRELOAD=src/lib/eo/.libs/libeo_dbg.so \
>EO_LIFECYCLE_NO_DEBUG=Efl_Loop_Timer,Efl_Promise,Efl_Future \
>EO_LIFECYCLE_DEBUG=1 \
>EINA_LOG_LEVELS=eo:3,eo_lifecycle:4 \
>libtool --mode=execute valgrind
> ./src/examples/ecore/efl_net_dialer_simple_example tcp localhost:1234
> 
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2736 _eo_log_obj_init() will log
> all object allocation and free
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
> log class 'Efl_Future'
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
> log class 'Efl_Promise'
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2812 _eo_log_obj_init() will NOT
> log class 'Efl_Loop_Timer'
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9723470 obj_id=0x9723470 class=0x9722bb0 (Efl_Vpath_Core)
> [0.1132]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9738a90 obj_id=0x9738a90 class=0x9737800 (Efl_Loop) [0.1645]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9782250 obj_id=0x9782250 class=0x97809f0 (Efl_Net_Dialer_Simple)
> [0.5570]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9782650 obj_id=0x9782650 class=0x977c210 (Efl_Net_Dialer_Tcp)
> [0.5736]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9783de0 obj_id=0x9783de0 class=0x9782930 (Efl_Io_Queue) [0.5963]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x9786360 obj_id=0x9786360 class=0x97841a0 (Efl_Io_Copier)
> [0.6090]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x978bb70 obj_id=0x978bb70 class=0x9782930 (Efl_Io_Queue) [0.6553]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2689 _eo_log_obj_new() new
> obj=0x978bf30 obj_id=0x978bf30 class=0x97841a0 (Efl_Io_Copier)
> [0.6588]
> INFO: sending 'Hello World!'
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x978bb70 obj_id=0x978bb70 class=0x9782930 (Efl_Io_Queue) [0.7322]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x978bf30 obj_id=0x978bf30 class=0x97841a0 (Efl_Io_Copier)
> [0.7472]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x9783de0 obj_id=0x9783de0 class=0x9782930 (Efl_Io_Queue) [0.7504]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x9786360 obj_id=0x9786360 class=0x97841a0 (Efl_Io_Copier)
> [0.7536]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x9782650 obj_id=0x9782650 class=0x977c210 (Efl_Net_Dialer_Tcp)
> [0.7730]
> DBG<13298>:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_free() free
> obj=0x9782250 obj_id=0x9782250 class=0x97809f0 (Efl_Net_Dialer_Simple)
> [0.7936]
> CRI<13298>: ../src/lib/eo/efl_object.eo.c:78 efl_del() *** Eina Magic
> Check Failed at 0x9782250 !!!
> Input handle is wrong type
> Expected: a186bc32 - Eo
> Supplied:  - (unknown)
> *** NAUGHTY PROGRAMMER!!!
> *** SPANK SPANK SPANK!!!
> *** Now go fix your code. Tut tut tut!
> 
> 
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> obj_id=0x9782250 created obj=0x9782250, class=0x97809f0
> (Efl_Net_Dialer_Simple) [0.5570s, 0.2536 ago]:
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> 0x0004e3ff1a: libeo_dbg.so+0x8f1a (in
> src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> 0x0004e3fbdd: _efl_add_internal_start+0x1cd (in
> src/lib/eo/.libs/libeo_dbg.so 0x4e37000)
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> 0x10a85f: lt-efl_net_dialer_simple_example+0x285f (in
> /home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
> 0x108000)
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> 0x0005c79291: __libc_start_main+0xf1 (in /usr/lib/libc.so.6
> 0x5c59000)
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
> 0x10a38a: _start+0x2a (in
> /home/gustavo/Development/git/efl/src/examples/ecore/.libs/lt-efl_net_dialer_simple_example
> 0x108000)
> ERR<13298>:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()