Page MenuHomePhabricator

elementary: Check for valid resize object
ClosedPublic

Authored by devilhorns on Jul 19 2018, 5:51 PM.

Details

Summary

Fix an issue where elm_slider was passing NULL to eo functions due to
wd->resize_obj being NULL. Discovered via Enlightenment mixer popup
dialog

ref T7030
Depends on D6639

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
devilhorns created this revision.Jul 19 2018, 5:51 PM
devilhorns requested review of this revision.Jul 19 2018, 5:51 PM

Uhm, when is that ahppening exactlty? the resize_obj beeing NULL means that the slider does not have a layout ? whooooood ?

devilhorns added a comment.EditedJul 19 2018, 7:04 PM

I was running E in Xephyr, trapping on eo.c:637. Popup a slider (from either mixer or backlight gadgets), and crash. I can get you an entire gdb bt if you want (but that will have to wait until after lunch)

Nah, its okay, i just was wondering what the heck happened here that the resize_obj is NULL, this means that this function has to be executed before the group_add of the layout is called, it feels to me that we are missing something else there ... Let me take there a close look tomorrow or so.

Sure, no problem. Generally I don't dig too deep when it comes to elm widgets as it's usually a can of worms ;)

Hermet added a subscriber: Hermet.Jul 19 2018, 10:51 PM

ye... root cause must be at the other place.

zmike requested changes to this revision.Jul 20 2018, 1:21 PM

This occurs during object deletion: according to the backtrace from when this object is NULL here, _elm_slider_efl_object_destructor() calls efl_ui_format_cb_set() and the internal objects are destroyed. I think the correct fix would be to add if (efl_invalidated_get(obj)) return; before L1048 instead to avoid triggering any of this code.

This revision now requires changes to proceed.Jul 20 2018, 1:21 PM
devilhorns updated this revision to Diff 15861.Jul 25 2018, 3:12 AM
  • elementary: Check for valid object before using wd->resize_obj

Updated patch to use efl_invalidated_get

zmike requested changes to this revision.Jul 25 2018, 9:05 AM

It looks like somehow you pushed all your elm patches into this revision?

This revision now requires changes to proceed.Jul 25 2018, 9:05 AM
devilhorns updated this revision to Diff 15903.Jul 25 2018, 9:29 AM

removed other patches

zmike accepted this revision.Jul 25 2018, 11:13 AM
This revision is now accepted and ready to land.Jul 25 2018, 11:13 AM
This revision was automatically updated to reflect the committed changes.