Tattakashi123 / t

Automatically exported from code.google.com/p/twaindotnet
0 stars 0 forks source link

I have error: Out of memory (-4500) #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Windows XP Pro (3,5 Gb RAM) run scan 17 sheets in scanner with ADF.
2. At 15 or 16 page pops up an error: Out of memory (-4500)

What version of the product are you using? On what operating system?
TwainDotNet 1.0 at 12-03-2011
Windows XP Pro x86

Please provide any additional information below.
Start scanning code:
try
{
 if (SourceUserSelected.IsChecked == true)
 {
  _twain.SelectSource(ManualSource.SelectedItem.ToString());
 }
 _twain.StartScanning(_settings);
}
catch (TwainException ex)
{
 MessageBox.Show(ex.Message, "Scanner error"); <-- The error occurs here
}

Processing of scanned page:
_twain = new Twain(new WpfWindowMessageHook(this));
_twain.TransferImage += delegate(Object sender, TransferImageEventArgs args)
{
 if (args.Image != null)
 {
  //Resize scanned image to A4
  Bitmap image = Functions.ResizeToPdfA4(args.Image);
  ScannedPage scannedPage = new ScannedPage(image);
  _pages.Add(scannedPage);
 }
};

At each stage of the procedure is performed - GC.Collect();

Original issue reported on code.google.com by kvinoku...@gmail.com on 15 Mar 2012 at 8:35

GoogleCodeExporter commented 8 years ago
On Windows 7 EE x86/x64 with 4Gb RAM everything is fine.

Original comment by kvinoku...@gmail.com on 15 Mar 2012 at 8:45

GoogleCodeExporter commented 8 years ago
At the time the error occurred in the application memory is 1.2Gb.

Original comment by kvinoku...@gmail.com on 15 Mar 2012 at 8:46

GoogleCodeExporter commented 8 years ago
i am having the same issue, have u been able to rectify this.

Original comment by faisalmo...@gmail.com on 23 Apr 2012 at 6:46