SOLVED - Random Blue Screens

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mdavidjohnson
Posts: 4
Joined: 2018-04-12T13:48:07-07:00
Authentication code: 1152

SOLVED - Random Blue Screens

Post by mdavidjohnson » 2018-04-12T15:16:04-07:00

I'm using ImageMagick 7.07 on Windows 7 Pro (64-bit) SP1.

I'm cropping a 27000x13500 pixel .png image into 64800 75x75 pixel .png sub-images, using a 64800-line batch file at the command prompt. Here are three representative lines from that batch file:

Magick convert M1.png -crop 75x75+26400+75 M352x001.png
Magick convert M1.png -crop 75x75+26475+75 M353x001.png
Magick convert M1.png -crop 75x75+26550+75 M354x001.png

This is working correctly and is producing the proper sub-images. However, I'm experiencing random Blue Screens (at iteration 14, 546, 598, and 707 so far). Each time it happens, I truncate the batch file and continue from the point of failure.

I don't experience this Blue Screen problem with any other programs.

When I restart the computer after the Blue Screen, I also get a popup saying that "Windows could not connect to the System Event Notification Service". But when I look at that service, it has started automatically and is running.

Any ideas?
Last edited by mdavidjohnson on 2018-04-14T06:31:09-07:00, edited 1 time in total.

snibgo
Posts: 10717
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Random Blue Screens

Post by snibgo » 2018-04-12T17:02:17-07:00

For IM v7, I suggest you use "magick", not "magick convert".

By "Blue screen", I assume you mean Windows crashes with the "blue screen of death"?

I guess it is an out-of-memory problem. Running out of memory is not predictable, because it depends what else Windows is doing.

Your input is large. At 8 bytes/pixel, it needs 3GB of memory. How much free memory do you have?

Re-reading a large PNG file 64 thousand times is crazy. Instead, I would read it once, making a MPC file. Then use that MPC as the input. This will use less memory and be faster.

Code: Select all

magick M1.png M1.mpc
magick M1.mpc -crop 75x75+26400+75 M352x001.png
magick M1.mpc -crop 75x75+26475+75 M353x001.png
magick M1.mpc -crop 75x75+26550+75 M354x001.png
: etc
del M1.mpc
del M1.cache
Another option is to have one magick command that calls a script that reads the input once, and has each crop and write within a parenthesis.
snibgo's IM pages: im.snibgo.com

mdavidjohnson
Posts: 4
Joined: 2018-04-12T13:48:07-07:00
Authentication code: 1152

Re: Random Blue Screens

Post by mdavidjohnson » 2018-04-13T07:30:23-07:00

Update: further Blue Screens at iterations 897, 941, 959, 996, 1075, 1153, and 1202.

mdavidjohnson
Posts: 4
Joined: 2018-04-12T13:48:07-07:00
Authentication code: 1152

Re: Random Blue Screens

Post by mdavidjohnson » 2018-04-13T07:34:45-07:00

Thanks snibgo - I'll give that a try. BTW, I have 16GB of RAM, of which 12 is available and 9 is free.

mdavidjohnson
Posts: 4
Joined: 2018-04-12T13:48:07-07:00
Authentication code: 1152

Re: Random Blue Screens

Post by mdavidjohnson » 2018-04-13T11:07:39-07:00

Thank you again, snibgo -

That is indeed much faster (an estimated 26-hour run vs. a previously estimated 9-day run). And, no more crashes so far (just passed iteration 2000).

I'm new to ImageMagick and to this forum. How do I mark this request as SOLVED?

User avatar
fmw42
Posts: 23880
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Random Blue Screens

Post by fmw42 » 2018-04-13T11:48:44-07:00

mdavidjohnson wrote:
2018-04-13T11:07:39-07:00
I'm new to ImageMagick and to this forum. How do I mark this request as SOLVED?
Edit the title of your first post at the top of this topic

Post Reply