Skip to content

It used to work but now crashes.. #804

@thethereza

Description

@thethereza

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:

    • Installed versions: crash
    • Portable versions: work
  • Architectures tested for installed versions:

    • x86
    • x64

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:

  1. Install NAPS2
  2. Connect Neat scanner with TWAIN driver installed
  3. Create or select a TWAIN scan profile
  4. Start a scan
  5. Observe crash in installed version

Impact:

  • Portable NAPS2 works, but installed NAPS2 does not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions