On Wed, 06 Nov 2013 14:48:17 +0100 Guillaume Friloux
<guillaume.fril...@asp64.com> said:

> Hello e devs.
> 
> When fixing an issue 
> (http://git.enlightenment.org/core/efl.git/commit/?id=838c3bed85535559713e57f6e523da1f73c0ca31),
>  
> i saw that the error isnt held correctly in ecore.
> When everything is working, things are quite simple :
> - You call ecore_con_server_connect(), that will allocate you an 
> Ecore_Con_Server object.
> - You go in the mainloop, do the stuff you want.
> - You leave mainloop.
> - You call ecore_con_server_del() to free your object.
> 
> But when an error happens, the Ecore_Con_Server object always gets 
> "delete_me" set to EINA_TRUE, and so, in the application using 
> ecore_con, you have to handle this by not trying to free the object in 
> case of an error (while the error can be totally separated from an 
> allocation problem, in my case, non existent domain name). My opinion is 
> that the error event should be raised, without deleting the 
> Ecore_Con_Server object.
> 
> Also, in the test case i added 
> (http://git.enlightenment.org/core/efl.git/commit/?id=329c64621891f855955eab1794d2d0255c377fcc),
>  
> you change the timeout set (5 seconds) to something low (1 second or 
> lower), the test case will just segfault. I dont have time to spend on 
> this, but maybe this is related to the strange behavior i have describe 
> above.
> 
> What do you guys think about it ?

this would break behaviour that apps would rely on - ie that after a del event
on a server the object is deleted automatically so the app doesn't have to
bother. it HAS to listen for del events and mark any handles it has to the
server to NULL on such a del event... so it doesnt access it later... :(

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to