chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

Invalid file descriptor to ICU data received #3778

Closed raphael10-collab closed 2 months ago

raphael10-collab commented 2 months ago

Describe the bug A clear and concise description of what the bug is.

raphy@raohy:~/wxWidgets/build-gtk$ export WX_WEBVIEW_BACKEND=wxWebViewChromium
raphy@raohy:~/wxWidgets/build-gtk$ ./samples/webview/webview 
[0829/110416.217778:WARNING:alloy_main_delegate.cc(559)] Alloy bootstrap is deprecated and will be removed in ~M127. See https://github.com/chromiumembedded/cef/issues/3685
[0829/110416.217922:ERROR:icu_util.cc(223)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

I followed all the steps described here for Linux Platform: https://docs.wxwidgets.org/latest/classwx_web_view_chromium.html :

raphy@raohy:~/wxWidgets/build-gtk$ ../configure --with-gtk=3 --enable-webviewchromium
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking whether g++ supports C++14 features by default... yes
checking for ar... ar
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for langinfo.h... yes
checking for wchar.h... yes
checking for sys/select.h... yes
checking for cxxabi.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short... 2
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of size_t... 8
checking size of long long... 8
checking size of wchar_t... 4
checking for va_copy... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether byte ordering is bigendian... no
checking for __sync_xxx_and_fetch builtins... yes
checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
checking for cos... no
checking for floor... no
checking if floating point functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if floating point functions link with -lm... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBPCRE... yes
checking for zlib.h >= 1.1.4... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... yes
checking for png.h... (cached) yes
checking for png_sig_cmp in -lpng... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for jbg_dec_init in -ljbig... yes
checking for LIBTIFF... yes
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for LIBCURL... yes
checking for GTK... yes
checking for GTHREAD... yes
checking for GTK version to use... GTK 3
checking for GDK Wayland backend... yes
checking for X11/Xlib.h... yes
checking for X11/XKBlib.h... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for Xxf86vm... yes
checking for X11/extensions/xf86vmode.h... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for SM... yes
checking for OpenGL headers... found in /usr/include
checking for GL/gl.h... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GL... yes
checking for EGL... yes
checking for WAYLAND_EGL... yes
checking if the linker accepts --version-script... yes
checking for symbols visibility support... yes
checking for broken libstdc++ visibility... no
checking for ssize_t... yes
checking if size_t is unsigned int... no
checking if size_t is unsigned long... yes
checking if wchar_t is separate type... yes
checking for pw_gecos in struct passwd... yes
checking for wcslen... yes
checking for wcsftime... yes
checking for strnlen... yes
checking for wcsdup... yes
checking for wcsnlen... yes
checking for wcscasecmp... yes
checking for wcsncasecmp... yes
checking for mbstate_t... yes
checking for wcsrtombs... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for vsscanf... yes
checking if vsnprintf declaration is broken... no
checking if snprintf supports positional arguments... yes
checking if vsscanf() declaration is broken... no
checking for putws... no
checking for fputws... yes
checking for wprintf... yes
checking for vswprintf... yes
checking for vswscanf... yes
checking for _vsnwprintf... no
checking for fsync... yes
checking for iconv... yes
checking if iconv needs const... no
checking for sigaction... yes
checking for backtrace()... yes
checking for library containing backtrace... none required
checking for __cxa_demangle() in <cxxabi.h>... yes
checking for mkstemp... yes
checking for statvfs... yes
checking for statvfs argument type... struct statvfs
checking for fcntl... yes
checking for setenv... yes
checking for unsetenv... yes
checking for nanosleep... yes
checking for uname... yes
checking for strtok_r... yes
checking for inet_addr... yes
checking for inet_aton... yes
checking for fdopen... yes
checking for sysconf... yes
checking for getpwuid_r... yes
checking for getgrgid_r... yes
checking whether pthreads work with -pthread... yes
checking if more special flags are required for pthreads... no
checking for pthread_setconcurrency... yes
checking for pthread_cleanup_push/pop... yes
checking for sched.h... yes
checking for sched_yield... yes
checking for pthread_attr_getschedpolicy... yes
checking for pthread_attr_setschedparam... yes
checking for sched_get_priority_max... yes
checking for pthread_cancel... yes
checking for pthread_mutex_timedlock... yes
checking for pthread_attr_setstacksize... yes
checking for pthread_mutexattr_t... yes
checking for pthread_mutexattr_settype declaration... yes
checking for abi::__forced_unwind() in <cxxabi.h>... yes
checking for localtime_r... yes
checking for gmtime_r... yes
checking how many arguments gethostbyname_r() takes... six
checking how many arguments getservbyname_r() takes... six
checking for dlopen... yes
checking for dladdr... yes
checking for dl_iterate_phdr... yes
checking whether inotify is usable... yes
checking for XKBCOMMON... yes
checking for LIBSECRET... yes
checking for GSPELL... configure: WARNING: gspell-1 not found, spell checking in wxTextCtrl won't be available
checking for SNDCTL_DSP_SPEED in sys/soundcard.h... yes
checking for GTKPRINT... yes
checking for LIBNOTIFY... yes
checking for xlocale.h... no
checking for locale_t... yes
checking for sys/epoll.h... yes
checking for gettimeofday... yes
checking whether gettimeofday takes two arguments... yes
checking for timezone variable in <time.h>... timezone
checking for localtime... yes
checking for tm_gmtoff in struct tm... yes
checking for _NL_TIME_FIRST_WEEKDAY in langinfo.h... yes
checking for setpriority... yes
checking for socket... yes
checking what is the type of the third argument of getsockname... socklen_t
checking what is the type of the fifth argument of getsockopt... socklen_t
checking whether we have sockaddr_in6... yes
checking for linux/joystick.h... yes
checking for XTST... yes
checking for PRIVATE_FONTS... yes
checking for python... /usr/bin/python
checking for WEBKIT... yes
checking for CEF... yes
checking for CAIRO... yes
checking for GST... configure: GStreamer 1.7.2+ not available. Not using GstPlayer and falling back to 1.0
checking for GST... yes
checking CXXWARNINGS for gcc -Woverloaded-virtual... -Woverloaded-virtual
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ar... (cached) ar
checking for strip... strip
checking for nm... nm
checking if make is GNU make... yes
checking for dependency tracking method... gcc
checking whether make sets $(MAKE)... (cached) yes
checking whether catch2/catch.hpp exists... yes
configure: creating ./config.status
config.status: creating lib/wx/config/gtk3-unicode-3.3
config.status: creating lib/wx/config/inplace-gtk3-unicode-3.3
config.status: creating utils/ifacecheck/rungccxml.sh
config.status: creating version-script
config.status: creating Makefile
config.status: creating samples/html/Makefile
config.status: creating samples/opengl/Makefile
config.status: creating samples/xrc/Makefile
config.status: creating samples/wrapsizer/Makefile
config.status: creating samples/wizard/Makefile
config.status: creating samples/widgets/Makefile
config.status: creating samples/webview/Makefile
config.status: creating samples/webrequest/Makefile
config.status: creating samples/vscroll/Makefile
config.status: creating samples/validate/Makefile
config.status: creating samples/uiaction/Makefile
config.status: creating samples/typetest/Makefile
config.status: creating samples/treelist/Makefile
config.status: creating samples/treectrl/Makefile
config.status: creating samples/toolbar/Makefile
config.status: creating samples/thread/Makefile
config.status: creating samples/text/Makefile
config.status: creating samples/taskbar/Makefile
config.status: creating samples/taborder/Makefile
config.status: creating samples/svg/Makefile
config.status: creating samples/stc/Makefile
config.status: creating samples/statbar/Makefile
config.status: creating samples/splitter/Makefile
config.status: creating samples/splash/Makefile
config.status: creating samples/sound/Makefile
config.status: creating samples/sockets/Makefile
config.status: creating samples/shaped/Makefile
config.status: creating samples/secretstore/Makefile
config.status: creating samples/scroll/Makefile
config.status: creating samples/sashtest/Makefile
config.status: creating samples/richtext/Makefile
config.status: creating samples/ribbon/Makefile
config.status: creating samples/render/Makefile
config.status: creating samples/propgrid/Makefile
config.status: creating samples/printing/Makefile
config.status: creating samples/preferences/Makefile
config.status: creating samples/power/Makefile
config.status: creating samples/popup/Makefile
config.status: creating samples/opengl/pyramid/Makefile
config.status: creating samples/opengl/penguin/Makefile
config.status: creating samples/opengl/isosurf/Makefile
config.status: creating samples/opengl/cube/Makefile
config.status: creating samples/notebook/Makefile
config.status: creating samples/minimal/Makefile
config.status: creating samples/menu/Makefile
config.status: creating samples/mediaplayer/Makefile
config.status: creating samples/mdi/Makefile
config.status: creating samples/listctrl/Makefile
config.status: creating samples/layout/Makefile
config.status: creating samples/keyboard/Makefile
config.status: creating samples/joytest/Makefile
config.status: creating samples/ipc/Makefile
config.status: creating samples/internat/Makefile
config.status: creating samples/image/Makefile
config.status: creating samples/html/zip/Makefile
config.status: creating samples/html/widget/Makefile
config.status: creating samples/html/virtual/Makefile
config.status: creating samples/html/test/Makefile
config.status: creating samples/html/printing/Makefile
config.status: creating samples/html/helpview/Makefile
config.status: creating samples/html/help/Makefile
config.status: creating samples/html/about/Makefile
config.status: creating samples/htlbox/Makefile
config.status: creating samples/help/Makefile
config.status: creating samples/grid/Makefile
config.status: creating samples/fswatcher/Makefile
config.status: creating samples/font/Makefile
config.status: creating samples/exec/Makefile
config.status: creating samples/except/Makefile
config.status: creating samples/event/Makefile
config.status: creating samples/erase/Makefile
config.status: creating samples/drawing/Makefile
config.status: creating samples/dragimag/Makefile
config.status: creating samples/docview/Makefile
config.status: creating samples/dnd/Makefile
config.status: creating samples/display/Makefile
config.status: creating samples/dialup/Makefile
config.status: creating samples/dialogs/Makefile
config.status: creating samples/debugrpt/Makefile
config.status: creating samples/dataview/Makefile
config.status: creating samples/console/Makefile
config.status: creating samples/config/Makefile
config.status: creating samples/combo/Makefile
config.status: creating samples/collpane/Makefile
config.status: creating samples/caret/Makefile
config.status: creating samples/calendar/Makefile
config.status: creating samples/aui/Makefile
config.status: creating samples/artprov/Makefile
config.status: creating samples/archive/Makefile
config.status: creating samples/animate/Makefile
config.status: creating samples/Makefile
config.status: creating demos/bombs/Makefile
config.status: creating demos/Makefile
config.status: creating demos/forty/Makefile
config.status: creating demos/fractal/Makefile
config.status: creating demos/poem/Makefile
config.status: creating demos/life/Makefile
config.status: creating utils/ifacecheck/src/Makefile
config.status: creating utils/Makefile
config.status: creating utils/wxrc/Makefile
config.status: creating utils/helpview/src/Makefile
config.status: creating utils/helpview/Makefile
config.status: creating utils/hhp2cached/Makefile
config.status: creating utils/screenshotgen/src/Makefile
config.status: creating utils/screenshotgen/Makefile
config.status: creating tests/Makefile
config.status: creating tests/benchmarks/Makefile
config.status: creating lib/wx/include/gtk3-unicode-3.3/wx/setup.h
config.status: executing wx-config commands

Configured wxWidgets 3.3.0 for `x86_64-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 3 with support for GTK+ printing libnotify
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Unicode encoding used by wxString?                      UTF-32
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 3.0      no
                                       wxWidgets 3.2      yes
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              sys
                                       tiff               sys
                                       lzma               no
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
                                       webview            yes (with backends: WebKit Chromium)

raphy@raohy:~/wxWidgets/build-gtk$ 

raphy@raohy:~/wxWidgets/build-gtk$ make -j4
/home/raphy/wxWidgets/build-gtk/bk-deps g++ -c -o basedll_any.o     -I/home/raphy/wxWidgets/build-gtk/lib/wx/include/gtk3-unicode-3.3 -I../include -D_FILE_OFFSET_BITS=64 -I/usr

raphy/wxWidgets/build-gtk/version-script -lz -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcurl -lm -lpcre2-32   -lwx_gtk3u_core-3.3 -lwx_baseu-3.3  -lGL -lEGL  -lwayland-egl -lwayland-client  -lz -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcurl -lm
(cd /home/raphy/wxWidgets/build-gtk/lib/; rm -f libwx_gtk3u_richtext-3.3.so libwx_gtk3u_richtext-3.3.so.0; ln -s libwx_gtk3u_richtext-3.3.so.0.0.0 libwx_gtk3u_richtext-3.3.so.0; ln -s libwx_gtk3u_richtext-3.3.so.0 libwx_gtk3u_richtext-3.3.so)
(cd /home/raphy/wxWidgets/build-gtk/lib/; rm -f libwx_gtk3u_stc-3.3.so libwx_gtk3u_stc-3.3.so.0; ln -s libwx_gtk3u_stc-3.3.so.0.0.0 libwx_gtk3u_stc-3.3.so.0; ln -s libwx_gtk3u_stc-3.3.so.0 libwx_gtk3u_stc-3.3.so)
(cd /home/raphy/wxWidgets/build-gtk/lib/; rm -f libwx_gtk3u_gl-3.3.so libwx_gtk3u_gl-3.3.so.0; ln -s libwx_gtk3u_gl-3.3.so.0.0.0 libwx_gtk3u_gl-3.3.so.0; ln -s libwx_gtk3u_gl-3.3.so.0 libwx_gtk3u_gl-3.3.so)
g++ -o wxrc wxrc_wxrc.o    -L/home/raphy/wxWidgets/build-gtk/lib -Wl,-rpath,/home/raphy/wxWidgets/build-gtk/lib      -pthread  -lwx_baseu_xml-3.3 -lexpat -lwx_baseu-3.3       -pthread   -Wl,--version-script,/home/raphy/wxWidgets/build-gtk/version-script -lz -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcurl -lm -lpcre2-32   -lz -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcurl -lm
make[1]: Leaving directory '/home/ra

raphy@raohy:~/wxWidgets/build-gtk$ sudo make install
mkdir -p /usr/local/lib
/usr/bin/install -c -m 644 /home/raphy/wxWidgets/build-gtk/lib/libwx_baseu-3.3.so /usr/local/lib
mkdir -p /usr/local/lib

xrc/xh_richtext.h wx/stc/stc.h wx/xrc/xh_styledtextctrl.h wx/gtk/webviewhistoryitem_webkit.h wx/gtk/webview_webkit.h wx/webview.h wx/webviewarchivehandler.h wx/webviewfshandler.h wx/webview_chromium.h wx/webview_chromium_impl.h; do \
if test ! -d /usr/local/include/wx-3.3/`dirname $f` ; then \
mkdir -p /usr/local/include/wx-3.3/`dirname $f`; \
fi; \
/usr/bin/install -c -m 644 ../include/$f /usr/local/include/wx-3.3/$f; \
done

 ------------------------------------------------------

 The installation of wxWidgets is finished.  On certain
 platforms (e.g. Linux) you'll now have to run ldconfig
 if you installed a shared library and also modify the
 LD_LIBRARY_PATH (or equivalent) environment variable.

 wxWidgets comes with no guarantees and doesn't claim
 to be suitable for any purpose.

 Read the wxWindows Licence on licencing conditions.

 ------------------------------------------------------

raphy@raohy:~/wxWidgets/build-gtk$ 

In .bashrc file:

export LIBRARY_PATH=$LIBRARY_PATH:/home/raphy/wxWidgets/3rdparty/cef/libcef_dll_wrapper
export LIBRARY_PATH=$LIBRARY_PATH:/home/raphy/wxWidgets/3rdparty/cef/Release

Executing the /sample/webview :

raphy@raohy:~/wxWidgets/build-gtk$ ./samples/webview/webview 
./samples/webview/webview: error while loading shared libraries: libcef.so: cannot open shared object file: No such file or directory

After symlinking libcef.so to /usr/local/lib folder:

raphy@raohy:~$ sudo ln -s /home/raphy/wxWidgets/3rdparty/cef/Release/libcef.so /usr/local/lib/

I get this error:

raphy@raohy:~/wxWidgets/build-gtk$ export WX_WEBVIEW_BACKEND=wxWebViewChromium
raphy@raohy:~/wxWidgets/build-gtk$ ./samples/webview/webview 
[0829/111745.627317:WARNING:alloy_main_delegate.cc(559)] Alloy bootstrap is deprecated and will be removed in ~M127. See https://github.com/chromiumembedded/cef/issues/3685
[0829/111745.627465:ERROR:icu_util.cc(223)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)
raphy@raohy:~/wxWidgets/build-gtk$ 

Expected behavior A clear and concise description of what you expected to happen and what happened instead.

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

Additional context Does the problem reproduce with the cefclient or cefsimple sample application at the same version?

Does the problem reproduce with Google Chrome at the same version?

Add any other context about the problem here.

magreenblatt commented 2 months ago

This is not a support channel for wxWebView. Check that icudtl.dat is at the correct version and in the expected location (next to libcef.so).

raphael10-collab commented 2 months ago

@magreenblatt Yes. I found it's an issue regarding the location of icudtl.dat: it has to be in the same subfolder of libcef.so : https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=16638&p=41290&hilit=Invalid+file+descriptor+to+ICU+data+received#p41290

missing-year commented 2 weeks ago

Why is this happening in windows? It occur when I run cocos.

wuzhiming commented 1 week ago

Why is this happening in windows? It occur when I run cocos.

you can submit the issue to cocos-engine