Bug 125486 - [EFL] Run-webkit-tests --efl raise ScriptError
Summary: [EFL] Run-webkit-tests --efl raise ScriptError
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 01:24 PST by Tibor Mészáros
Modified: 2014-06-23 06:10 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.21 KB, patch)
2013-12-10 01:50 PST, Tibor Mészáros
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tibor Mészáros 2013-12-10 01:24:23 PST
run-webkit-tests --efl raise ScriptError after closing the TestBrowser.
example: Tools/Scripts/run-webkit-tests --efl LayoutTests/inspector-protocol/page/archive.html
Comment 1 Tibor Mészáros 2013-12-10 01:50:24 PST
Created attachment 218845 [details]
Patch

Removed the ecore_shutdown(), and evas_shutdown() method calls from ewk_shutdown(), because at this place these methods try to free objects, that was previously done.
Comment 2 Gyuyoung Kim 2013-12-10 01:52:44 PST
Comment on attachment 218845 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218845&action=review

> Source/WebKit/efl/ChangeLog:9
> +        because at this place these methods try to free objects, that was previously done.

Where are ecore_shutdown() and evas_shutdown() already done ?
Comment 3 Tibor Mészáros 2013-12-10 04:17:21 PST
First of all, thanks for the fast reply. I had found a documentation, that will answer all your questions: http://docs.enlightenment.org/auto/ecore/group__Ecore__Evas__Group.html#gab8fa311077f749190c9b622f672b2214
Comment 4 Ryuan Choi 2013-12-10 04:55:17 PST
(In reply to comment #3)
> First of all, thanks for the fast reply. I had found a documentation, that will answer all your questions: http://docs.enlightenment.org/auto/ecore/group__Ecore__Evas__Group.html#gab8fa311077f749190c9b622f672b2214

I can't get your point.

Because ewk_init() calls ecore_init() and evas_init(), we should call ecore_shutdown() and evas_shutdown() in ewk_shutdown().
Comment 5 Tibor Mészáros 2013-12-10 05:02:15 PST
In ewk_shutdown() we call ecore_evas_shutdown(), and this closes the Evas wrapper system down. Shut down Evas and Ecore libraries, so if we calls again ecore_shutdown(), and evas_shutdown() methods, these calls will fail, if I'm right.
Comment 6 László Langó 2013-12-19 04:40:27 PST
(In reply to comment #4)
> (In reply to comment #3)
> > First of all, thanks for the fast reply. I had found a documentation, that will answer all your questions: http://docs.enlightenment.org/auto/ecore/group__Ecore__Evas__Group.html#gab8fa311077f749190c9b622f672b2214
> 
> I can't get your point.
> 
> Because ewk_init() calls ecore_init() and evas_init(), we should call ecore_shutdown() and evas_shutdown() in ewk_shutdown().

I think Tibor is right. The ecore_evas_shutdown() wraps the ecore_shutdown() and evas_shutdown(). See: http://git.enlightenment.fr/~leif/ecore/tree/src/lib/ecore_evas/ecore_evas.c#n253

The problem is that when the EWebLauncher is closed, the following error will emit
fccache.c:507: FcCacheFini: Assertion `fcCacheChains[i] == ((void *)0)' failed.

As I see, this is because we try to free the font config twice. I checked and this patch really removes the above error.

But you might have right, the ewk_init is still messy, we shouldn't call ecore_init and evas_init separate if use the ecore_evas_init wrapper function.
Comment 7 Ryuan Choi 2013-12-19 05:07:50 PST
(In reply to comment #6)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > First of all, thanks for the fast reply. I had found a documentation, that will answer all your questions: http://docs.enlightenment.org/auto/ecore/group__Ecore__Evas__Group.html#gab8fa311077f749190c9b622f672b2214
> > 
> > I can't get your point.
> > 
> > Because ewk_init() calls ecore_init() and evas_init(), we should call ecore_shutdown() and evas_shutdown() in ewk_shutdown().
> 
> I think Tibor is right. The ecore_evas_shutdown() wraps the ecore_shutdown() and evas_shutdown(). See: http://git.enlightenment.fr/~leif/ecore/tree/src/lib/ecore_evas/ecore_evas.c#n253
> 

_init()/_shutdown() are ref counted internally. so we should keep the pair _init()/_shutdown().

If not, _shutdown() just return after decreased the count.

I agree that it might be unnecessary, but it will not be the root cause.

> The problem is that when the EWebLauncher is closed, the following error will emit
> fccache.c:507: FcCacheFini: Assertion `fcCacheChains[i] == ((void *)0)' failed.
> 
> As I see, this is because we try to free the font config twice. I checked and this patch really removes the above error.
> 
> But you might have right, the ewk_init is still messy, we shouldn't call ecore_init and evas_init separate if use the ecore_evas_init wrapper function.

No, it is already raised and EFL fixed it.
(http://sourceforge.net/mailarchive/message.php?msg_id=30424686)

So since 1.7.6, it will be fine.

Anyway, I made Bug 125479 to bump EFL 1.8
Comment 8 Gyuyoung Kim 2014-05-07 02:58:30 PDT
Comment on attachment 218845 [details]
Patch

Clear review? from attachment 218845 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug or this bug again.
Comment 9 Csaba Osztrogonác 2014-06-23 06:10:57 PDT
There is no WebKit1 anymore, so we don't need this fix.