Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random App Pool crashes #98

Open
WilliamDoman opened this issue Mar 22, 2022 · 3 comments
Open

Random App Pool crashes #98

WilliamDoman opened this issue Mar 22, 2022 · 3 comments

Comments

@WilliamDoman
Copy link

WilliamDoman commented Mar 22, 2022

I've been using version 1.2.1 for 3 or 4 years. Without issue. Thank you!!!

It would fail once in a while but WAS would restart the app pool and it was fine. Randomly this week it started crashing the app pool every 5/10/15 minutes.

After reading issue #34 I upgraded to 1.2.3 and upgraded gsdll64.dll to the latest 9.55 and have had no improvement. I've also tried to load dll from memory set to false and that fails to run.

It is crashing across 2 IIS servers. I does seem that it may have some sort of environmental cause, but it works on dozens of pdf's before it crashes the app pool. It doesn't seem to be any sort of memory leak.

Any ideas?

 GhostscriptVersionInfo version = new GhostscriptVersionInfo(
                                                                    new Version(0, 0, 0), PathToGhostScriptDLL,
                                                                    string.Empty, GhostscriptLicense.GPL);

 using (rasterizer = new GhostscriptRasterizer())
            {
                rasterizer.Open(pdfContent, version, true);
               ....
                 Image img = rasterizer.GetPage(DIP, page);

The stack traces from the IIS debugger

[[HelperMethodFrame]]
System.Drawing.Bitmap..ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)+a2
Ghostscript.NET.Viewer.GhostscriptViewerImage..ctor(Int32, Int32, Int32, System.Drawing.Imaging.PixelFormat)+59
Ghostscript.NET.Viewer.GhostscriptViewerDisplayHandler.Presize(IntPtr, IntPtr, Int32, Int32, Int32, UInt32)+73
DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int32, Int32, Int32, Int32)+64
DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, System.String, Int32, Int32 ByRef)+154
[[InlinedCallFrame]]
Ghostscript.NET.Interpreter.GhostscriptInterpreter.Run(System.String)+8a
Ghostscript.NET.Viewer.GhostscriptViewer.ShowPage(Int32, Boolean)+529
PDF2ImageFactory.CreatePageImagesFromPDF(System.String, System.IO.MemoryStream, Int32, System.Collections.Generic.List`1)+5a6

And the error messages I get when fiddling with the version and in memory param. It works with true, errors with false.

Ghostscript.NET.GhostscriptAPICallException: An error occured when call to 'gsapi_new_instance' is made: -100
at Ghostscript.NET.Interpreter.GhostscriptInterpreter.Initialize()
at Ghostscript.NET.Viewer.GhostscriptViewer.Open(String path, GhostscriptVersionInfo versionInfo, Boolean dllFromMemory)
at Ghostscript.NET.Rasterizer.GhostscriptRasterizer.Open(Stream stream, GhostscriptVersionInfo versionInfo, Boolean dllFromMemory)

***** EDIT ****
I've tried downgrading ghost to 9.53.3 and 9.53.1 without any difference.

@WilliamDoman
Copy link
Author

The crash debugger utility show's this error when it crashes the app pool.

could not load file or assembly 'gsdll64' or one of its dependencies. The module was expected to contain an assembly manifest.

@WilliamDoman
Copy link
Author

We've switched solutions to get past this issue. Thanks

@ms0828600
Copy link

What do you mean with switched solutions - what exactly worked for you now? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants