v8 context snapshots... essential for startup?

649 views
Skip to first unread message

Jean-François Dagenais

unread,
May 10, 2021, 1:46:37 PM5/10/21
to v8-dev
Hi all!

Currently integrating libcef/cefsimple with my target, and faced with a white rectangle. I have tried --disable-gpu and my traces show chromium using swiftshader libEGL and libGLESv2.

This is my basic run setup, as root:

cefsimple --no-sandbox --url=about://gpu --disable-gpu

I have not yet been able to generate context snapshots, and when I start on the target, I get 2 of these with a stack trace:

# Fatal error in , line 0

# Failed to deserialize the V8 snapshot blob. This can mean that the snapshot blob file is corrupted or missing.

Just so I don't waste time and am able to prioritize, can this cause the white rectangle?

Thanks for any pointers guys!

Yang Guo

unread,
May 10, 2021, 2:50:15 PM5/10/21
to v8-...@googlegroups.com
It means that no JS gets executed. That might result in things that rely on JS execution to not render.

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/46bdadb3-fb80-42c3-959d-e96ddbeb2189n%40googlegroups.com.

Jean-François Dagenais

unread,
May 10, 2021, 3:22:23 PM5/10/21
to v8-dev
Thanks Yang,

So, just loading a png or "about://gpu" should not really be affected by this ?

Jean-François Dagenais

unread,
May 10, 2021, 8:39:26 PM5/10/21
to v8-dev
For what it's worth... it seems the build generates a snapshot_blob.bin even if use_v8_context_snapshot = false

The absence of this file on the target causes v8 engine init fatal error and prevents cefsimple (or libcef?) to initialize properly.

Jakob Gruber

unread,
May 11, 2021, 3:55:41 AM5/11/21
to v8-...@googlegroups.com
V8 requires snapshot_blob.bin as you found out. To avoid confusion, `use_v8_context_snapshot` refers to a custom snapshot for chromium, which is slightly different from the default snapshot (it contains a few addtl things). 

So in your case, I'd suggest using `use_v8_context_snapshot = false`, while still properly installing snapshot_blob.bin.

Jean-François Dagenais

unread,
May 11, 2021, 9:01:02 PM5/11/21
to v8-...@googlegroups.com
Thanks Jakob!
Reply all
Reply to author
Forward
0 new messages