2017-06-16 7:47 GMT+03:00 Carsten Haitzler <[email protected]>:
> On Thu, 15 Jun 2017 23:05:22 -0500 Jeff Hoogland <[email protected]> 
> said:
>
>> Since upgrading from EFL 1.18 to 1.19 I am having some users report
>> <http://forums.bodhilinux.com/index.php?/topic/14430-swami-control-activation/
>> > that
>> one of our py-efl applications is crashing at startup for them. The error
>> is:
>>
>> Traceback (most recent call last):
>>   File "/usr/bin/swami", line 177, in <module>
>>     app = MainWin(launchArg)
>>   File "/usr/bin/swami", line 46, in __init__
>>     self.icon_object_set(icon.object_get())
>>   File "efl/elementary/image.pxi", line 469, in
>> efl.elementary.__init__.Image.object_get (efl/elementary/__init__.c:174473)
>>   File "efl/eo/efl.eo.pyx", line 137, in efl.eo.object_from_instance
>> (efl/eo/efl.eo.c:2170)
>> ValueError: Eo object at 0x40000002662348f1 of type Edje.Object does not
>> have a mapping!
>
> this would be in the bindings themselves. efl doesnt have any error like the
> above. 0x40000002662348f1 definitely looks like an eoid (not a ptr). i haven't
> looked into the bindings themselves to see what it's doing there but i smell 
> an
> invalid eo id maybe?
>
> icon = Icon(self, size_hint_weight = EXPAND_BOTH, size_hint_align = FILL_BOTH)
> icon.standard_set('preferences-system')
> icon.show()
> self.icon_object_set(icon.object_get())
>
> seems like the relevant bit of python with the last line complaining... i can
> only assume that self.icon_object_set() on the window (which is self) maps to:
> elm_win_icon_object_set(self, ...)
>
> you'd getting the internal icon object. the preferences-system would probably
> end up being sourced from theme thus it'd be an edje object, NOT an evas image
> object, and the window wants an evas image object. not an edje object. elm
> icon. elm image. a raw evas image object. so it's probably complaining there
> because that system has a different theme config and is using theme provided
> icons, not xdg icons which then happen to be image objects in the icon widget.

It's erroring out there because Python-EFL doesn't have all EFL types
automatically loaded. In this case the user has imported Elementary,
which means that Ecore and Evas get imported as dependencies too, but
not Edje. We can fix that by adding an import in that binding method
so that it no longer errors out. Though as raster explained, the Edje
object still can't be used as a window icon as such, so you'd get
another error further down the line.

>
> this of course points out the danger of exposing internals like you are now
> using with icon.object_get(). you are getting the internal object the icon
> widget uses and that means you need to know what it is and how it can change.
> we just should not expose stuff like this so you can't shoot yourself in the
> foot.
>
> the window needs a raw evas image object because it has to be able to get the
> argb pixel data so it can set it as an x11 property with argb data in it. an
> edje object is not "argb data". it's a live set of objects that is not static
> that adapts to sizing changes and can animate... elm icon widgets are the 
> same.
> they may map to a simple image object.. maybe an edje object. maybe something
> else (an evas vg object... ?). the point is for this to be hidden from you...
> until we expose the ability to peek behind the curtain and you rely on that
> peeking... :)
>
> so create a raw evas image object. find the raw image file path to use for the
> icon then set that object as the icon.
>
> also don't show the icon. no need. it's not needed. :)
>
>> Source code for the tool is here <https://github.com/JeffHoogland/swami>. I
>> am not seeing this error message on every computer I have with EFL 1.19
>> though. In fact it launches as expected on the computer I am typing this
>> from.
>>
>> Any suggestions?
>>
>> --
>> ~Jeff Hoogland <http://jeffhoogland.com/>
>> My Projects on GitHub <https://github.com/JeffHoogland>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    [email protected]
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to