-
Notifications
You must be signed in to change notification settings - Fork 60
[UIFontDescriptor initialize] may have been in progress in another thread when fork() was called #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @erdemgezer, There have been some improvements to locking in text rendering in recent libvipses. Have you tried your Ubuntu example with current stable libvips (8.16.1)? Text rendering is extremely complex, unfortunately, and interacts with a huge number of different libraries and system components on the various platforms :( |
Hi @jcupitt , |
@erdemgezer Were you able to make any progress with this?
For triage purposes: this looks like Ubuntu 24.04, which provides libvips 8.15.1. |
@kleisauke I've tried building latest libvips 8.16.1 but didn't help with random segmentation fault errors on Ubuntu. |
Does this only occur if you run it from the Rails console? Can you reproduce this without the $ docker run -e DEBIAN_FRONTEND=noninteractive -v $(pwd):/src -w /src -it ubuntu:24.04 sh -c "\
apt-get update -y && \
apt-get install -y --no-install-recommends libvips-tools && \
vips text hello_world.png '<span foreground=\"#ff5500\" background=\"#c8c8c8\">Hello, world!</span>' --width 500 --height 500 --dpi 300 --rgba" So at least that seems to work without any issues. |
I think it only occurs when I use the |
Note to self: check if this is related to Rails (or Puma) its |
@kleisauke it's also randomly failing when it's called from a SolidQueue Job (ActiveJob). It usually works on the second retry.
|
Having interesting errors both on Mac and Ubuntu (Docker) while adding text on top of an image using ruby-vips.
On my mac development environment, If I call this method from an ActiveJob, it fails with:
Using of env var
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes
fixes it as suggested in #155 (comment)However, on Ubuntu docker environment I randomly get segmentation fault errors or floating point exception errors when running the from Rails console.
Everthing works fine if I don't use the
.text
method in both environments.Mac stack
MacOS 15.3.1 (M2)
Ruby 3.3.5
Rails 7.2.1
vips-8.16.0
Ubuntu stack
Dockerized x86_64
Linux 116.202.15.119-1f5530ef76b3 6.8.0-54-generic
Using libvips42 package
Ruby 3.3.5
Rails 7.2.1
The text was updated successfully, but these errors were encountered: