Hi,

In the last few days I have started seeing magic fails in the shutdown of
some examples. Such as the following:

ERR<18036>:ecore lib/ecore/ecore.c:790 _ecore_magic_fail()
*** ECORE ERROR: Ecore Magic Check Failed!!!
*** IN FUNCTION: ecore_main_fd_handler_del()
ERR<18036>:ecore lib/ecore/ecore.c:794 _ecore_magic_fail()   Input handle
has already been freed!
ERR<18036>:ecore lib/ecore/ecore.c:803 _ecore_magic_fail() *** NAUGHTY
PROGRAMMER!!!
*** SPANK SPANK SPANK!!!
*** Now go fix your code. Tut tut tut!

It is unfortunate that the errors are occurring but also a rather abrupt
output for a developer who has merely created an object and then exited the
program.
Please compile and run the following - tap some characters then ctrl-D and
see the error stream. :(

#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1

#include <stdio.h>
#include <fcntl.h>

#include <Eina.h>
#include <Efl_Core.h>

static void
_copier_done(void *data EINA_UNUSED, const Efl_Event *event)
{
   efl_exit(EXIT_SUCCESS);
}

EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
   Efl_Loop *loop;
   Eo *input, *output;

   loop = ev->object;

   input = efl_add(EFL_IO_STDIN_CLASS, loop);
   output = efl_add(EFL_IO_STDOUT_CLASS, loop);

   efl_add(EFL_IO_COPIER_CLASS, loop,
           efl_io_copier_source_set(efl_added, input),
           efl_io_copier_destination_set(efl_added, output),
           efl_event_callback_add(efl_added, EFL_IO_COPIER_EVENT_DONE,
_copier_done, NULL));

   printf("  Type something here and press enter, it will be copied to
stdout...\n");
   printf("  (press Ctrl-D to exit)\n");
}
EFL_MAIN()

-- 
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
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

Reply via email to