Page MenuHomePhabricator

efl_ui_calendar crash issue.
Closed, ResolvedPublic

Description

Reproduce path.

1 Open eleemtnary_test - efl_ui_calendar sample app.

2 Close the sample app window.

3 See the crash.

_efl_ui_calendar_item_efl_ui_focus_object_focus_set() called twice.

When it calling second time the efl_parent_get(obj) is NULL.

It makes crash.

The obj's parent set as null in the '_efl_invalidate()' in eo_base_class.c

Can you please take a look this crash?

BACKTRACE

#0 _get_item_day (obj=obj@entry=0x0, selected_it=selected_it@entry=0) at lib/elementary/efl_ui_calendar.c:668
#1 0x00007ffff57d9cc1 in _update_focused_it (obj=0x0, focused_it=focused_it@entry=0) at lib/elementary/efl_ui_calendar.c:715
#2 0x00007ffff57dc1be in _efl_ui_calendar_item_efl_ui_focus_object_focus_set (obj=0x400000b47286, pd=0x555556041740, focus=<optimized out>) at lib/elementary/efl_ui_calendar.c:1262
#3 0x00007ffff597586c in efl_ui_focus_object_focus_set (obj=obj@entry=0x400000b47286, focus=focus@entry=0 '\000') at lib/elementary/efl_ui_focus_object.eo.c:17
#4 0x00007ffff5972fb2 in _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set (obj=0x400000ad58c0, pd=<optimized out>, focus=<optimized out>) at lib/elementary/efl_ui_focus_manager_calc.c:1378
#5 0x00007ffff596faec in efl_ui_focus_manager_focus_set (obj=obj@entry=0x400000ad58c0, focus=0x400000bb4035) at lib/elementary/efl_ui_focus_manager.eo.c:11
#6 0x00007ffff5972670 in _efl_ui_focus_manager_calc_unregister (obj=0x400000ad58c0, pd=0x5555562802a0, child=0x400000b47286) at lib/elementary/efl_ui_focus_manager_calc.c:753
#7 0x00007ffff5970d0c in efl_ui_focus_manager_calc_unregister (obj=0x400000ad58c0, child=0x400000b47286) at lib/elementary/efl_ui_focus_manager_calc.eo.c:42
#8 0x00007ffff6256a4b in _event_callback_call (legacy_compare=0 '\000', event_info=<optimized out>, desc=0x7ffff6460a30 <_EFL_EVENT_DEL>, pd=0x5555560416f0, obj_id=<optimized out>) at lib/eo/eo_base_class.c:1676
#9 _efl_object_event_callback_call (obj_id=<optimized out>, pd=0x5555560416f0, desc=0x7ffff6460a30 <_EFL_EVENT_DEL>, event_info=<optimized out>) at lib/eo/eo_base_class.c:1760
#10 0x00007ffff62517c5 in efl_event_callback_call (obj=0x400000b47286, desc=desc@entry=0x7ffff6460a30 <_EFL_EVENT_DEL>, event_info=event_info@entry=0x0) at lib/eo/eo_base_class.c:1763
#11 0x00007ffff625862c in _efl_del_internal (file=0x7ffff625b3e5 "lib/eo/eo_base_class.c", line=185, func_name=<synthetic pointer>, obj=0x5555560416b0) at lib/eo/eo_private.h:295
#12 _efl_unref_internal (file=0x7ffff625b3e5 "lib/eo/eo_base_class.c", line=185, func_name=<synthetic pointer>, obj=0x5555560416b0) at lib/eo/eo_private.h:380
#13 _efl_invalidate (obj=obj@entry=0x555555e24350) at lib/eo/eo_base_class.c:185
#14 0x00007ffff6258994 in _efl_object_parent_set (obj=0x400000aed11e, pd=0x555555e24390, parent_id=0x0) at lib/eo/eo_base_class.c:736
#15 0x00007ffff625199c in efl_parent_set (obj=obj@entry=0x400000aed11e, parent=parent@entry=0x0) at lib/eo/efl_object.eo.c:12
#16 0x00007ffff6258ca2 in efl_del (obj=obj@entry=0x400000aed11e) at lib/eo/eo_base_class.c:688
#17 0x00007ffff6747dc1 in evas_object_del (obj=obj@entry=0x400000aed11e) at lib/evas/canvas/evas_object_main.c:1043
#18 0x00007ffff5937a25 in _efl_ui_widget_efl_canvas_group_group_del (obj=0x400000aec11a, sd=0x5555564d7700) at lib/elementary/efl_ui_widget.c:857
#19 0x00007ffff6754ca4 in efl_canvas_group_del (obj=0x400000aec11a) at lib/evas/canvas/evas_object_smart.c:1854
#20 0x00007ffff6754ca4 in efl_canvas_group_del (obj=obj@entry=0x400000aec11a) at lib/evas/canvas/evas_object_smart.c:1854
#21 0x00007ffff6757bf9 in evas_object_smart_del (eo_obj=0x400000aec11a) at lib/evas/canvas/evas_object_smart.c:1288
#22 0x00007ffff6748f61 in _efl_canvas_object_efl_object_invalidate (eo_obj=0x400000aec11a, obj=0x5555564d7540) at lib/evas/canvas/evas_object_main.c:1338
#23 0x00007ffff62526b4 in efl_invalidate (obj=0x400000aec11a) at lib/eo/efl_object.eo.c:72
#24 0x00007ffff62526b4 in efl_invalidate (obj=0x400000aec11a) at lib/eo/efl_object.eo.c:72
#25 0x00007ffff6258374 in _efl_invalidate (obj=obj@entry=0x5555564d74b0) at lib/eo/eo_base_class.c:171
#26 0x00007ffff6258994 in _efl_object_parent_set (obj=0x400000aec11a, pd=0x5555564d74f0, parent_id=0x0) at lib/eo/eo_base_class.c:736
#27 0x00007ffff625199c in efl_parent_set (obj=obj@entry=0x400000aec11a, parent=parent@entry=0x0) at lib/eo/efl_object.eo.c:12
#28 0x00007ffff6258ca2 in efl_del (obj=0x400000aec11a) at lib/eo/eo_base_class.c:688
#29 0x00007ffff6755776 in _evas_wrap_del (eo=<optimized out>, pd=<optimized out>) at ../src/lib/evas/include/evas_inline.x:363
#30 _efl_canvas_group_group_members_all_del_internal (o=o@entry=0x5555566605a0) at lib/evas/canvas/evas_object_smart.c:592
#31 0x00007ffff6755815 in _efl_canvas_group_group_del (eo_obj=<optimized out>, o=0x5555566605a0) at lib/evas/canvas/evas_object_smart.c:825
#32 0x00007ffff6754ca4 in efl_canvas_group_del (obj=0x400000ad74c7) at lib/evas/canvas/evas_object_smart.c:1854
#33 0x00007ffff6754ca4 in efl_canvas_group_del (obj=obj@entry=0x400000ad74c7) at lib/evas/canvas/evas_object_smart.c:1854
#34 0x00007ffff6757bf9 in evas_object_smart_del (eo_obj=0x400000ad74c7) at lib/evas/canvas/evas_object_smart.c:1288
#35 0x00007ffff6748f61 in _efl_canvas_object_efl_object_invalidate (eo_obj=0x400000ad74c7, obj=0x555556660470) at lib/evas/canvas/evas_object_main.c:1338
#36 0x00007ffff62526b4 in efl_invalidate (obj=0x400000ad74c7) at lib/eo/efl_object.eo.c:72
#37 0x00007ffff6258374 in _efl_invalidate (obj=obj@entry=0x5555566603e0) at lib/eo/eo_base_class.c:171
#38 0x00007ffff6258994 in _efl_object_parent_set (obj=0x400000ad74c7, pd=0x555556660420, parent_id=0x0) at lib/eo/eo_base_class.c:736
#39 0x00007ffff625199c in efl_parent_set (obj=obj@entry=0x400000ad74c7, parent=parent@entry=0x0) at lib/eo/efl_object.eo.c:12
#40 0x00007ffff6258ca2 in efl_del (obj=0x400000ad74c7) at lib/eo/eo_base_class.c:688
#41 0x00007ffff6747dc1 in evas_object_del (obj=<optimized out>) at lib/evas/canvas/evas_object_main.c:1043
#42 0x00007ffff5945b16 in _efl_ui_win_efl_canvas_group_group_del (obj=0x400000ad1cb5, sd=0x5555564fa880) at lib/elementary/efl_ui_win.c:2869
#43 0x00007ffff6754ca4 in efl_canvas_group_del (obj=obj@entry=0x400000ad1cb5) at lib/evas/canvas/evas_object_smart.c:1854
#44 0x00007ffff6757bf9 in evas_object_smart_del (eo_obj=0x400000ad1cb5) at lib/evas/canvas/evas_object_smart.c:1288
#45 0x00007ffff6748f61 in _efl_canvas_object_efl_object_invalidate (eo_obj=0x400000ad1cb5, obj=0x5555564fa520) at lib/evas/canvas/evas_object_main.c:1338
#46 0x00007ffff62526b4 in efl_invalidate (obj=0x400000ad1cb5) at lib/eo/efl_object.eo.c:72
#47 0x00007ffff62526b4 in efl_invalidate (obj=0x400000ad1cb5) at lib/eo/efl_object.eo.c:72
#48 0x00007ffff6258374 in _efl_invalidate (obj=obj@entry=0x5555564fa490) at lib/eo/eo_base_class.c:171
#49 0x00007ffff6258994 in _efl_object_parent_set (obj=0x400000ad1cb5, pd=0x5555564fa4d0, parent_id=0x0) at lib/eo/eo_base_class.c:736
#50 0x00007ffff625199c in efl_parent_set (obj=obj@entry=0x400000ad1cb5, parent=parent@entry=0x0) at lib/eo/efl_object.eo.c:12
#51 0x00007ffff6258ca2 in efl_del (obj=0x400000ad1cb5) at lib/eo/eo_base_class.c:688
#52 0x00007ffff5947c13 in _elm_win_delete_request (ee=<optimized out>) at lib/elementary/efl_ui_win.c:3110
#53 0x00007fffe62191a9 in _ecore_evas_x_event_window_delete_request (data=<optimized out>, type=<optimized out>, event=0x555556388a40) at modules/ecore_evas/engines/x/ecore_evas_x.c:1786
#54 0x00007ffff6b75824 in _ecore_event_message_handler_efl_loop_message_handler_message_call (obj=0x400000001737, pd=0x5555558c66d0, message=0x400000be6746) at lib/ecore/ecore_event_message_handler.c:359
#55 0x00007ffff6b7c4ac in efl_loop_message_handler_message_call (obj=0x400000001737, message=0x400000be6746) at lib/ecore/efl_loop_message_handler.eo.c:14
#56 0x00007ffff6b786dd in _efl_loop_message_process (obj=<optimized out>, pd=0x5555558bf330) at lib/ecore/efl_loop.c:633
#57 0x00007ffff6b77355 in efl_loop_message_process (obj=obj@entry=0x400000000332) at lib/ecore/efl_loop.c:663
#58 0x00007ffff6b72351 in _ecore_main_loop_iterate_internal (obj=obj@entry=0x400000000332, pd=pd@entry=0x5555558bf330, once_only=once_only@entry=0) at lib/ecore/ecore_main.c:2450
#59 0x00007ffff6b72b5d in _ecore_main_loop_begin (obj=<optimized out>, pd=pd@entry=0x5555558bf330) at lib/ecore/ecore_main.c:1183
#60 0x00007ffff6b78609 in _efl_loop_begin (obj=<optimized out>, pd=0x5555558bf330) at lib/ecore/efl_loop.c:83
#61 0x00007ffff6b775f5 in efl_loop_begin (obj=0x400000000332) at lib/ecore/efl_loop.eo.c:28
#62 0x000055555557c8df in main (argc=1, argv=0x7fffffffdda8) at bin/elementary/test.c:1352

CHAN created this task.Jul 26 2018, 12:55 AM
zmike added a subscriber: zmike.Jul 30 2018, 2:34 PM

Checking with (I think?) latest EFL reveals that the focus manager (src/lib/elementary/efl_ui_focus_manager_calc.c:1378) is trying to unset focus on the last-focused item if it exists. Probably items should be removed from the focus stack once they are invalidated to avoid this?

CHAN added a comment.Aug 13 2018, 4:07 AM

Thanks @bu5hm4n.

There is no crash anymore with your patches.

zmike closed this task as Resolved.Aug 13 2018, 4:56 AM

@zmike not resolved yet, the last patch still misses a review and merge.

zmike reopened this task as Open.Aug 13 2018, 6:58 AM

Oops