Page MenuHomePhabricator

Segmentation Fault by ecore_main_loop_iterate
Closed, ResolvedPublic

Description

Running this application causes a segmentation fault because of ecore_main_loop_iterate

#define EFL_BETA_API_SUPPORT 1
#include <Efl_Ui.h>


static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
   efl_exit(0);
}
 
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
   Eo *win, *box, *canvas_text;
 
   win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
   efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
  ecore_main_loop_iterate();
}
EFL_MAIN()

/******************************************/

Call Stack

libeo.so.1!_event_callback_call(Eo * obj_id, Efl_Object_Data * pd, const Efl_Event_Description * desc, void * event_info, Eina_Bool legacy_compare) (/home/ali/efl/src/lib/eo/eo_base_class.c:2092)
libeo.so.1!_efl_object_event_callback_call(Eo * obj_id, Efl_Object_Data * pd, const Efl_Event_Description * desc, void * event_info) (/home/ali/efl/src/lib/eo/eo_base_class.c:2183)
libeo.so.1!efl_event_callback_call(Eo * obj, const Efl_Event_Description * desc, void * event_info) (/home/ali/efl/src/lib/eo/eo_base_class.c:2186)
libecore.so.1!_ecore_main_loop_iterate_internal(Eo * obj, Efl_Loop_Data * pd, int once_only) (/home/ali/efl/src/lib/ecore/ecore_main.c:2520)
libecore.so.1!_ecore_main_loop_iterate(Eo * obj, Efl_Loop_Data * pd) (/home/ali/efl/src/lib/ecore/ecore_main.c:1133)
libecore.so.1!_efl_loop_iterate(Eo * obj, Efl_Loop_Data * pd) (/home/ali/efl/src/lib/ecore/efl_loop.c:45)
libecore.so.1!efl_loop_iterate(Eo * obj) (/home/ali/efl/build/src/lib/ecore/efl_loop.eo.c:20)
libecore.so.1!ecore_main_loop_iterate() (/home/ali/efl/src/lib/ecore/ecore_main.c:1287)
efl_main(void * data, const Efl_Event * ev) (/home/ali/OOM_DEMO/source.c:20)
libeo.so.1!_event_callback_call(Eo * obj_id, Efl_Object_Data * pd, const Efl_Event_Description * desc, void * event_info, Eina_Bool legacy_compare) (/home/ali/efl/src/lib/eo/eo_base_class.c:2130)
libeo.so.1!_efl_object_event_callback_call(Eo * obj_id, Efl_Object_Data * pd, const Efl_Event_Description * desc, void * event_info) (/home/ali/efl/src/lib/eo/eo_base_class.c:2183)
libeo.so.1!efl_event_callback_call(Eo * obj, const Efl_Event_Description * desc, void * event_info) (/home/ali/efl/src/lib/eo/eo_base_class.c:2186)
libecore.so.1!_efl_loop_arguments_send(Eo * o, void * data, const Eina_Value v) (/home/ali/efl/src/lib/ecore/efl_loop.c:344)
libeo.so.1!_efl_future_cb(void * data, const Eina_Value value, const Eina_Future * dead_future) (/home/ali/efl/src/lib/eo/eo_base_class.c:2586)
libeina.so.1!_eina_future_cb_dispatch(Eina_Future * f, const Eina_Value value) (/home/ali/efl/src/lib/eina/eina_promise.c:358)
libeina.so.1!_eina_future_dispatch_internal(Eina_Future ** f, const Eina_Value value) (/home/ali/efl/src/lib/eina/eina_promise.c:375)
libeina.so.1!_eina_future_dispatch(Eina_Future_Scheduler * scheduler, Eina_Future * f, Eina_Value value) (/home/ali/efl/src/lib/eina/eina_promise.c:394)
libeina.so.1!_eina_future_dispatch(Eina_Future_Scheduler * scheduler, Eina_Future * f, Eina_Value value) (/home/ali/efl/src/lib/eina/eina_promise.c:424)
libeina.so.1!_scheduled_entry_cb(Eina_Future * f, Eina_Value value) (/home/ali/efl/src/lib/eina/eina_promise.c:438)
libeo.so.1!_futures_dispatch_cb(void * data, const Efl_Event * ev) (/home/ali/efl/src/lib/eo/eo_base_class.c:1848)
ali.alzyod triaged this task as Normal priority.

Mistake found, give me a few hours to run tests.