AccessViolationException occurred in GdPicture.NET.14.dll

Discussions about image processing and document imaging.
Post Reply
fervelas
Posts: 6
Joined: Tue Aug 08, 2017 5:09 am

AccessViolationException occurred in GdPicture.NET.14.dll

Post by fervelas » Tue Aug 08, 2017 5:32 am

Hello guys,

I'm having an issue with the latest release of GdPicture.NET; I just recently downloaded the latest trial available and I'm using the Csharp-Document Clean Up sample as-is to load a TIFF file and to try out some of the cleanup functions included. The TIFF file loads and shows up correctly on screen, but whenever I use the "Remove punch holes feature" I get a "AccessViolationException occurred in GdPicture.NET.14.dll" exception raised. The weird thing about it is that if I select Right or Bottom margins from the available options then no error occurs, but all the rest of the options raise the same exception.

I'm attaching the sample TIFF file which I use to reproduce the issue, any help with this would be greatly appreciated!
Attachments
TestDoc.zip
(53.04 KiB) Downloaded 29 times

User avatar
Loïc
Site Admin
Posts: 5530
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: AccessViolationException occurred in GdPicture.NET.14.dll

Post by Loïc » Tue Aug 08, 2017 10:04 pm

Hi,

I can not reproduce the problem. Could you cross check you are on the latest build?

Kind regards,

Loïc

fervelas
Posts: 6
Joined: Tue Aug 08, 2017 5:09 am

Re: AccessViolationException occurred in GdPicture.NET.14.dll

Post by fervelas » Wed Aug 09, 2017 7:31 pm

Hello Loïc,

I didn't realize that v14.0.0.15 came up about 5 days ago, I was working with 14.0.0.12 but now that I upgraded to the latest build the problem has been solved.

I do have another observation though:

I applied the Remove Punch Holes cleanup method to the attached sample in my OP, but no cleanup was done in the left margin of the page; instead, the cleanup cut off a couple of letters from the top logo of the invoice, misidentifying them as punch holes while leaving the more obvious ones on the left margin.

Any thoughts on how I might improve the cleanup process so the left margin punch holes can be automatically cleaned to some extent?

sinand
Posts: 1
Joined: Fri Aug 25, 2017 1:50 pm

Re: AccessViolationException occurred in GdPicture.NET.14.dll

Post by sinand » Thu Nov 16, 2017 8:29 am

Hello,
I am usinng GDPicture 14.0.0.24 and i build on x86 platform. When I run multi threaded for image process, i am getting an error at "OCRTesseractGetOrientation" row. How can i resolve this problem.

Error:
"System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in GdPicture.NET.14.dll"

Code part:

Code: Select all

Parallel.ForEach(taramaList, new ParallelOptions { MaxDegreeOfParallelism = ICTHelper.Program.config.FileTransferThreadSayisi },
                              tarama =>
                              {
                                  using (GdPictureImaging gdPictureImaging = new GdPictureImaging())
                                  {
                                      iImageProcess.start(tarama, gdPictureImaging);
                                  }
                                  if (ICTHelper.Program.config.BosSayfaSilmeResimDuzeltmeIslemleriYapilacakMi)
                                      if (File.Exists(tarama.Klasor + tarama.Resim))
                                      {
                                          string dosyaYolu = tarama.Klasor + tarama.Resim;
                                          int resimId = Globals.gdPictureImaging.CreateGdPictureImageFromFile(dosyaYolu);
                                          try
                                          {
                                              TiffCompression _TiffCompression = Globals.gdPictureImaging.GetTiffCompression(resimId);
                                              Globals.gdPictureImaging.AutoDeskew(resimId);
                                              Globals.gdPictureImaging.DeleteBlackBorders(resimId, 10, false);
                                              Globals.gdPictureImaging.RemoveHolePunch(resimId);
                                              int pageRotation = Globals.gdPictureImaging.OCRTesseractGetOrientation(resimId, "tur", OCR_PATH, 2);
                                              if (pageRotation != 0)
                                              {
                                                  switch (pageRotation)
                                                  {
                                                      case 90:
                                                          Globals.gdPictureImaging.Rotate(resimId, RotateFlipType.Rotate270FlipNone);
                                                          break;
                                                      case 180:
                                                          Globals.gdPictureImaging.Rotate(resimId, RotateFlipType.Rotate180FlipNone);
                                                          break;
                                                      case 270:
                                                          Globals.gdPictureImaging.Rotate(resimId, RotateFlipType.Rotate90FlipNone);
                                                          break;
                                                  }
                                              }
                                              if (Globals.gdPictureImaging.IsBlank(resimId))
                                              {
                                                  tarama.BlankPage = true;
                                              }
                                              var status = Globals.gdPictureImaging.SaveAsTIFF(resimId, dosyaYolu, _TiffCompression);
                                              if (status != GdPictureStatus.OK)
                                              {
                                                  Logger.Log("Tiff kayıt sırasında hata oluştu!");
                                              }
                                          }
                                          catch (Exception ex)
                                          {
                                              Logger.Error(ex.Message, ex);
                                          }
                                          finally
                                          {
                                              Globals.gdPictureImaging.ReleaseGdPictureImage(resimId);
                                          }
                                      }
                                  
                              });

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests