GLib-GObject-CRITICAL problem

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
User avatar
jtneill
Posts: 4
Joined: 2013-06-02T01:38:34-07:00
Authentication code: 6789
Location: Australia

GLib-GObject-CRITICAL problem

Post by jtneill »

Hi - I'm using:

CentOS 5.4
Version: ImageMagick 6.8.5-9
Delegates: fontconfig freetype gslib jng jpeg lcms png ps rsvg tiff x xml zlib

rsvg test.svg -png
works

however
convert test.svg -png
produces

(process:16278): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function
(process:16278): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function
(process:16278): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

Any ideas why?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: GLib-GObject-CRITICAL problem

Post by snibgo »

I don't know what this command would try to do:

Code: Select all

convert test.svg -png
Better would be:

Code: Select all

convert test.svg testOut.png
snibgo's IM pages: im.snibgo.com
User avatar
jtneill
Posts: 4
Joined: 2013-06-02T01:38:34-07:00
Authentication code: 6789
Location: Australia

Re: GLib-GObject-CRITICAL problem

Post by jtneill »

Thanks for your help. This suggestion gives the same results. The complete output is:

(process:22351): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function

(process:22351): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function

(process:22351): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
convert: memory allocation failed `/test.svg' @ error/svg.c/ReadSVGImage/2915.
convert: no images defined `/test.png' @ error/convert.c/ConvertImageCommand/3106.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: GLib-GObject-CRITICAL problem

Post by snibgo »

What is in test.svg? It might specify a large number of pixels, so convert (or its delegate) tries to make a massive image, causing the memory allocation failure.
snibgo's IM pages: im.snibgo.com
User avatar
jtneill
Posts: 4
Joined: 2013-06-02T01:38:34-07:00
Authentication code: 6789
Location: Australia

Re: GLib-GObject-CRITICAL problem

Post by jtneill »

I was testing a 188kb svg file, so tried with a 6kb svg file with same results.

rsvg successfully converts both these svgs to png.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: GLib-GObject-CRITICAL problem

Post by snibgo »

The size of the svg file in kb is probably irrelevant; but there might be a problem in the number of pixels.

Can you publish the smaller svg file? Upload to dropbox or similar and post the URL here.
snibgo's IM pages: im.snibgo.com
User avatar
jtneill
Posts: 4
Joined: 2013-06-02T01:38:34-07:00
Authentication code: 6789
Location: Australia

Re: GLib-GObject-CRITICAL problem

Post by jtneill »

OK - both images I am testing are from commons.wikimedia.org (I'm trying to get IM working with a MediaWiki install)

Smaller: http://commons.wikimedia.org/wiki/File:Searchtool.svg
Larger: http://commons.wikimedia.org/wiki/File: ... _Needs.svg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: GLib-GObject-CRITICAL problem

Post by snibgo »

For me, IM v6.8.5-8 on Windows 7, the smaller SVG converts without complaint:

Code: Select all

convert Searchtool.svg s.png
Sadly, the result isn't correct. As I've commented on another thread today, Inkscape generally understands SVG more comprehensively:

Code: Select all

inkscape -f searchtool.svg -e s.png -y 1
snibgo's IM pages: im.snibgo.com
Post Reply