octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in GraphicsMagick-1.3.8


From: Marco Atzeri
Subject: Re: Changes in GraphicsMagick-1.3.8
Date: Thu, 28 Jan 2010 21:48:25 +0000 (GMT)

--- Gio 28/1/10, John W. Eaton <address@hidden> ha scritto:

> On 28-Jan-2010, Ryan Rusaw wrote:
> 
> | Something like this in __magick_read__..cc should work in
> the Unix case.
> | 
> | void __attribute__ ((constructor))
> | _initialize_magick_(void)
> | {
> | InitializeMagick("");
> | }
> 
> But the documentation for Magick::InitializeMagick says
> 
>   This function should be invoked in the primary
> (original) thread of
>   the application's process, and before starting any
> OpenMP threads,
>   as part of program initialization.
> 
> Calling it in a dynamically loaded plug-in at some
> arbitrary time in
> the execution of the program does not seem to match that
> recommentation, though maybe we are currently OK because we
> don't
> start any OpenMP threads.  But what if we do at some
> point in the
> future?  Then what?.  So is calling it in the
> dynamically loaded
> function really OK?
> 
> OK, I just found this information:
> 
>   This initialization step is not required under Unix,
> Linux, Cygwin,
>   or any other operating environment that supports the
> notion of
>   "installing" ImageMagick in a known location.
> 
> So instead of passing in "", I'd guess we could just omit
> the the call
> to Magick::InitializeMagick.  But we also have to work
> on Windows
> systems, so what do we do there?

from the 1.3.8 NEWS.txt file: 

Behavior Changes:

  * InitializeMagick() MUST be invoked prior to using any Magick API
    function.  Failure to do so will likely lead to an immediate
    application crash.  This is due to initialization and runtime
    changes intended to improve thread safety and efficiency.
    Previously it was only strongly recommended to invoke
    InitializeMagick().


I reported a imread crash with 1.3.8 to Bob Friesenhahn
and he pointed me to the likely miss of InitializeMagick()
in Octave.
With GM-1.3.7 imread works fine. 


> 
> Also, what about the DestroyMagick fucntion?  Do we
> need to ensure
> that it is called if __magick_read__ is cleared and the
> __magick_read__.oct file is unloaded?
> 
>   Description
> 
>   DestroyMagick() destroys the GraphicsMagick
> environment. This
>   function should be invoked in the primary (original)
> thread of the
>   application's process while shutting down, and only
> after any
>   threads which might be using GraphicsMagick
> functions have
>   terminated.
> 
> 
> jwe
> 

Marco



      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]