Menu

#720 Bug accessing SANE (Linux) scanner driver

6.X
open
nobody
None
6.1.2.25879
Bug Fix
Medium
N/A
2020-06-24
2020-02-16
No

Apparent bug accessing the SANE driver.
This is what is says:

NAPS2.Scan.Exceptions.ScanDriverUnknownException: An error occurred with the scanning driver. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at NAPS2.Scan.Sane.SaneOptionParser.Parse (System.IO.StreamReader streamReader) [0x000bb] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at NAPS2.Scan.Sane.SaneWrapper.GetOptions (System.String deviceId) [0x00021] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at NAPS2.Scan.Sane.SaneScanDriver+<>c__DisplayClass13_0.<GetOptions>b__0 () [0x0001b] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at NAPS2.Util.CollectionExtensions.GetOrSet[TKey,TValue] (System.Collections.Generic.Dictionary`2[TKey,TValue] dict, TKey key, System.Func`1[TResult] defaultValue) [0x00009] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at NAPS2.Scan.Sane.SaneScanDriver.GetOptions () [0x0001e] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at System.Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode) [0x00049] in <d0e12f672b88444ab4b6d9b2ecf20142>:0 
  at System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication, System.Boolean useDefaultConstructor) [0x00030] in <d0e12f672b88444ab4b6d9b2ecf20142>:0 
  at System.Lazy`1[T].CreateValue () [0x0008c] in <d0e12f672b88444ab4b6d9b2ecf20142>:0 
  at System.Lazy`1[T].get_Value () [0x00018] in <d0e12f672b88444ab4b6d9b2ecf20142>:0 
  at NAPS2.Scan.Sane.SaneScanDriver+<>c__DisplayClass14_1.<Transfer>b__1 () [0x00025] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at NAPS2.WinForms.FScanProgress+<<FScanProgress_Shown>b__32_0>d.MoveNext () [0x00023] in <30917c5e8a264d469b3bab5ea75463d7>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00042] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at NAPS2.Scan.ScanDriverBase+<>c__DisplayClass30_0+<<Scan>b__0>d.MoveNext () [0x00073] in <30917c5e8a264d469b3bab5ea75463d7>:0 
   --- End of inner exception stack trace ---
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00042] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at Microsoft.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <1c7d529d87ec4bdcbde02e9494f3b5ae>:0 
  at NAPS2.Scan.ScanPerformer+<PerformScan>d__7.MoveNext () [0x00483] in <30917c5e8a264d469b3bab5ea75463d7>:0 

These are my system specs:
Scanner: Brother MFC-9142CDN network attached
mono: 5.18.0.240
* sane-utils and libsane: 1.0.27-3.2ubuntu3

I could successfully create a profile using the SANE driver and select my scanner.
Scanning using the SANE driver from another application (e.g. skanlite, gscan2pdf) works fine.

Discussion

  • Anonymous

    Anonymous - 2020-02-16

    OS is Kubuntu 19.10

     
  • Maarten Boekhold

    Post awaiting moderation.
  • Maarten Boekhold

    I've been trying to set up a development environment so I can add some debugging to see what's going on here. Problem is, I only have a Linux workstation, and I can't get the source to compile due to package dependency issues.

    I don't suppose anyone has ever tried to compile NAPS2 on Linux with Mono? C# as a language looks pretty easy to me, but C# as an ecosystem/build system is completely foreign to me and it would probably take me a lot of time/effort to get up to speed on that.

     

Log in to post a comment.