Page MenuHomePhabricator

elm_code internals pass null to functions
Closed, ResolvedPublic

Description

I ran the samples in elm_test and there were a few errors:

#0  _efl_object_call_resolve (eo_id=0x0, func_name=0x7ffff639fac2 "efl_gfx_entity_geometry_get", call=0x7fffffffce80, op=497, file=0x7ffff639fa10 "../src/lib/efl/interfaces/efl_gfx_entity.eo.c", line=14) at lib/eo/eo.c:637
#1  0x00007ffff6375515 in efl_gfx_entity_geometry_get (obj=0x0) at ../src/lib/efl/interfaces/efl_gfx_entity.eo.c:14
#2  0x00007ffff6645d6f in evas_object_geometry_get (eo_obj=0x0, x=0x0, y=0x7fffffffcf64, w=0x0, h=0x0) at lib/evas/canvas/evas_object_main.c:1561
#3  0x00007ffff592e2e4 in _elm_code_widget_cursor_ensure_visible (widget=0x400000bb382b) at lib/elementary/elm_code_widget.c:652
#4  0x00007ffff592e460 in _elm_code_widget_cursor_move (widget=0x400000bb382b, pd=0x555555e5e580, col=3, line=1) at lib/elementary/elm_code_widget.c:684
#5  0x00007ffff59323b5 in _elm_code_widget_cursor_position_set (obj=0x400000bb382b, pd=0x555555e5e580, row=1, col=3) at lib/elementary/elm_code_widget.c:2245
#6  0x00007ffff59356df in elm_obj_code_widget_cursor_position_set (obj=0x400000bb382b, row=1, col=3) at lib/elementary/elm_code_widget.eo.c:124
#7  0x00007ffff593709f in elm_code_widget_cursor_position_set (obj=0x400000bb382b, row=1, col=3) at lib/elementary/elm_code_widget.eo.c:450
#8  0x00007ffff592e0cc in _elm_code_widget_selection_cb (data=0x400000bb382b, event=0x7fffffffd150) at lib/elementary/elm_code_widget.c:580
#9  0x00007ffff6145f6c in _event_callback_call (obj_id=0x400000bb382b, pd=0x555555e5e180, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b, legacy_compare=1 '\001') at lib/eo/eo_base_class.c:1694
#10 0x00007ffff61462ad in _efl_object_event_callback_legacy_call (obj_id=0x400000bb382b, pd=0x555555e5e180, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1767
#11 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x400000bb382b, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1770
#12 0x00007ffff66449d8 in _efl_canvas_object_efl_object_event_callback_legacy_call (eo_obj=0x400000bb382b, obj=0x555555e5e1d0, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/evas/canvas/evas_object_main.c:1236
#13 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x400000bb382b, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1770
#14 0x00007ffff592ba91 in elm_code_widget_selection_end (widget=0x400000bb382b, line=1, col=13) at lib/elementary/elm_code_widget_selection.c:88
#15 0x0000555555592ef9 in _elm_code_test_welcome_setup (parent=0x400000bb2c28) at bin/elementary/test_code.c:85
#16 0x0000555555593abf in test_code_welcome (data=0x4000000076c5, obj=0x4000000f928d, event_info=0x0) at bin/elementary/test_code.c:351
#17 0x00007ffff6656653 in _eo_evas_smart_cb (data=0x555555f895d0, event=0x7fffffffd470) at lib/evas/canvas/evas_object_smart.c:78
#18 0x00007ffff6145f6c in _event_callback_call (obj_id=0x4000000f928d, pd=0x555555f70850, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0, legacy_compare=1 '\001') at lib/eo/eo_base_class.c:1694
#19 0x00007ffff61462ad in _efl_object_event_callback_legacy_call (obj_id=0x4000000f928d, pd=0x555555f70850, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1767
#20 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x4000000f928d, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1770
#21 0x00007ffff66449d8 in _efl_canvas_object_efl_object_event_callback_legacy_call (eo_obj=0x4000000f928d, obj=0x555555f708a0, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/evas/canvas/evas_object_main.c:1236
#22 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x4000000f928d, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1770
#23 0x00007ffff5912e14 in _activate (obj=0x4000000f928d) at lib/elementary/efl_ui_button.c:66
#24 0x00007ffff5913047 in _on_clicked_signal (data=0x4000000f928d, obj=0x4000000f968e, emission=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm") at lib/elementary/efl_ui_button.c:118
#25 0x00007ffff747af6a in edje_match_callback_exec_check_finals (ssp=0x555555f371b0, matches=0x555555efd0f0, signal_states=0x555555f06390, source_states=0x555555e369a8, sig=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm", ed=0x555555f70f90, prop=0 '\000') at lib/edje/edje_match.c:556
#26 0x00007ffff747b49f in edje_match_callback_exec (ssp=0x555555f371b0, matches=0x555555efd0f0, sig=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm", ed=0x555555f70f90, prop=0 '\000') at lib/edje/edje_match.c:711
#27 0x00007ffff7484f36 in _edje_emit_cb (ed=0x555555f70f90, sig=0x555555c2d21c "elm,action,click", src=0x555555bdb8d0 "elm", data=0x5555563e82b0, prop=0 '\000') at lib/edje/edje_program.c:1647
#28 0x00007ffff7484d81 in _edje_emit_handle (ed=0x555555f70f90, sig=0x555555c2d21c "elm,action,click", src=0x555555bdb8d0 "elm", sdata=0x5555563e82b0, prop=0 '\000') at lib/edje/edje_program.c:1589
#29 0x00007ffff747db8f in _edje_message_process (em=0x555556713300) at lib/edje/edje_message_queue.c:783
#30 0x00007ffff747dfa7 in _edje_message_queue_process () at lib/edje/edje_message_queue.c:886
#31 0x00007ffff747cb91 in _edje_job (data=0x0) at lib/edje/edje_message_queue.c:260
#32 0x00007ffff6aec173 in _ecore_job_event_handler (data=0x0, type=14, ev=0x555555c13e90) at lib/ecore/ecore_job.c:98
#33 0x00007ffff6af2b20 in _ecore_event_message_handler_efl_loop_message_handler_message_call (obj=0x4000000016ad, pd=0x555555927020, message=0x400000b95bc1) at lib/ecore/ecore_event_message_handler.c:359
#34 0x00007ffff6afd1f4 in efl_loop_message_handler_message_call (obj=0x4000000016ad, message=0x400000b95bc1) at lib/ecore/efl_loop_message_handler.eo.c:14
#35 0x00007ffff6af7e6c in _efl_loop_message_process (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/efl_loop.c:633
#36 0x00007ffff6af805d in efl_loop_message_process (obj=0x4000000002a8) at lib/ecore/efl_loop.c:663
#37 0x00007ffff6af0649 in _ecore_main_loop_iterate_internal (obj=0x4000000002a8, pd=0x55555591cd00, once_only=0) at lib/ecore/ecore_main.c:2432
#38 0x00007ffff6aedd4a in _ecore_main_loop_begin (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/ecore_main.c:1175
#39 0x00007ffff6af663b in _efl_loop_begin (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/efl_loop.c:83
#40 0x00007ffff6af8d52 in efl_loop_begin (obj=0x4000000002a8) at lib/ecore/efl_loop.eo.c:28
#41 0x0000555555582cbb in main (argc=1, argv=0x7fffffffdd38) at bin/elementary/test.c:1348


#0  _efl_object_call_resolve (eo_id=0x0, func_name=0x7ffff74b92c7 "efl_layout_signal_emit", call=0x7fffffffcf20, op=1151, file=0x7ffff74b9248 "lib/edje/efl_layout_signal.eo.c", line=4) at lib/eo/eo.c:637
#1  0x00007ffff748be06 in efl_layout_signal_emit (obj=0x0, emission=0x7ffff5b9cc1a "elm,action,show,cursor", source=0x7ffff5b9cbe1 "elm") at lib/edje/efl_layout_signal.eo.c:4
#2  0x00007ffff5a2533a in elm_layout_signal_emit (obj=0x0, emission=0x7ffff5b9cc1a "elm,action,show,cursor", source=0x7ffff5b9cbe1 "elm") at lib/elementary/efl_ui_layout_object.c:2742
#3  0x00007ffff592e4cc in _elm_code_widget_cursor_move (widget=0x400000bb382b, pd=0x555555e5e580, col=3, line=1) at lib/elementary/elm_code_widget.c:690
#4  0x00007ffff59323b5 in _elm_code_widget_cursor_position_set (obj=0x400000bb382b, pd=0x555555e5e580, row=1, col=3) at lib/elementary/elm_code_widget.c:2245
#5  0x00007ffff59356df in elm_obj_code_widget_cursor_position_set (obj=0x400000bb382b, row=1, col=3) at lib/elementary/elm_code_widget.eo.c:124
#6  0x00007ffff593709f in elm_code_widget_cursor_position_set (obj=0x400000bb382b, row=1, col=3) at lib/elementary/elm_code_widget.eo.c:450
#7  0x00007ffff592e0cc in _elm_code_widget_selection_cb (data=0x400000bb382b, event=0x7fffffffd150) at lib/elementary/elm_code_widget.c:580
#8  0x00007ffff6145f6c in _event_callback_call (obj_id=0x400000bb382b, pd=0x555555e5e180, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b, legacy_compare=1 '\001') at lib/eo/eo_base_class.c:1694
#9  0x00007ffff61462ad in _efl_object_event_callback_legacy_call (obj_id=0x400000bb382b, pd=0x555555e5e180, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1767
#10 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x400000bb382b, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1770
#11 0x00007ffff66449d8 in _efl_canvas_object_efl_object_event_callback_legacy_call (eo_obj=0x400000bb382b, obj=0x555555e5e1d0, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/evas/canvas/evas_object_main.c:1236
#12 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x400000bb382b, desc=0x7ffff5e5f4f0 <_ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CHANGED>, event_info=0x400000bb382b) at lib/eo/eo_base_class.c:1770
#13 0x00007ffff592ba91 in elm_code_widget_selection_end (widget=0x400000bb382b, line=1, col=13) at lib/elementary/elm_code_widget_selection.c:88
#14 0x0000555555592ef9 in _elm_code_test_welcome_setup (parent=0x400000bb2c28) at bin/elementary/test_code.c:85
#15 0x0000555555593abf in test_code_welcome (data=0x4000000076c5, obj=0x4000000f928d, event_info=0x0) at bin/elementary/test_code.c:351
#16 0x00007ffff6656653 in _eo_evas_smart_cb (data=0x555555f895d0, event=0x7fffffffd470) at lib/evas/canvas/evas_object_smart.c:78
#17 0x00007ffff6145f6c in _event_callback_call (obj_id=0x4000000f928d, pd=0x555555f70850, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0, legacy_compare=1 '\001') at lib/eo/eo_base_class.c:1694
#18 0x00007ffff61462ad in _efl_object_event_callback_legacy_call (obj_id=0x4000000f928d, pd=0x555555f70850, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1767
#19 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x4000000f928d, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1770
#20 0x00007ffff66449d8 in _efl_canvas_object_efl_object_event_callback_legacy_call (eo_obj=0x4000000f928d, obj=0x555555f708a0, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/evas/canvas/evas_object_main.c:1236
#21 0x00007ffff6146353 in efl_event_callback_legacy_call (obj=0x4000000f928d, desc=0x7ffff65af260 <_EFL_UI_EVENT_CLICKED>, event_info=0x0) at lib/eo/eo_base_class.c:1770
#22 0x00007ffff5912e14 in _activate (obj=0x4000000f928d) at lib/elementary/efl_ui_button.c:66
#23 0x00007ffff5913047 in _on_clicked_signal (data=0x4000000f928d, obj=0x4000000f968e, emission=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm") at lib/elementary/efl_ui_button.c:118
#24 0x00007ffff747af6a in edje_match_callback_exec_check_finals (ssp=0x555555f371b0, matches=0x555555efd0f0, signal_states=0x555555f06390, source_states=0x555555e369a8, sig=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm", ed=0x555555f70f90, prop=0 '\000') at lib/edje/edje_match.c:556
#25 0x00007ffff747b49f in edje_match_callback_exec (ssp=0x555555f371b0, matches=0x555555efd0f0, sig=0x555555c2d21c "elm,action,click", source=0x555555bdb8d0 "elm", ed=0x555555f70f90, prop=0 '\000') at lib/edje/edje_match.c:711
#26 0x00007ffff7484f36 in _edje_emit_cb (ed=0x555555f70f90, sig=0x555555c2d21c "elm,action,click", src=0x555555bdb8d0 "elm", data=0x5555563e82b0, prop=0 '\000') at lib/edje/edje_program.c:1647
#27 0x00007ffff7484d81 in _edje_emit_handle (ed=0x555555f70f90, sig=0x555555c2d21c "elm,action,click", src=0x555555bdb8d0 "elm", sdata=0x5555563e82b0, prop=0 '\000') at lib/edje/edje_program.c:1589
#28 0x00007ffff747db8f in _edje_message_process (em=0x555556713300) at lib/edje/edje_message_queue.c:783
#29 0x00007ffff747dfa7 in _edje_message_queue_process () at lib/edje/edje_message_queue.c:886
#30 0x00007ffff747cb91 in _edje_job (data=0x0) at lib/edje/edje_message_queue.c:260
#31 0x00007ffff6aec173 in _ecore_job_event_handler (data=0x0, type=14, ev=0x555555c13e90) at lib/ecore/ecore_job.c:98
#32 0x00007ffff6af2b20 in _ecore_event_message_handler_efl_loop_message_handler_message_call (obj=0x4000000016ad, pd=0x555555927020, message=0x400000b95bc1) at lib/ecore/ecore_event_message_handler.c:359
#33 0x00007ffff6afd1f4 in efl_loop_message_handler_message_call (obj=0x4000000016ad, message=0x400000b95bc1) at lib/ecore/efl_loop_message_handler.eo.c:14
#34 0x00007ffff6af7e6c in _efl_loop_message_process (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/efl_loop.c:633
#35 0x00007ffff6af805d in efl_loop_message_process (obj=0x4000000002a8) at lib/ecore/efl_loop.c:663
#36 0x00007ffff6af0649 in _ecore_main_loop_iterate_internal (obj=0x4000000002a8, pd=0x55555591cd00, once_only=0) at lib/ecore/ecore_main.c:2432
#37 0x00007ffff6aedd4a in _ecore_main_loop_begin (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/ecore_main.c:1175
#38 0x00007ffff6af663b in _efl_loop_begin (obj=0x4000000002a8, pd=0x55555591cd00) at lib/ecore/efl_loop.c:83
#39 0x00007ffff6af8d52 in efl_loop_begin (obj=0x4000000002a8) at lib/ecore/efl_loop.eo.c:28
#40 0x0000555555582cbb in main (argc=1, argv=0x7fffffffdd38) at bin/elementary/test.c:1348
WRN<6933>:eo lib/eo/eo.c:637 _efl_object_call_resolve() NULL passed to function efl_layout_signal_emit().

Possibly others?

zmike created this task.Jun 18 2018, 10:18 AM
zmike triaged this task as High priority.

Hey @ajwillia.ms !

Is this ticket still valid?

ajwillia.ms removed ajwillia.ms as the assignee of this task.Jun 22 2018, 2:00 PM
ajwillia.ms added a subscriber: ajwillia.ms.

Pretty sure it's not - perhaps @zmike can verify?

zmike added a comment.Jun 22 2018, 2:03 PM

It is. Look at the date.

Could someone see if this patch fixes it? I cannot currently test master...
I can't see the cause of the second issue - the null seems to be within layout code somehow...

index 3f8527e44c..77bc789bef 100644

  • a/src/lib/elementary/elm_code_widget.c

+++ b/src/lib/elementary/elm_code_widget.c
@@ -641,7 +641,7 @@ static void
_elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget)
{

Evas_Coord viewx, viewy, vieww, viewh, cellw = 0, cellh = 0;
  • Evas_Coord curx, cury, oy, rowy;

+ Evas_Coord curx, cury, oy, rowy = 0;

Evas_Object *grid;
Elm_Code_Widget_Data *pd;
int gutter;

@@ -653,7 +653,7 @@ _elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget)

_elm_code_widget_cell_size_get(widget, &cellw, &cellh);

grid = eina_list_data_get(eina_list_nth_list(pd->grids, pd->cursor_line - 1));
  • evas_object_geometry_get(grid, NULL, &rowy, NULL, NULL);

+ if (grid) evas_object_geometry_get(grid, NULL, &rowy, NULL, NULL);

gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
curx = (pd->cursor_col + gutter - 1) * cellw;

Yes, adding a null check would resolve one of the errors, but is this the correct way to fix it?

netstar closed this task as Resolved.Aug 15 2018, 2:13 AM
netstar claimed this task.

This is fixed. I'm using elm_code and nothing bad is being printed to the console. EFL revision as of 20 minutes ago of posting this.