evas functions do not error when null is passed
Open, Showstopper IssuesPublic

Description

  • Call evas_object_move(NULL, x, y)
  • No error message
  • ???

Every function except evas_object_del should error when NULL is passed. This has caused bugs again and again for the past few years and it still is not fixed.

zmike created this task.Nov 6 2017, 7:37 AM
jpeg added a comment.Nov 6 2017, 5:47 PM

Same for EO.

jpeg added a comment.Nov 7 2017, 4:37 AM

I definitely agree that there should be an ERR, at least when running under eo_debug. Having ERR all the time is debatable as a lot of our code (and not just efl but i guess also some efl use cases) rely on NULL being safe and quiet.

zmike added a comment.Nov 7 2017, 5:42 AM

It should ERR on non-release builds at the very least.

jpeg added a comment.Jan 15 2018, 4:21 AM

I've got some initial work in a branch:
https://git.enlightenment.org/core/efl.git/commit/?h=devs/jpeg/no_null_calls&id=26738a3a25507d21c5b5709a868d674546eaeb2c

E is doing a few such calls on NULL, and it's also doing some invalid calls. I'll fix them before continuing these patches.

zmike added a comment.Jan 15 2018, 5:50 AM

Tremendous. I'd also be fine with you just pushing that and I can clean up the application side of things to save you some work.

zmike added a comment.Jan 16 2018, 6:58 AM

So this is done?

jpeg added a comment.Jan 16 2018, 8:09 AM

Half done. I think you can do E. I didn't push anything for E but you should see a lot of messages.
Also, you might be interested in changing some NULL check the old (evas) EAPI to print a warning as well (I have evas_callbacks.c in mind).