Getting Divide by Zero and Access Denied errors

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
NoDozing
Posts: 2
Joined: 2014-07-16T07:41:33-07:00
Authentication code: 6789

Getting Divide by Zero and Access Denied errors

Post by NoDozing »

We're converting PDF files to PNG files. We're getting An exception of type 'System.DivideByZeroException' occurred in Magick.NET-x86.dll but was not handled in user code if we use

Code: Select all

                    var s = new MagickReadSettings();
                    s.Density = new MagickGeometry(300, 300);

                    using (var images = new MagickImageCollection())
                    {
                        images.Read(inputPdfPath, s);
We get An unhandled exception of type 'System.AccessViolationException' occurred in Magick.NET-x86.dll if we use

Code: Select all

                    var s = new MagickReadSettings();
                    s.Density = new MagickGeometry(150, 150);

                    using (var images = new MagickImageCollection())
                    {
                        images.Read(inputPdfPath, s);
We get no errors if we use:

Code: Select all

                    var s = new MagickReadSettings();
                    s.Density = new MagickGeometry(75, 75);

                    using (var images = new MagickImageCollection())
                    {
                        images.Read(inputPdfPath, s);
I'd be happy to send the PDF file is needed. Some PDFs give no errors with the first code above.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Getting Divide by Zero and Access Denied errors

Post by dlemstra »

Can you contact me through Codeplex (https://www.codeplex.com/site/users/view/dlemstra) and send me link to your file? If you cannot send a link just send me a message and I will reply to it so you will get my e-mail.

What is your Ghostscript version?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
NoDozing
Posts: 2
Joined: 2014-07-16T07:41:33-07:00
Authentication code: 6789

Re: Getting Divide by Zero and Access Denied errors

Post by NoDozing »

I loaded the latest version yesterday. I have left you a message at CodePlex.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Getting Divide by Zero and Access Denied errors

Post by dlemstra »

The problem is a bug in the Ghostscript library. The bug report can be found here: http://bugs.ghostscript.com/show_bug.cgi?id=695372
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply