Invalid file descriptor to ICU data received.

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Invalid file descriptor to ICU data received.

Postby Czarek » Sun Jun 26, 2016 12:25 pm

I am getting this error when running cefpython with latest CEF 2704 from Spotify:
Code: Select all
[0626/190605:ERROR:icu_util.cc(183)] Invalid file descriptor to ICU data received.


Some facts:
1. The icudtl.dat file is in the same directory as libcef.so / cefpython.so / script.py
2. I am setting CefSettings.resources_dir_path - an absolute path to the directory where icu/libcef/pak files reside
3. script.py preloads libcef.so via LD_PRELOAD
4. Run /usr/bin/python script.py - ICU ERROR
5. After copying icudtl.dat to /usr/bin error disappears

How can discovery of the ICU file be fixed?

EDIT:

The error message in Chromium code:
https://cs.chromium.org/chromium/src/ba ... mium&l=173
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Invalid file descriptor to ICU data received.

Postby Czarek » Mon Jun 27, 2016 12:12 am

The directory where ICU file resides is the current working directory (cwd). Looks like preloading libcef.so via LD_PRELOAD is no more required as tcmalloc is disabled by default, so I remove preload, but it doesn't change anything.

Marshall, do you have any idea for this issue? In previous CEF versions the ICU file was searched for in current working directory / where libcef.so resides, but in new CEF it looks for ICU in the directory where executable resides. Is my only option applying a patch to Chromium?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Invalid file descriptor to ICU data received.

Postby magreenblatt » Mon Jun 27, 2016 8:29 am

You could create a symlink as part of your install process.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Invalid file descriptor to ICU data received.

Postby Czarek » Mon Jun 27, 2016 3:48 pm

I did more research on the issue - for those interested details here: https://github.com/cztomczak/cefpython/ ... -228781557
I think I will create a patch to CEF to expose CefOverridePath() function that will allow to override PathService path keys: DIR_EXE and DIR_MODULE.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Invalid file descriptor to ICU data received.

Postby Czarek » Tue Jun 28, 2016 3:39 pm

Created patch: https://github.com/cztomczak/cefpython/ ... e231.patch
Works great. Marshall, would you like a pull request?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Invalid file descriptor to ICU data received.

Postby magreenblatt » Tue Jul 05, 2016 10:38 am

Czarek wrote:Created patch: https://github.com/cztomczak/cefpython/ ... e231.patch
Works great. Marshall, would you like a pull request?

Overriding paths is time-sensitive -- it should occur at a certain time during CEF initialization to avoid inconsistent state. Is there a reason you need to override arbitrary paths? Instead of making it configurable we should probably just set DIR_EXE = DIR_MODULE = <libcef.so path> on Linux.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Invalid file descriptor to ICU data received.

Postby Czarek » Tue Jul 05, 2016 10:56 am

magreenblatt wrote:
Czarek wrote:Created patch: https://github.com/cztomczak/cefpython/ ... e231.patch
Works great. Marshall, would you like a pull request?

Overriding paths is time-sensitive -- it should occur at a certain time during CEF initialization to avoid inconsistent state. Is there a reason you need to override arbitrary paths? Instead of making it configurable we should probably just set DIR_EXE = DIR_MODULE = <libcef.so path> on Linux.

No, I don't need to override arbitrary paths. Only as you say DIR_EXE = DIR_MODULE = <libcef.so.path> is enough to fix the issue. I override paths before calling CefInitialize or any other CEF API. From Chromium documentation it says that you only can't override DIR_CURRENT. If you override paths before calling any of Chromium/CEF code it should be safe to do so, I think.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Invalid file descriptor to ICU data received.

Postby magreenblatt » Tue Jul 05, 2016 11:13 am

An issue and patch for "DIR_EXE = DIR_MODULE = <libcef.so.path>" would be good.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Invalid file descriptor to ICU data received.

Postby Czarek » Tue Jul 05, 2016 11:53 am

magreenblatt wrote:An issue and patch for "DIR_EXE = DIR_MODULE = <libcef.so.path>" would be good.

Created issue #1936: https://bitbucket.org/chromiumembedded/ ... e-on-linux
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 55 guests