servo / servo

Servo, the embeddable, independent, memory-safe, modular, parallel web rendering engine
https://servo.org
Mozilla Public License 2.0
28.55k stars 3.04k forks source link

Servo on Windows starts with errors on GLib, shows white screen and freezes #24428

Open KiChjang opened 5 years ago

KiChjang commented 5 years ago
 0:12.27 pid:23660 Full command: D:\Workspace\servo\target\debug\servo.exe --hard-fail -u Servo/wptrunner -Z replace-surrogates http://web-platform.test:8000/dom/nodes/MutationObserver-document.html --user-stylesheet D:\Workspace\servo\resources\ahem.css --pref dom.mutation_observer.enabled=true --certificate-path D:\Workspace\servo\tests\wpt\web-platform-tests/tools/certs/cacert.pem
pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-WARNING **: 00:59:32.093: cannot register existing type 'GstObject'
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-CRITICAL **: 00:59:32.093: g_once_init_leave: assertion 'result != 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-CRITICAL **: 00:59:32.093: g_type_register_static: assertion 'parent_type > 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-CRITICAL **: 00:59:32.093: g_once_init_leave: assertion 'result != 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-CRITICAL **: 00:59:32.093: g_type_register_static: assertion 'parent_type > 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-WARNING **: 00:59:32.093: cannot add private field to invalid (non-instantiatable) type '<invalid>'
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-CRITICAL **: 00:59:32.093: g_once_init_leave: assertion 'result != 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-CRITICAL **: 00:59:32.093: g_type_register_static: assertion 'parent_type > 0' failed
 0:12.27 pid:23660
 0:12.27 pid:23660 (servo.exe:23660): GLib-GObject-WARNING **: 00:59:32.093: cannot add private field to invalid (non-instantiatable) type '<invalid>'
 0:12.28 pid:23660
 0:12.28 pid:23660 (servo.exe:23660): GLib-GObject-WARNING **: 00:59:32.093: cannot register existing type 'GstURIHandler'
 0:12.29 pid:23660
 0:12.29 pid:23660 (servo.exe:23660): GLib-CRITICAL **: 00:59:32.093: g_once_init_leave: assertion 'result != 0' failed
 0:12.29 pid:23660
 0:12.30 pid:23660 (servo.exe:23660): GLib-GObject-CRITICAL **: 00:59:32.093: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
 0:12.30 pid:23660
 0:12.30 pid:23660 (servo.exe:23660): GLib-CRITICAL **: 00:59:32.093: g_once_init_leave: assertion 'result != 0' failed

I am using GStreamer version 1.16.1 instead of 1.16.0. Would that be the cause of this problem?

CYBAI commented 5 years ago

cc @ferjm @ceyusa

ceyusa commented 5 years ago

It looks like the gstreamer is initialized twice, perhaps in different threads, like a race condition... mmmhh ... I wonder why.

ferjm commented 5 years ago

@KiChjang is this only happening while running WPTs?

KiChjang commented 5 years ago

@ferjm No, it happens if I do .\mach run -d -- https://en.wikipedia.org as well:

D:\Workspace\servo [mutation-observer-test-fix ≡ +0 ~2 -0 !]> .\mach run -d -- https://en.wikipedia.org
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

(servo.exe:8948): GLib-GObject-WARNING **: 23:10:53.864: cannot register existing type 'GstObject'

(servo.exe:8948): GLib-CRITICAL **: 23:10:53.867: g_once_init_leave: assertion 'result != 0' failed

(servo.exe:8948): GLib-GObject-CRITICAL **: 23:10:53.867: g_type_register_static: assertion 'parent_type > 0' failed

(servo.exe:8948): GLib-CRITICAL **: 23:10:53.868: g_once_init_leave: assertion 'result != 0' failed

(servo.exe:8948): GLib-GObject-CRITICAL **: 23:10:53.868: g_type_register_static: assertion 'parent_type > 0' failed

(servo.exe:8948): GLib-GObject-WARNING **: 23:10:53.868: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(servo.exe:8948): GLib-CRITICAL **: 23:10:53.868: g_once_init_leave: assertion 'result != 0' failed

(servo.exe:8948): GLib-GObject-CRITICAL **: 23:10:53.869: g_type_register_static: assertion 'parent_type > 0' failed

(servo.exe:8948): GLib-GObject-WARNING **: 23:10:53.869: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(servo.exe:8948): GLib-GObject-WARNING **: 23:10:53.869: cannot register existing type 'GstURIHandler'

(servo.exe:8948): GLib-CRITICAL **: 23:10:53.869: g_once_init_leave: assertion 'result != 0' failed

(servo.exe:8948): GLib-GObject-CRITICAL **: 23:10:53.870: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(servo.exe:8948): GLib-CRITICAL **: 23:10:53.870: g_once_init_leave: assertion 'result != 0' failed
KiChjang commented 5 years ago

Before I ran servo, I also had to rename a couple of my .DLL files by prefixing them with lib, e.g. libgstplayer-1.0.0.dll instead of gstplayer-1.0.0.dll, otherwise the executable crashes, telling me that it can't find some required DLL files.

ferjm commented 5 years ago

Before I ran servo, I also had to rename a couple of my .DLL files by prefixing them with lib, e.g. libgstplayer-1.0.0.dll instead of gstplayer-1.0.0.dll, otherwise the executable crashes, telling me that it can't find some required DLL files.

That is probably not the right fix. Could you verify that you are installing the GStreamer MSVC binaries, please? It sounds like you may be installing the MinGW binaries, which are currently not supported.

KiChjang commented 5 years ago

@ferjm I reinstalled both GStreamer and GStreamer devel just to make sure that I have the MSVC version instead of the MinGW binaries, but the problem still persists: I needed to rename the DLL files, and after I did, it still gives me the same error log as above.