Sometimes you want to delete a object in a CLICKED event. Which is fine. However, due to the fact that CLICKED events are sometimes emitted as a reaction to edje signals, calling edje_object_message_signal_process (or the unified variant) does cause lifetime issues.
Solutions to this i am seeing:
- Equip every single edje_object_message_signal_process call with a check if the object is invalidated after it
- Defer the CLICKED event emission in efl_action_connector.c (line 20,29,38), into a job.
- Call edje_object_message_signal_process before critical efl_invalidate checks, in order to prevent the object from beeing invalidated due to a later call to edje_object_message_signal_process
If you want to see this happening, apply: D11072, start ./src/bin/elementary/elementary_test -to "Efl.Ui.Textbox" select a text, and press Cut. The problem is, that the clicked event is deleting the popup, which is basically fine. However, due to a call to edje_object_message_signal_process in efl_ui_layout.c:681 the object dies in the middle of the callstack, which results in errors.