Page MenuHomePhabricator

elementary: make sure that the model parent being used is always the fileselector.
ClosedPublic

Authored by cedric on Mar 22 2019, 11:28 AM.

Details

Summary

Model provided by an item selection would have there parent being the current
model of the fileselector. Once that one is replaced by the item model, it would
automatically invalidate the model and break any further request. This lead to
a bug where you could only get into one directory before everything else
being empty.

Depends on D8449

Diff Detail

Repository
rEFL core/efl
Branch
devs/cedric/fileselector
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10607
cedric created this revision.Mar 22 2019, 11:28 AM
cedric requested review of this revision.Mar 22 2019, 11:28 AM
bu5hm4n accepted this revision.Mar 25 2019, 3:25 AM
This revision is now accepted and ready to land.Mar 25 2019, 3:25 AM
bu5hm4n requested changes to this revision.Mar 25 2019, 3:30 AM

Okay, i don't know whatever commit in this stack caused this, but now my testsuite fails with: ../src/tests/elementary/elm_test_fileselector.c:135:F:elm_fileselector:elm_fileselector_selected:0: Assertion 'elm_fileselector_selected_get(fileselector) == exist' failed: elm_fileselector_selected_get(fileselector) == "/tmp/elm_test-bQ9btE", exist == "/tmp/elm_test-bQ9btE/exist"

This revision now requires changes to proceed.Mar 25 2019, 3:30 AM
zmike added a comment.Mar 26 2019, 5:59 AM

@bu5hm4n I don't get that error

With the full patchset applied all my issues with the fileselector unit test are now resolved even after some extreme stress testing. Nice work!

Every 4th try ends up like this for me.

I don't see it either. Could you try cleaning your /tmp directory? Any other error popping up ? If you run the test manually, do you get the same problem? Does valgrind says anything?

No error, happens when i do ninja test or ./src/test/elementary/elementary_suite No additional error.

But after a very quick look at the code, is it possible that the sd->path is wrong ?

Yep, verified this now, normally it_data->path; is returned. But in the error case sd->path is returned. I guess this happens when the selected callback has not been scheduled yet, hence the gengrid selected item is NULL.

Yep, verified this now, normally it_data->path; is returned. But in the error case sd->path is returned. I guess this happens when the selected callback has not been scheduled yet, hence the gengrid selected item is NULL.

Why are you getting the error case? Why are you talking about gengrid? Which error path are you talking about?

Gengrid is used in the file selector, the API that is causing the issue is either returning the target, the selected item or path. You are likely getting the selected item returned, however. Whenever gengrid does not have a selected item, because it has not been scheduled yet, then the path is returned. Which is 100% wrong in this case.

Gengrid is used in the file selector, the API that is causing the issue is either returning the target, the selected item or path. You are likely getting the selected item returned, however. Whenever gengrid does not have a selected item, because it has not been scheduled yet, then the path is returned. Which is 100% wrong in this case.

What test are you running that trigger the gengrid path? I do not see a tests which define ELM_FILESELECTOR_GRID. And also what line are you referring too?

cedric updated this revision to Diff 21010.Mar 27 2019, 2:45 PM
cedric edited the summary of this revision. (Show Details)

Rebase.

bu5hm4n accepted this revision.Mar 27 2019, 2:49 PM
This revision is now accepted and ready to land.Mar 27 2019, 2:49 PM
This revision was automatically updated to reflect the committed changes.