V8: Fatal error: CHECK(V8::ArrayBufferAllocator() != NULL) failed

172 views
Skip to first unread message

Albert Zeyer

unread,
Mar 10, 2014, 5:15:31 AM3/10/14
to v8-u...@googlegroups.com
Hi,

I get this error when I try to run some JS code ([this](http://pastebin.com/XesBSstJ) + [this](http://pastebin.com/0VawRb16)) with V8 (tried master from two weaks ago, 3.23.17, 3.24.40, 3.25.5):

    #
    # Fatal error in ..\..\src\runtime.cc, line 785
    # CHECK(V8::ArrayBufferAllocator() != NULL) failed
    #

A lot of other JS code has worked already, so I wonder what the problem is.

It's on Win8 with a x64 build. V8 has been build just as described in the official docs (using gyp + MSVC 2012). I don't think that there was a problem because it worked fine already with most other JS code so far.

I think that there might be an issue with V8 itself, but not sure...

Some more information, including some C++ code:

Thanks,
Albert

Dmitry Lomov

unread,
Mar 10, 2014, 5:17:23 AM3/10/14
to v8-u...@googlegroups.com
How exactly do you run V8? Do you run d8?

Dmitry


--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Albert Zeyer

unread,
Mar 10, 2014, 5:20:02 AM3/10/14
to v8-u...@googlegroups.com
No, it's some own C++ app with V8. Some stripped down example C++ code is here: http://stackoverflow.com/questions/22294854/v8-fatal-error-checkv8arraybufferallocator-null-failed

Dmitry Lomov

unread,
Mar 10, 2014, 5:25:12 AM3/10/14
to v8-u...@googlegroups.com
Ah, thought so. Read docs on v8::ArrayBuffer::Allocator. 
(look at Shell::Main in d8.cc for an example)

HTH,
Dmitry

Albert Zeyer

unread,
Mar 10, 2014, 5:27:26 AM3/10/14
to v8-u...@googlegroups.com
I'm not using ArrayBuffer in my code. I'm basically just using Script::Compile and Script::Run.

It looks like a V8 issue...

Dmitry Lomov

unread,
Mar 10, 2014, 5:28:46 AM3/10/14
to v8-u...@googlegroups.com
You still need to set the allocator, because V8 uses it internally, even if you do not use ArrayBuffers in your code.

Albert Zeyer

unread,
Mar 10, 2014, 5:39:20 AM3/10/14
to v8-u...@googlegroups.com
Ah, thanks a lot, that helped. It works now.

I wonder why it doesn't initializes such a standard allocator by default.

Also, the embedder guide should mention this. Are there maybe other things I need to init? I'm basically just doing this: https://developers.google.com/v8/get_started

Regards,
Albert

Jane Chen

unread,
Mar 10, 2014, 1:21:16 PM3/10/14
to v8-u...@googlegroups.com
How come shell.cc doesn't set the allocator and works fine?

Albert Zeyer

unread,
Mar 10, 2014, 3:23:49 PM3/10/14
to v8-u...@googlegroups.com
I'm not using shell.cc. That's my own C++ app, with pure V8.
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/BC-yrxSl3iI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
Forward
0 new messages