ICU data file missing?

1,942 views
Skip to first unread message

Jane Chen

unread,
Mar 11, 2017, 10:03:49 PM3/11/17
to v8-users
Embedding v8 5.3.

This causes v8 to crash:

(88888888).toLocaleString();

2017-03-07 08:24:07.362 Critical: # Fatal error in , line 0 2017-03-07 08:24:07.362 Critical: # Failed to create ICU number format, are ICU data files missing? 2017-03-07 08:24:07.362 Critical: # 2017-03-07 08:24:07.362 Critical: 2017-03-07 08:24:07.362 Critical: ==== C stack trace =============================== 2017-03-07 08:24:07.362 Critical: 2017-03-07 08:24:07.362 Critical: 1: V8_Fatal 2017-03-07 08:24:07.362 Critical: 2: v8::internal::(anonymous namespace)::CreateICUNumberFormat(v8::internal::Isolate*, icu_56::Locale const&, v8::internal::Handle<v8::internal::JSObject>) 2017-03-07 08:24:07.362 Critical: 3: v8::internal::Runtime_CreateNumberFormat(int, v8::internal::Object**, v8::internal::Isolate*) 2017-03-07 08:24:07.362 Critical: 4: 0xcde49206147 2017-03-07 08:24:07.362 Critical: 5: 0xcde49270fcf 2017-03-07 08:24:07.362 Critical: Illegal instruction in thread 0x0000700016ed9000 addr 0x113aaf1d2

My compiled v8_shell executes the same script fine.

I've got icudtl.dat file under my LD_LIBRARY_PATH.  Is icudtl.dat the data file?  Or is there some other data file I need to include?  If it is the data file, where is the right place for it to be locatable by my executable?

Thanks!

Ben Noordhuis

unread,
Mar 12, 2017, 4:55:51 AM3/12/17
to v8-users
Hi, Jane. Yes, icudtl.dat is the data file; icudtb.dat on big-endian
systems. Do you call V8::InitializeICU() or
V8::InitializeICUDefaultLocation() before V8::Initialize()?

Vytautas Antanavicius

unread,
Mar 12, 2017, 1:11:47 PM3/12/17
to v8-users

Jane Chen

unread,
Mar 14, 2017, 12:59:05 AM3/14/17
to v8-users
I used to do it without specifying the file path for icudtl.dat.  Now I realize it's required.  So passing in the file path fixed it.  

Thanks a lot!

Gautham B A

unread,
Oct 2, 2017, 2:27:30 AM10/2/17
to v8-users
I'm trying to do the same with v8 5.9.211 on Windows and I have some problems.
I created a new Visual Studio 2015 project and added hello-world.cc as its source. I setup the include and lib directories in project configuration and it builds without any warnings/errors.
As suggested in the Getting Started with Embedding , I copied icudtl.dat, natives_blob.bin and snapshot_blob.bin to the directory where the executable resides. Screen shot - https://postimg.org/image/78agwcv2wb/

At runtime, it crashes at V8::InitializeICUDefaultLocation(argv[0]); - https://github.com/v8/v8/blob/5.9.211/samples/hello-world.cc#L16 Screenshot - https://postimg.org/image/4rmyjm700b/

Could you please help me?

Thanks,
--Gautham

Ben Noordhuis

unread,
Oct 2, 2017, 2:55:20 AM10/2/17
to v8-users
On Mon, Oct 2, 2017 at 8:27 AM, Gautham B A <gautham....@gmail.com> wrote:
> I'm trying to do the same with v8 5.9.211 on Windows and I have some
> problems.
> I created a new Visual Studio 2015 project and added hello-world.cc as its
> source. I setup the include and lib directories in project configuration and
> it builds without any warnings/errors.
> As suggested in the Getting Started with Embedding , I copied icudtl.dat,
> natives_blob.bin and snapshot_blob.bin to the directory where the executable
> resides. Screen shot - https://postimg.org/image/78agwcv2wb/
>
> At runtime, it crashes at V8::InitializeICUDefaultLocation(argv[0]); -
> https://github.com/v8/v8/blob/5.9.211/samples/hello-world.cc#L16 Screenshot
> - https://postimg.org/image/4rmyjm700b/
>
> Could you please help me?
>
> Thanks,
> --Gautham

It depends on how V8 was built: it can be configured at compile time
to load the ICU data from either icudtl.dat or icudt.dll.

If you are unsure, set a breakpoint in
`v8::internal::InitializeICUDefaultLocation()` in src/icu_util.cc and
step through it.
Reply all
Reply to author
Forward
0 new messages