Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, lin

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hengsopheak
Posts: 16
Joined: 2017-03-21T07:45:32-07:00
Authentication code: 1151

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, lin

Post by hengsopheak »

I've installed ImageMagick as below environment and try to used Pango with Unicode characters then I found below problem.

Environment:

Version : ImageMagick 7.0.5-4 Q16 x86_64 2017-04-04
Features : Cipher DPC HDRI
Delegates (built-in) : bzlib djvu fftw fontconfig freetype gvc jp2 lcms lzma openexr pangocairo png x xml zlib
OS : OS X EI Capitan

Check Pango Version:

Commend : identify -list format | grep -Ei "Description|pango"
Result : PANGO* r-- Pango Markup Language (Pangocairo 1.40.4)

After I try to create images as below commend-line

Code: Select all

convert -size 500x500 xc:'#263238' \(-gravity Center -size 100x50 -background none -font "IRANSans.ttf" -pointsize 32 pango:"<span face='IRANSans' foreground='white'>درود</span>" \) -gravity Center -composite bge.png
RESULT:

Code: Select all

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Abort trap: 6
I've list all configuration be run convert -list configure commend-line.

Code: Select all

`convert -list configure

Path: /usr/local/lib/ImageMagick-7.0.5//config-Q16HDRI/configure.xml

Name Value

CC gcc
CFLAGS -I/opt/local/include/libxml2 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/include -I/opt/local/include/openjpeg-2.1 -I/opt/local/include -I/opt/local/include/graphviz -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include -I/opt/local/include -g -O2 -Wall -mtune=haswell -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/local/lib/ImageMagick-7.0.5/modules-Q16HDRI/coders
CONFIGURE ./configure
CONFIGURE_PATH /usr/local/etc/ImageMagick-7/
COPYRIGHT Copyright (C) 1999-2016 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick-7
CXX g++
CXXFLAGS -g -O2 -D_THREAD_SAFE -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib djvu mpeg fftw fontconfig freetype lcms lzma openexr openjp2 pango png ps x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-7
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC HDRI Cipher
FILTER_PATH /usr/local/lib/ImageMagick-7.0.5/modules-Q16HDRI/filters
GIT_REVISION 11757
HOST x86_64-apple-darwin15.6.0
INCLUDE_PATH /usr/local/include/ImageMagick-7
LDFLAGS -L/usr/local/lib -L/usr/X11/lib
LIB_VERSION 0x705
LIB_VERSION_NUMBER 7,0,5,4
LIBRARY_PATH /usr/local/lib/ImageMagick-7.0.5
LIBS -L/opt/local/lib -llcms2 -L/opt/local/lib -lfreetype -L/opt/local/lib -lpng16 -L/opt/local/lib -ldjvulibre -L/opt/local/lib -lfftw3 -L/opt/local/lib -lfontconfig -lfreetype -lXext -lXt -lSM -lICE -lX11 -L/opt/local/lib -llzma -lbz2 -L/opt/local/lib -lIlmImf -lImath -lHalf -lIex -lIexMath -lIlmThread -L/opt/local/lib -lopenjp2 -L/opt/local/lib -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -L/opt/local/lib -lxml2 -L/opt/local/lib -lgvc -lcgraph -lcdt -L/opt/local/lib -lz -lm
NAME ImageMagick
PCFLAGS -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2017-04-04
SHARE_PATH /usr/local/share/ImageMagick-7
SHAREARCH_PATH /usr/local/lib/ImageMagick-7.0.5/config-Q16HDRI
TARGET_CPU x86_64
TARGET_OS darwin15.6.0
TARGET_VENDOR apple
VERSION 7.0.5
WEBSITE http://www.imagemagick.org
Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c,

Post by snibgo »

As this isn't about Imagick, I'm moving it to Users.

This problems looks specific to Cairo, rather than ImageMagick.

I suggest you simplify your command. What is the simplest command that shows the problem? What happens with different text? Or a different font?
snibgo's IM pages: im.snibgo.com
hengsopheak
Posts: 16
Joined: 2017-03-21T07:45:32-07:00
Authentication code: 1151

Re: Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c,

Post by hengsopheak »

I'm testing with below commend

Code: Select all

convert -font Kh-Siemreap.ttf  -pointsize 36  pango:"Hellow this is working"  mincho_test.png
and

Code: Select all

convert -font /Users/sopheak/Documents/cam/vgo/public/image/fonts/Kh-Siemreap.ttf  -pointsize 36  pango:"Hellow this is working"  mincho_test.png
and I return the same error

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Abort trap: 6

Working if I used Label instead of using Pango.

Code: Select all

convert -font /Users/sopheak/Documents/cam/vgo/public/image/fonts/Kh-Siemreap.ttf  -pointsize 36  label:"dd"  mincho_test.png
However I don't install and I've check simply cairo is not competible with 7.0.5.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c,

Post by Bonzo »

As snibgo said "Or a different font?" or no font at all -default will be used.
hengsopheak
Posts: 16
Joined: 2017-03-21T07:45:32-07:00
Authentication code: 1151

Re: Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c,

Post by hengsopheak »

those fonts are installed in my system and I'm used that path to my existing fonts too

It will work if I use label instead of Pango.

Code: Select all

1 : convert -font /Users/sopheak/Documents/cam/vgo/public/image/fonts/Kh-Content.ttf  -pointsize 36  pango:"ddddd"  mincho_test.png
2 : convert -font /Users/sopheak/Documents/cam/vgo/public/image/fonts/Kh-Dangrek.ttf   -pointsize 36  pango:"dd"  mincho_test.png
3 : convert -background lightblue -fill blue  -font Times-New-Roman-Bold -size 165x70  pango:"d" label_size_fit.gif
4 : convert -background lightblue pango:"Anthony Thyssen" pango.gif
The same error

Code: Select all

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Abort trap: 6
Post Reply