Windows service crashes - Magick.NET Q16 HDRI x64 #1923
Replies: 3 comments 5 replies
-
|
Which version of this library are you using? |
Beta Was this translation helpful? Give feedback.
-
|
I am unable to reproduce your issue by guessing the rest of the code from your example. Please provide a complete and small example that can be used to reproduce the issue. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for continuing to provide me with the requested information. This really safes me a lot of time on all the support I am providing to you. The good news is that I figured out what is happening. When reading that PDF file with those specific settings you are running into an access violation inside the Ghostscript library. The Ghoscript library can be started in two different ways. It can either be loaded directly into memory or a command is executed on the command line. You seem to be running your application in 64-bit and I would recommend you to do that because it allows you to allocate more memory. When both Ghostscript and your application are 64-bit the Ghoscript library will be loaded in your application. But when an access violation happens this also means that this access violation is happening "inside" your application and that means the whole application will be terminated. When you run your service in 32-bit it will execute the application on the command line and when the access violation happens this will only terminate the Ghostscript application. The bad news is that I cannot help you any further because this is happening inside the Ghostscript library. The only thing that I could do would be to introduce an option that would prevent loading the Ghoscript library into the application and force it it always use the command line instead. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Setup
I have an app running as a windows service in a Windows Server 2012 r2 server. The app reads a pdf file from a network and then creates tiles from each page to feed a deep zoom service.
Recently, a set of pdf files are causing the service to crash completely. Every part of the code is properly coded inside try catch blocks and any error gets logged back to a db.
The pdf file opens fine using Acrobat reader and I just don't see anything wrong with it, the only difference I see is that the files contains an unusually large amount of keywords in the meta data. Attached a sample file.
200-24946866.PDF
The error is being thrown in the following block of code:
try {using (images = new MagickImageCollection()){// Read all the pages of the pdf to the collection.images.Read(_stream, settings);...}}catch...When the code eraches the line
images.Read(_stream, settings);, the app throws the following error.Attempted to read or write protected memory. This is often an indication that other memory is corrupt
This error happens when using Ghostcript versions: 10.03.1 and 10.06.0, but it works fine with version 9.54.0.
After testing, every version of Ghostscript starting from 9.55.0 FAILS!!
I read version 9.55.0 introdueces a new pdf interpreter written en C instead of PostScript, but it is disabled by default.
I would very much appreciate any help to find out:
Any help will be awesome!
Edgar Landazuri
Beta Was this translation helpful? Give feedback.
All reactions