InitializeMagick() causes GraphicsMagick to not find its config files

Graham Leggett <[email protected]> Wed, 17 Feb 2010 18:58:49 +0200
Newsgroups gmane.comp.video.graphicsmagick.bugs
Message-ID <[email protected]>
Hi all,

While attempting to hunt down a leak of threads on RHEL5 (installed  
from RPM), first port of call was to upgrade GraphicsMagick from  
v1.3.7 to v1.3.10.

The release notes tell us that the InitializeMagick() call is now  
mandatory, so we added the call on startup, passing NULL as a  
parameter. We are now getting the following error:

Unable to access configuration file (delegates.mgk)

Picking apart the InitializeMagick() call, it leads me to  
GetExecutionPath(), which makes various attempts on various OS'es to  
find the executable name.

What isn't clear though is what the path is used for, and how this  
path relates to the location of the GraphicsMagick config files. In  
theory, as GraphicsMagick is installed as an RPM, the location of the  
config files should be set in stone at compile time (obviously this  
isn't relevant for GraphicsMagick built on Windows, etc).

The reason we have a problem is that in our case, a library calls  
GraphicsMagick, and so the library doesn't have an idea of the  
executable name either.

Regards,
Graham
--


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev