Title: Installed NAPS2 crashes with TWAIN driver, while portable NAPS2 works with the same scanner/driver
Summary:
TWAIN scanning with my Neat scanner used to work in installed NAPS2, but it no longer does. Now, all tested installed versions of NAPS2 crash when attempting to use the TWAIN driver, while all tested portable versions of NAPS2 work with the same scanner and same driver on the same machine.
Environment:
Observed behavior:
- In installed NAPS2, attempting to scan with the TWAIN driver crashes
NAPS2.Worker.exe
- The UI then reports:
Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="failed to connect to all addresses")
Expected behavior:
- Installed NAPS2 should behave the same as portable NAPS2 and allow TWAIN scanning without crashing
What makes this notable:
- This setup used to work
- The TWAIN driver is installed and functional
- The same scanner and TWAIN driver work in portable NAPS2
- The same scanner and TWAIN driver also work in IrfanView
Event Viewer details:
- Faulting application name:
NAPS2.Worker.exe
- Exception code:
0xc0000005
- Faulting module name:
NAPS2.Worker.exe
Stack trace excerpt:
NTwain.Triplets.Dsm+NativeMethods.DsmWinNew(...)
NTwain.Triplets.Dsm.DsmEntry(...)
NTwain.Triplets.UserInterface.EnableDS(...)
NTwain.DataSource.Enable(...)
NAPS2.Scan.Internal.Twain.TwainScanRunner.Init()
Additional exception detail:
System.AccessViolationException
- Crash occurs during TWAIN
EnableDS
Reproduction steps:
- Install NAPS2
- Connect Neat scanner with TWAIN driver installed
- Create or select a TWAIN scan profile
- Start a scan
- Observe crash in installed version
Impact:
- Portable NAPS2 works, but installed NAPS2 does not
Title: Installed NAPS2 crashes with TWAIN driver, while portable NAPS2 works with the same scanner/driver
Summary:
TWAIN scanning with my Neat scanner used to work in installed NAPS2, but it no longer does. Now, all tested installed versions of NAPS2 crash when attempting to use the TWAIN driver, while all tested portable versions of NAPS2 work with the same scanner and same driver on the same machine.
Environment:
OS: Windows 10 22H2
Scanner: Neat ADF scanner
Driver type: TWAIN
NAPS2:
Architectures tested for installed versions:
Observed behavior:
NAPS2.Worker.exeGrpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="failed to connect to all addresses")Expected behavior:
What makes this notable:
Event Viewer details:
NAPS2.Worker.exe0xc0000005NAPS2.Worker.exeStack trace excerpt:
Additional exception detail:
System.AccessViolationExceptionEnableDSReproduction steps:
Impact: