Page MenuHomePhabricator

elementary: fix elm_fileselector_entry model_get to be properly build with a parent and synchronously.
ClosedPublic

Authored by cedric on Apr 2 2019, 10:06 AM.

Details

Summary

This fix the following warning:
ERR<12924>:eo ../src/lib/eo/eo.c:880 _efl_add_internal_start() Creation of 'Efl.Io.Model' object at line 443 in '../src/lib/elementary/elc_fileselector_entry.c' is done without parent. This should use efl_add_ref.

Depends on D8540

Diff Detail

Repository
rEFL core/efl
Branch
devs/cedric/fileselector
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10692
cedric created this revision.Apr 2 2019, 10:06 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

cedric requested review of this revision.Apr 2 2019, 10:06 AM
bu5hm4n requested changes to this revision.Apr 2 2019, 11:47 AM
bu5hm4n added a subscriber: bu5hm4n.

This model will commit suicide after the call to build_st in finalizer is done ... this could happen quite soon...

This revision now requires changes to proceed.Apr 2 2019, 11:47 AM
cedric updated this revision to Diff 21162.Apr 2 2019, 11:50 AM
cedric edited the summary of this revision. (Show Details)

This model will commit suicide after the call to build_st in finalizer is done ... this could happen quite soon...

What do you mean? If nobody hold a reference on it, it means nobody is interested in the result of anything. In which case do we end up with a no ref while still needing the result? That sounds like where we should fix this.

No. Normally when we return a object, that has a parent, the user can assume this object lifes as long as the parent lifes. This is not the case here.

cedric planned changes to this revision.Apr 2 2019, 12:03 PM

No. Normally when we return a object, that has a parent, the user can assume this object lifes as long as the parent lifes. This is not the case here.

We are returning an object with a reference. It actually won't die by itself until the parent die right now which is not what I want. I should use freeq to delay the destruction to the next loop iteration.

cedric updated this revision to Diff 21169.Apr 2 2019, 12:33 PM
cedric edited the summary of this revision. (Show Details)
cedric added a reviewer: zmike.

rebase.

bu5hm4n requested changes to this revision.Apr 17 2019, 12:28 AM
bu5hm4n added inline comments.
src/lib/elementary/elc_fileselector_entry.c
454

there is absolutely no assertion that efl_added is a efl.ui.model here.

455

there is absolutely no assertion that efl_added is a efl.loop.model here.

This revision now requires changes to proceed.Apr 17 2019, 12:28 AM
cedric updated this revision to Diff 21478.Apr 18 2019, 4:23 PM
cedric added reviewers: SanghyeonLee, segfaultxavi.

Rebase with assertion now build into Fileselector widget.

bu5hm4n accepted this revision.Apr 20 2019, 5:59 AM
This revision is now accepted and ready to land.Apr 20 2019, 5:59 AM
Closed by commit rEFLb2db95947a67: elementary: fix elm_fileselector_entry model_get to be properly build with a… (authored by cedric, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyApr 21 2019, 2:37 AM
This revision was automatically updated to reflect the committed changes.