[E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Raphael Kubo da Costa
A few days ago I was investigating a bug in the EFL WebKit port and noticed WebKit's and Evas' handling of Fontconfig are somewhat incompatible: while the evas_font code calls both FcInit() and FcFini() when on initialization and shutdown, respectively, WebKit keeps some Fontconfig objects alive un

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Tom Hacohen
On 30/01/13 17:15, Raphael Kubo da Costa wrote: > A few days ago I was investigating a bug in the EFL WebKit port and > noticed WebKit's and Evas' handling of Fontconfig are somewhat > incompatible: while the evas_font code calls both FcInit() and FcFini() > when on initialization and shutdown, res

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Raphael Kubo da Costa
Tom Hacohen writes: > You only removed code, are you sure we still init everything after your > changes? > > (Sorry, I don't have time to take a look yet). I've tried both expedite and loading a few web pages with different fonts and everything works fine -- the other libraries I mentioned do no

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Tom Hacohen
On 30/01/13 17:29, Raphael Kubo da Costa wrote: > Tom Hacohen writes: > >> You only removed code, are you sure we still init everything after your >> changes? >> >> (Sorry, I don't have time to take a look yet). > > I've tried both expedite and loading a few web pages with different > fonts and ev

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Raphael Kubo da Costa
Tom Hacohen writes: > ==24639== 736 (512 direct, 224 indirect) bytes in 2 blocks are > definitely lost in loss record 152 of 189 [...] > Evas leaks now... I get different results here with the attached program. Namely, the blocks are marked as still reachable instead of definitely lost. This is

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread David Seikel
On Wed, 30 Jan 2013 20:06:19 +0200 Raphael Kubo da Costa wrote: > Tom Hacohen writes: > > > ==24639== 736 (512 direct, 224 indirect) bytes in 2 blocks are > > definitely lost in loss record 152 of 189 > [...] > > Evas leaks now... > > I get different results here with the attached program. Nam

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Tom Hacohen
Just use "elementary_test", no need to get fancy and write your own applications... :) As for solving the issue at hand: I don't quite understand, does webkit init and shutdown evas all the time? Why doesn't webkit init and shutdown fontconfig as well? If they are using it, they should init and sh

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Raphael Kubo da Costa
Tom Hacohen writes: > Just use "elementary_test", no need to get fancy and write your own > applications... :) Same results: no {definitely,indirectly,possibly} lost objects, some kilobytes of still reachable objects. > As for solving the issue at hand: I don't quite understand, does webkit > i

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread The Rasterman
On Wed, 30 Jan 2013 19:15:20 +0200 Raphael Kubo da Costa said: sounds to me like a tonne of other libs are not being "nice" with fc. :) ie knowing to call fcini/fini. evas does this so valgrind stops bitching about not freeds/still reachable stuff on application shutdown - it reduces the noise.

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Raphael Kubo da Costa
Carsten Haitzler (The Rasterman) writes: > so as a result, evas is following a much stricter clean "init and shtudown > when > u are done" model which at least allows you to write an app, use evas, then > stop using it and for the next 10 weeks run it without ever using evas again > and > have

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread The Rasterman
On Thu, 31 Jan 2013 02:41:28 +0200 Raphael Kubo da Costa said: > Carsten Haitzler (The Rasterman) writes: > > > so as a result, evas is following a much stricter clean "init and shtudown > > when u are done" model which at least allows you to write an app, use evas, > > then stop using it and f

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-30 Thread Gustavo Sverzut Barbieri
On Wednesday, January 30, 2013, Raphael Kubo da Costa wrote: > Carsten Haitzler (The Rasterman) > > writes: > > > so as a result, evas is following a much stricter clean "init and > shtudown when > > u are done" model which at least allows you to write an app, use evas, > then > > stop using it an

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Tom Hacohen
On 31/01/13 01:20, Gustavo Sverzut Barbieri wrote: > On Wednesday, January 30, 2013, Raphael Kubo da Costa wrote: > >> Carsten Haitzler (The Rasterman) > >> writes: >> >>> so as a result, evas is following a much stricter clean "init and >> shtudown when >>> u are done" model which at least allows

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Gustavo Sverzut Barbieri
On Thursday, January 31, 2013, Tom Hacohen wrote: > On 31/01/13 01:20, Gustavo Sverzut Barbieri wrote: > >> On Wednesday, January 30, 2013, Raphael Kubo da Costa wrote: >> >> Carsten Haitzler (The Rasterman) > >>> writes: >>> >>> so as a result, evas is following a much stricter clean "init and

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Raphael Kubo da Costa
Gustavo Sverzut Barbieri writes: > Just dont call evas_shutdown()? Not calling evas_shutdown() is also an option, however that would mean not shutting another library down properly, with all the risks and problems that brings. > Or call it after you know every other library using it is > done/f

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Raphael Kubo da Costa
Gustavo Sverzut Barbieri writes: > On Thursday, January 31, 2013, Tom Hacohen wrote: >> Yes, that's what I said, so obviously I agree with that. Fix webkit. Talk is cheap :-) > Kubo: do you know if FcIni/FcFini are refcounted like EFL? They are not. If the general perception here is that Evas

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Gustavo Sverzut Barbieri
On Thu, Jan 31, 2013 at 9:18 AM, Raphael Kubo da Costa wrote: > Gustavo Sverzut Barbieri writes: >> Kubo: do you know if FcIni/FcFini are refcounted like EFL? > > They are not. If the general perception here is that Evas should not be > changed, trying to talk to the Fontconfig guys and change >

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-01-31 Thread Raphael Kubo da Costa
Gustavo Sverzut Barbieri writes: > ouch, so they are not refcounted and it will free at first exit... > that's bad, quite bad :-) > > Option #1 is talk to fc guys and see if they can add that. It would be > more correct. Looking at Fontconfig's mailing list archives, it looks like vtorri hit the

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread The Rasterman
On Thu, 31 Jan 2013 15:40:50 +0200 Raphael Kubo da Costa said: > Gustavo Sverzut Barbieri writes: > > > ouch, so they are not refcounted and it will free at first exit... > > that's bad, quite bad :-) > > > > Option #1 is talk to fc guys and see if they can add that. It would be > > more correc

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Tom Hacohen
But then valgrind complains, i.e there's noise. :( That's also bad for the whole of us. On Fri, Feb 1, 2013 at 2:25 PM, Carsten Haitzler wrote: > On Thu, 31 Jan 2013 15:40:50 +0200 Raphael Kubo da Costa > said: > > > Gustavo Sverzut Barbieri writes: > > > > > ouch, so they are not refcounted a

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Iván Briano
On Fri, Feb 1, 2013 at 12:21 PM, Tom Hacohen wrote: > But then valgrind complains, i.e there's noise. :( That's also bad for the > whole of us. > if (getenv("VALGRINDING_LOLOLOLOLOL")) FcFini(); > > On Fri, Feb 1, 2013 at 2:25 PM, Carsten Haitzler wrote: > >> On Thu, 31 Jan 2013 15:40:50 +0200 R

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Raphael Kubo da Costa
Tom Hacohen writes: > But then valgrind complains, i.e there's noise. :( That's also bad for the > whole of us. Valgrind complaining about reachable blocks shouldn't as bad as actual leaks anyway. -- Everyone hates slo

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Tom Hacohen
valgrind is complaining about "definitely lost", otherwise I wouldn't have cared that much. On Fri, Feb 1, 2013 at 2:48 PM, Raphael Kubo da Costa < raphael.kubo.da.co...@intel.com> wrote: > Tom Hacohen writes: > > > But then valgrind complains, i.e there's noise. :( That's also bad for > the >

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Raphael Kubo da Costa
Carsten Haitzler (The Rasterman) writes: > that's why efl does it by default... to cover "this case". we can stop calling > it.. but there are downsides to that.. :) i'm on the fence - it's better to > call it, BUT... if its not practical.. then commenting it out is ok i guess. After doing some

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Tom Hacohen
I'll talk to Behdad about it once he goes on-line and I'll ask him about it. This whole things smells. :) On Fri, Feb 1, 2013 at 2:53 PM, Raphael Kubo da Costa < raphael.kubo.da.co...@intel.com> wrote: > Carsten Haitzler (The Rasterman) writes: > > > that's why efl does it by default... to cove

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Raphael Kubo da Costa
Tom Hacohen writes: > valgrind is complaining about "definitely lost", otherwise I wouldn't have > cared that much. With efl/ and elementary/ at r83566 and valgrind 3.8.1, running elementary_test with my patch does not show any definitely lost blocks (which makes sense, since all those Fontconfi

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Tom Hacohen
Well. I just ran elementary test with your patch and without and it and shows leaks. If others can confirm it's not the case, and it's just my setup that is broken, I'm fine with your patch.. On Fri, Feb 1, 2013 at 3:04 PM, Raphael Kubo da Costa < raphael.kubo.da.co...@intel.com> wrote: > Tom Ha

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Tom Hacohen
Ok, just had a short chat with Behdad. He says that you are right and fontconfig should not be init and shutdown. I disagree with this design choice, but apparently that's how it is in fontconfig so arguing against it or disagreeing will get us nowhere. ;) Either someone will apply this patch, or I

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread Cedric BAIL
On Sat, Feb 2, 2013 at 7:28 AM, Tom Hacohen wrote: > Ok, just had a short chat with Behdad. > He says that you are right and fontconfig should not be init and shutdown. > I disagree with this design choice, but apparently > that's how it is in fontconfig so arguing against it or disagreeing will >

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-01 Thread The Rasterman
On Sat, 2 Feb 2013 14:36:12 +0900 Cedric BAIL said: > On Sat, Feb 2, 2013 at 7:28 AM, Tom Hacohen wrote: > > Ok, just had a short chat with Behdad. > > He says that you are right and fontconfig should not be init and shutdown. > > I disagree with this design choice, but apparently > > that's how

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-02 Thread David Seikel
On Sat, 2 Feb 2013 15:01:39 +0900 Carsten Haitzler (The Rasterman) wrote: > On Sat, 2 Feb 2013 14:36:12 +0900 Cedric BAIL > said: > > > On Sat, Feb 2, 2013 at 7:28 AM, Tom Hacohen wrote: > > > Ok, just had a short chat with Behdad. > > > He says that you are right and fontconfig should not be

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-02 Thread Raphael Kubo da Costa
Cedric BAIL writes: > On Sat, Feb 2, 2013 at 7:28 AM, Tom Hacohen wrote: >> Ok, just had a short chat with Behdad. >> He says that you are right and fontconfig should not be init and shutdown. >> I disagree with this design choice, but apparently >> that's how it is in fontconfig so arguing agai

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-02 Thread Cedric BAIL
Cedric Bail On Feb 3, 2013 2:07 AM, "Raphael Kubo da Costa" < raphael.kubo.da.co...@intel.com> wrote: > > Cedric BAIL writes: > > > On Sat, Feb 2, 2013 at 7:28 AM, Tom Hacohen wrote: > >> Ok, just had a short chat with Behdad. > >> He says that you are right and fontconfig should not be init and

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-04 Thread Bruno Dilly
On Fri, Feb 1, 2013 at 8:28 PM, Tom Hacohen wrote: > Ok, just had a short chat with Behdad. > He says that you are right and fontconfig should not be init and shutdown. > I disagree with this design choice, but apparently > that's how it is in fontconfig so arguing against it or disagreeing will >

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-04 Thread Tom Hacohen
Could you please backport it as well? On Mon, Feb 4, 2013 at 3:39 PM, Bruno Dilly wrote: > On Fri, Feb 1, 2013 at 8:28 PM, Tom Hacohen wrote: > > Ok, just had a short chat with Behdad. > > He says that you are right and fontconfig should not be init and > shutdown. > > I disagree with this des

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-04 Thread Bruno Dilly
On Mon, Feb 4, 2013 at 1:51 PM, Tom Hacohen wrote: > Could you please backport it as well? > Sure, it's done. Thanks > > On Mon, Feb 4, 2013 at 3:39 PM, Bruno Dilly wrote: > >> On Fri, Feb 1, 2013 at 8:28 PM, Tom Hacohen wrote: >> > Ok, just had a short chat with Behdad. >> > He says that you

Re: [E-devel] [PATCH/RFC evas] Stop initializing and shutting Fontconfig down

2013-02-04 Thread Tom Hacohen
Cool, thanks! On Mon, Feb 4, 2013 at 4:07 PM, Bruno Dilly wrote: > On Mon, Feb 4, 2013 at 1:51 PM, Tom Hacohen wrote: > > Could you please backport it as well? > > > > Sure, it's done. > Thanks > > > > > On Mon, Feb 4, 2013 at 3:39 PM, Bruno Dilly > wrote: > > > >> On Fri, Feb 1, 2013 at 8:28