Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#132 crash in 1.3.8

closed-wont-fix
Algorithms (87)
5
2010-02-04
2010-02-04
Igor
No

simple code using image.ping() and image.magick() crashes in 1.3.8, the same code works fine in 1.3.7:

GraphicsMagick-1.3.8:
./test ../chemnav.gif
test: magick/semaphore.c:525: LockSemaphoreInfo: Assertion `semaphore_info != (SemaphoreInfo *) ((void *)0)' failed.
Aborted (core dumped)

GraphicsMagick-1.3.7:
./test ../chemnav.gif
GIF

This is the sample code in question:
#include <Magick++.h>
#include <iostream>

using namespace Magick;
using namespace std;
int main(int argc,char **argv)
{
Image image;
if (argc<2) return 1;
string input=argv[1];
image.ping(input);
cout<<image.magick()<<endl;

return 0;
}

Discussion

  • This issue is documented in the release notes. See the "Behavior Changes" section in this page "http://www.graphicsmagick.org/1.3/NEWS.html#january-21-2010".

    The recommended procedure is to include code like this in main() before using any other GraphicsMagick functionality:

    InitializeMagick(*argv);

    You can also just pass a null pointer like

    InitializeMagick(NULL);

    The function may be invoked any number of times as long as it is assured to be invoked by only one thread at a time.

    Bob

     
    • status: open --> closed-wont-fix