Page MenuHomePhabricator

elm_fileselector_entry: only create model once
AbandonedPublic

Authored by bu5hm4n on Mar 17 2019, 4:07 AM.

Details

Summary

when reading the API usages of efl_ui_view_model_get, then it appears
that the rendered obejct is supposed to be const, so we should not
recreate the same model over and over again. This commit also fixes a
error message on shutdown, as efl_add was used wrong.
Depends on D8380

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10371
bu5hm4n created this revision.Mar 17 2019, 4:07 AM
bu5hm4n requested review of this revision.Mar 17 2019, 4:07 AM

Hmmm... I still get lots of errors on shutdown, including:

CRI<87656>:eo ../src/lib/eo/eo.c:1954 efl_unref() Calling efl_unref instead of efl_del or efl_parent_set(NULL). Temporary fallback in place triggered.
ERR<87656>:eina_safety ../src/lib/efl/interfaces/efl_interfaces_main.c:105 efl_part() safety check failed: efl_ref_count(r) == 1 is false
ERR<87656>:eina_safety ../src/lib/efl/interfaces/efl_interfaces_main.c:105 efl_part() safety check failed: efl_ref_count(r) == 1 is false
ERR<87656>:eo ../src/lib/eo/eo.c:1988 efl_unref() Obj:Efl.Canvas.Layout_Part_Invalid@0x400000244779. User refcount (-1) < 0. Too many unrefs.
ERR<87656>:eo ../src/lib/eo/eo_base_class.c:682 efl_del() Calling efl_del on object Efl.Canvas.Layout_Part_Invalid@0x40000005a335[4] with no parent is not advised any more.
ERR<87656>:eo ../src/lib/eo/eo.c:1988 efl_unref() Obj:Efl.Canvas.Layout_Part_Invalid@0x40000005a335. User refcount (-1) < 0. Too many unrefs.
ERR<87656>:eo ../src/lib/eo/eo.c:1988 efl_unref() Obj:Efl.Canvas.Layout_Part_Invalid@0x400000199835. User refcount (-1) < 0. Too many unrefs.
ERR<87656>:eo ../src/lib/eo/eo.c:1988 efl_unref() Obj:Efl.Canvas.Layout_Part_Invalid@0x400000244779. User refcount (-1) < 0. Too many unrefs.

Which is the error that this patch is supposed to fix?

bu5hm4n added a subscriber: YOhoho.Mar 18 2019, 7:29 AM

@segfaultxavi the error that you see are caused by efl_ui_layout. Not by the fileselector_entry. And the errors that you see are already fixed by revisions from @cedric or @YOhoho

@cedric @segfaultxavi @zmike pinggggeriono, this is still fixing a error message.

cedric requested changes to this revision.Tue, Apr 2, 10:46 AM
cedric added inline comments.
src/lib/elementary/elc_fileselector_entry.c
445

Hum, I was wondering about this. We still need to use efl_add_ref and not efl_new otherwise the model can not find providers or anything actually. My patch D8536 is slightly better for the object creation, but it doesn't do the lifecycle really properly. I will correct that and add a patch that return the existing model (when it does have the right path set on it).

This revision now requires changes to proceed.Tue, Apr 2, 10:46 AM
bu5hm4n abandoned this revision.Tue, Apr 2, 11:45 AM