ImageMagick spins when File does not exist

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
PaulLassoSup

ImageMagick spins when File does not exist

Post by PaulLassoSup »

Hi,

I wasn't sure, if this was the correct place to put this. Please forgive me, if it is not.

I'm trying to build ImageMagick on Mac OS X 10.4.9. Everything seems to build correctly, including all the delegates.

I'm not the actual developer, so please forgive my ignorance (I'm just the QA guy :). We are using the MagickCore API to call various functions in the IM library, which runs in-process. However, IM just sits and spins when the function below is called and file does not exist, eventually causing our application to crash.

image = ReadImage ( info, &exception );

Am I doing something wrong? I can provide more info, if it is need.

Any help would be greatly appreciated.

Paul
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick spins when File does not exist

Post by anthony »

A little bit more is probably a good idea. 'info' should be a string that either creates an image or reads one in. If it is a '-' it will read stdin which will probably hang if nothing is feeding it data.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
PaulLassoSup

Re: ImageMagick spins when File does not exist

Post by PaulLassoSup »

Hi,

I don't know, if this will help. However, I've narrowed down the issue to when IM calls this function:
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");

The issue occurs when the file does not exist, the file is a ULD file (when using it directly on uploaded files), and and certain tif files. That function never seems to return.

Any ideas?

Paul
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick spins when File does not exist

Post by magick »

Can you post a minimal set of code that we can download, compile, and run to reproduce the problem? Your description suggests there may be a deadly embrace in the logging method.
PaulLassoSup

Re: ImageMagick spins when File does not exist

Post by PaulLassoSup »

Thank you. I'll get that together as soon as I can. Here is the relevant part of the crash log on OSX. I thought it might help.

Paul

Thread 16 Crashed:
0 libMagick.10.dylib 0x0291d35a LogMagickEventList + 12 (log.c:1094)
1 libMagick.10.dylib 0x0291e27c LogMagickEvent + 55 (log.c:1228)
2 libMagick.10.dylib 0x02993682 GetXMLTreeTag + 130 (xml-tree.c:942)
3 libMagick.10.dylib 0x0291b455 TraverseLocaleMap + 88 (locale.c:751)
4 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
5 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
6 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
7 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
8 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
9 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
10 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
11 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
12 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
13 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
14 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
15 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
16 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
17 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
18 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
19 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
20 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
21 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
22 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
23 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
24 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
25 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
26 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
27 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
28 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
29 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
30 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
31 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
32 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
33 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
34 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
35 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
36 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
37 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
38 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
39 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
40 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
41 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
42 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
43 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
44 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
45 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
46 libMagick.10.dylib 0x0291b4d2 TraverseLocaleMap + 213 (locale.c:805)
47 libMagick.10.dylib 0x0291b4d2 TraverseLocaleMap + 213 (locale.c:805)
48 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
49 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
50 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
51 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
52 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
53 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
54 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
55 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
56 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
57 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
58 libMagick.10.dylib 0x0291b506 TraverseLocaleMap + 265 (locale.c:808)
59 libMagick.10.dylib 0x0291b4d2 TraverseLocaleMap + 213 (locale.c:805)
60 libMagick.10.dylib 0x0291b4d2 TraverseLocaleMap + 213 (locale.c:805)
61 libMagick.10.dylib 0x0291ba42 LoadLocaleList + 602 (locale.c:893)
62 libMagick.10.dylib 0x0291bd93 GetLocaleInfo_ + 508 (locale.c:961)
63 libMagick.10.dylib 0x0291bef6 GetLocaleMessage + 125 (locale.c:433)
64 libMagick.10.dylib 0x028f56e7 GetLocaleExceptionMessage + 97 (exception.c:561)
65 libMagick.10.dylib 0x028f6409 ThrowMagickExceptionList + 62 (exception.c:950)
66 libMagick.10.dylib 0x028f61f5 ThrowMagickException + 69 (exception.c:980)
67 libWand.10.dylib 0x0169019c MogrifyImageCommand + 85497 (mogrify.c:4430)
68 ImageTag.dylib 0x000dab99 im_transform(void*, int) + 2785
69 Lasso 0x0112ac09 var_code_t_::Execute(LPExecState*, int, _opaque_pthread_t**) const + 4397
70 Lasso 0x010ad297 LPInvokeInstance(LPExecState*, Variant const*, bool, int) + 1523
71 Lasso 0x010aefd4 LPExecuteBytes(LPExecState*) + 4966
72 Lasso 0x0112b871 var_code_t_::Execute(LPExecState*, int, _opaque_pthread_t**) const + 7573
73 Lasso 0x010ad297 LPInvokeInstance(LPExecState*, Variant const*, bool, int) + 1523
74 Lasso 0x011b57c0 process(void*, int) + 1426
75 Lasso 0x0112ac09 var_code_t_::Execute(LPExecState*, int, _opaque_pthread_t**) const + 4397
76 Lasso 0x010ad297 LPInvokeInstance(LPExecState*, Variant const*, bool, int) + 1523
77 Lasso 0x010b5182 LPExecuteBytes(LPExecState*) + 29972
78 Lasso 0x0112b871 var_code_t_::Execute(LPExecState*, int, _opaque_pthread_t**) const + 7573
79 Lasso 0x010ad297 LPInvokeInstance(LPExecState*, Variant const*, bool, int) + 1523
80 Lasso 0x0108e2c0 LPDocumentRec::Execute(LPExecState*, bool, Variant*, Variant*) + 420
81 Lasso 0x0106b595 Lasso::FormulateResponse(Request*, Variant*) + 309
82 Lasso 0x010669b1 Lasso::FormatBasedOnError(Request*, osError, Variant*) + 559
83 Lasso 0x01067c8a Lasso::ProcessRequestNew(Request*) + 4054
84 Lasso 0x0106a75e Lasso::RunSession(WebConnector*) + 476
85 Lasso 0x0106b459 Lasso::thread_start(void*) + 33
86 Lasso 0x010f8270 os_entry(void*) + 90
87 libSystem.B.dylib 0x90023d87 _pthread_body + 84
Post Reply