Re: Windows Log txtfile

Bob Friesenhahn <[email protected]> Fri, 6 Mar 2020 10:31:57 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--3735943886-1135636377-1583512317=:19876
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Fri, 6 Mar 2020, 10bxjfhf wrote:

>> How do you prefer that the error be reported?  Is there a reliable way to 
>> report the error under Windows?
>
> As to your questions, I can only refer to other libraries I have worked with 
> and compare how they 'do things'
>
> One of the ones which I have used occasionally in my apps is libcurl - and of 
> course libtiff, which I understand is a lib you also maintain.

I only help to maintain libtiff and others have been doing most of the 
work.

Free software is often developed by volunteers but it is becomming 
more and more common that free software is developed by employees who 
get a salary for working on it.

As far as I am aware, no contributors are making any income from 
working on GraphicsMagick and I have put well over a million dollars 
worth of my time and financial resources into it and especially if one 
also includes my time contributing to ImageMagick.

Indeed, the 'sloccount' program says that the software would cost 
43,039,443 US dollars to develop from scratch (not including the many 
add-on libraries) according to the basic COCOMO model.

> As I have only used libtiff indirectly via the wxWidgets wrapers, I am not 
> really familiar with it, but it does have
>
> TIFFSetErrorHandler
>
> Have I missed such a feature in magick++

While Magick++ does not currently offer a wrapper for them, the core C 
library offers SetErrorHandler(), SetWarningHandler(), and 
SetFatalErrorHandler() which can be used to synchronously deal with 
error/warning reports.  These can be set before InitializeMagick() is 
called.

>> Such data is in a 'log_info' pointer (a pointer to LogInfo) in magick/log.c 
>> and this could be inspected using a debugger.  I have done everything 
>> possible to avoid exposing these internal structures to the outside world 
>> since it inhibits the ability to make changes. At one time it was likely 
>> exposed.
>
> As the way to access the *.mgk files are set now, they are global to a PC - 
> not very flexible.

They are not truely global to the PC, but it is true that it would be 
good to be able to programmatically influence things before 
InitializeMagick is called.

> but one way would be to pass a second path to InitializeMagick, specifying 
> where to look for those configuration files.

The existing string argument is supposed to serve this purpose.  We 
could change the configuration default so that the DLL does not call 
InitializeMagick().  At one time it was possible to get away without 
calling InitializeMagick() but it is an absolute requirement now.

> As well, it could/should pass back some indication of what, if anything, went 
> wrong. Even a plain true/false as a return code, with possibly either an 
> error code or error string.
>
> Win has this idea of GetLastError()

That sounds horrid since it requires caching data somewhere and does 
not reasonably handle threads.  If the error is thread specific then 
there is the problem that the thread which encountered the error does 
not exist any more.

It is common for muliple threads to report errors at the same instant.

> from looking at the bug list, it seems you are the only one actively working 
> on this project and there seems to very little activity on the Win side.

It is true that I am currently doing most of the work on the project 
(for many years already) but it is not actually true that there is 
little activity on the Windows side.  In fact, recently there has been 
a lot of activity.

> PS &FWIW, working on magick++ is already a detour from a detour from a detour

Few things in this world actually come for "free".

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
--3735943886-1135636377-1583512317=:19876
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--3735943886-1135636377-1583512317=:19876
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis

--3735943886-1135636377-1583512317=:19876--