Between the version which worked and the version which is failing, the implementation of magick/resource.c was changed to allocate a semaphore for each resource limit rather than using a single global semaphore across all resource limits.
Something else which changed since the changeset version which is reported as "working" is that when an Image is constructed it caches certain resource limits to be used later. It does this in order to improve performance. This means that the resource limit code is being invoked now whereas if an Image was statically constructed, it would not have been invoked before.
There is no proper fix other than to make sure that InitializeMagick() has been invoked before any other API elments are used.
Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt