On EFL master (0f7c5582a4873711e0e086a8c725ffe899e29bcf), I observe that after a long time of execution of a program using ecore_exe to spawn another program that my handler ssociated to ECORE_EXE_EVENT_ADD is called at unexpected times, with the data parameter being NULL.
I reproduce this daily with eovim. When eovim starts, it creates ONE instance of the neovim process, and lives as long as the neovim process lives. In my workflow, eovim is still running before the night, and when I come back in the morning, I find eovim to be dead.
After leaving Eovim attached to GDB, I woke up to this backtrace:
#0 0x000055555555e2c7 in _nvim_added_cb () #1 0x00007ffff6f42ce9 in _ecore_event_message_handler_efl_loop_message_handler_message_call (obj=0x400000000e8a, pd=0x55555579cf00, message=0x40000018a4bb) at ../../src/lib/ecore/ecore_event_message_handler.c:335 #2 0x00007ffff6f488d5 in efl_loop_message_handler_message_call (obj=0x400000000e8a, message=0x40000018a4bb) at ../src/lib/ecore/efl_loop_message_handler.eo.c:14 #3 0x00007ffff6f44ea9 in _efl_loop_message_process (obj=<optimized out>, pd=0x555555795d10) at ../../src/lib/ecore/efl_loop.c:649 #4 0x00007ffff6f43f2d in efl_loop_message_process (obj=obj@entry=0x400000000287) at ../../src/lib/ecore/efl_loop.c:679 #5 0x00007ffff6f3f649 in _ecore_main_loop_iterate_internal (obj=obj@entry=0x400000000287, pd=pd@entry=0x555555795d10, once_only=once_only@entry=0) at ../../src/lib/ecore/ecore_main.c:2431 #6 0x00007ffff6f3ff85 in _ecore_main_loop_begin (obj=0x400000000287, pd=pd@entry=0x555555795d10) at ../../src/lib/ecore/ecore_main.c:1162 #7 0x00007ffff6f43e99 in _efl_loop_begin (obj=<optimized out>, pd=0x555555795d10) at ../../src/lib/ecore/efl_loop.c:85 #8 0x00007ffff6f4440d in efl_loop_begin (obj=0x400000000287) at ../src/lib/ecore/efl_loop.eo.c:44 #9 0x00007ffff6f40057 in ecore_main_loop_begin () at ../../src/lib/ecore/ecore_main.c:1235 #10 0x000055555555d84b in elm_main () #11 0x000055555555d90a in main ()
(gdb) f 1 #1 0x00007ffff6f42ce9 in _ecore_event_message_handler_efl_loop_message_handler_message_call (obj=0x400000000e8a, pd=0x55555579cf00, message=0x40000018a4bb) at ../../src/lib/ecore/ecore_event_message_handler.c:335 335 if (!h->func(h->data, h->type, data)) break; (gdb) list 330 pd->handlers_walking++; 331 EINA_INLIST_FOREACH(pd->handlers[type], h) 332 { 333 if (h->delete_me) continue; 334 handled++; 335 if (!h->func(h->data, h->type, data)) break; 336 } 337 pd->handlers_walking--; 338 pd->current_event_data = NULL; 339 pd->current_event_type = -1;
And the data associated to the event is NULL:
(gdb) p *h $2 = {__in_list = {next = 0x0, prev = 0x0, last = 0x5555558a39f0}, func = 0x55555555e2a8 <_nvim_added_cb>, data = 0x0, type = 10, delete_me = 0 '\000', to_add = 0 '\000'}
I can easily test for NULL in my handler as a bandaid, but I don't think this is the normal, expected behavior.