Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Out of Memory error with Fujitsu Paperstream Driver version 1.40

There seems to be a major bug with Paperstream IP driver version 1.40 for Fujitsu autofeeder scanner.

A customer of us reports "Out of memory" errors when scanning with a Fujitsu fi-7160: Memory usage just grows and grows until Kronoscan reports an error and stops working.

We did not experience that problem so we did an investigation and found differences with our setup as well as a workaround:

On our test computer we use that version of the driver:
  •   Version:         1.21
  •   Language:        IntEnglish
  •   Country:         Usa
  •   Info:   Apr 15 2015
Our client had the newer version:
  •   Version:         1.40
  •   Language:        IntEnglish
  •   Country:         Usa
  •   Info:   Apr 26 2016
Note: We log this information in a file on your computer so we can do diagnostics.

We have a solution!

Just change the paper size. By default it is the "MaxSize (Scanner max size)" that is selected in the scan area. If you select any other paper size (like USLetter as shown in next picture) then you will not have the "Out of memory" error.

[Image: papersize.png]

We will report this problem to Fujitsu and hope they fix it in their next driver release. In the mean time, if you have problems with your scanner contact us and if you have a Fujitsu Paperstream Driver and experience the "Out of memory" error then select a Paper Size other than MaxSize.
Follow up:

Finally, selecting a paper size did not resolve the issue. It just make it appear later.
We did other tests with our client. What resolve the issue was a computer reboot.
Before the reboot scanning a single batch of 100 cards would consume 500MB and saving the cards would not free the memory. After the reboot he was able to scan batches of 100 cards with stable memory consumption, always under 100MB.  

Twain Drivers provides the maximum compatibility with scanners but once loaded in memory if they experience a problem they can keep a broken state until a reboot because they stay in memory even if you close the scanning application. This is problematic because these days Windows is so stable that we rarely reboot our computer.
Follow up:

Further tests with our client lead to mixed results: sometimes it would work and other times out of memory errors would show up.
The main problem we got is we were not able to reproduce the problem: we tested on 5 different computers and with different driver versions. To fix a problem we must be able to reproduce it.

However our client was willing to help us and he changed his scanner and tried different driver versions: it did not fix the problem… He even tried a brand new computer and got the same bad results…

Finally, even without being able to reproduce it we made some changes to the software code. There was one place where the image we get from the scanner was not explicitly released. Since we use “Microsoft .Net Framework” for our development some of the memory is garbage collected and freed by the framework as needed. It is possible that the framework have some variations and the client uses a different one that we do. So we sent a temporary release to our client. That release fixed his “Out of memory” error. His memory still grows but at a sustainable rate.

The temporary fix will be moved into the next release of Kronocard (0.9.30 available soon).
I you even experience “Out of memory” errors with our software please contact us: we will fix the problem.

A big thanks to Bruce for his patience and his help.