Page MenuHomePhabricator

efl internals pass null objects to functions which should not be passed null
Open, HighPublic

Description

An object function should never be passed null as the object. Example:

evas_object_geometry_get(NULL, &x, &y, &w, &h) is not a valid call.

This is a tracking ticket for the overall issue. eo.c:637 is the line of the error message and can be used with gdb to easily catch instances of it.

Details

Differential Revisions
D6703: elementary: Check for valid object before calling smart calculate
D6702: elementary: Check for valid object before calling efl internal functions
D6638: elementary: Check for valid resize obj before calling size_hint_combined_min_get
D6318: eo: upgrade missing parent WRN to ERR
Commits
D7677 / rEFLc98288c20eba: efl_ui_focus_object: Don't pass NULL to child_focus_set
D6704 / rEFL84423a465ca2: elementary: Check for valid focus manager before starting do loop
D6704 / rEFL364ca1d2b2bb: elementary: Check for valid focus manager before starting do loop
D6701 / rEFL6119cc0c65f0: elementary: Check for valid cursor_rect when (un)setting focus
D6641 / rE5af9485c4f5d: enlightenment: Ensure we have a valid menu comp object before calling
D6710 / rEFL2f9a65844e64: elementary: Check for valid object before calling smart calculate
D6641 / rEf2e0e2d785ce: enlightenment: Ensure we have a valid menu comp object before calling
D6640 / rEFL124703826f24: elementary: Check for valid resize object
D6639 / rEFLbe176bd3070e: elementary: Check for valid resize object before calling
D6637 / rEFL843b5177dfa0: elementary: Check for valid frame object
D6541 / rEFL7a538cbc4a6e: elm/ctxpopup: check for content object before removing callbacks during del
D6538 / rEFLee8d06c806f1: elementary: Avoid passing NULL in some win focus methods
D6317 / rEFL6f6b365c8431: elm_scroll: Avoid calls to non-existing part
D6323 / rEFL209aca1654c1: elm_colorselector: avoid passing null to efl functions
D6321 / rEFLb7cb24c32395: evas: switch to EFL_EVENT_INVALIDATE for event grabber sub-object deletion
D6316 / rEa6277f4f6d45: resolve a number of cases where a null object was passed to efl functions
zmike created this task.Jun 18 2018, 10:11 AM
zmike triaged this task as High priority.

As of current master, running with EINA_LOG_LEVELS=eo:2 can be used to print messages when this occurs.

zmike added a comment.Jun 18 2018, 1:02 PM

P220 has a full log of all the errors along with backtraces at the current time (as of D6325).

If you want to pitch in, pick a widget, create a subtask for the widget and assign it to yourself. Most of the work is just adding null checks here and there.

I'll get started on this one tomorrow

zmike edited projects, added Restricted Project; removed efl (efl-1.23).Sep 3 2019, 10:00 AM