Open sean-neeley opened 1 month ago
From the DTWAIN logs, it seems to be that the scanner's driver did not fill in the information about the strip that is to be transferred to DTWAIN when acquiring in buffered mode.
Starting at line 515780 of the DTWAIN log, that is where DTWAIN sets up the TW_IMAGEMEMXFER structure. This structure is then sent to the TWAIN driver to fill in with the information on the next strip. The returned value from the scanner starts at line 515838. Note that values you see there are the original ones DTWAIN set up, meaning the scanner failed to rewrite those values with sensible ones. The scanner did return a failure code, but the reason for the failure is basically unknown, as all the previous calls using TW_IMAGEMEMXFER all pass with a success code.
For example, contrast this to what you see at line 514948 (the input set up by DTWAIN), with the follow-up data returned by the scanner on line 515006 (the output sent by the scanner). The values returned by the scanner are reasonable.
The application shouldn't crash, but report a failure and stop the buffered transfer. I will see what DTWAIN does in event of a failed TW_IMAGEMEMXFER / MSG_GET operation, but as far as to why the scanner failed, I really don't have an explanation of what the issue would be.
If you acquired the image using native mode, is there still an issue?
Also, if you set DTWAIN_SetMaxRetryAttempts to 0, possibly the application won't crash, since there will be no retry of the failed page.
Also, you can trap the DTWAIN_TN_PAGEFAILED notification and return 0 for this notification so as to stop the processing of the page.
As always, we appreciate your suggestions. Will investigate and get back to you!
We have a customer using our scanning application we wrote in C# that uses the latest DTWAIN library. While acquiring images, sometimes there is an application crash. The scanner is an HP Scanjet Enterprise N6600 FNW1.
I'm not too familiar with how to read the DTWAIN logs. I was hoping you could look over the log we captured and see if anything stands out to you. Our own app log shows DTWAIN errors 1038, 1101, 1106, followed by 1005:
The end of the DTWAIN log shows:
Attached is the full log.
DTWAIN.log
Thank you!