System.AccessViolationException
When i try to _session.Open(); then catch System.AccessViolationException в NTwain.Triplets.Dsm.NativeMethods.DsmWinNew(TWIdentity origin, TWIdentity destination, DataGroups dg, DataArgumentType dat, Message msg, IntPtr& data) в NTwain.Triplets.Dsm.DsmEntry(TWIdentity origin, TWIdentity destination, DataGroups dg, DataArgumentType dat, Message msg, IntPtr& data) в c:\Users\Eugene\Desktop\Code\NTwain\src\NTwain\Triplets\Dsm.cs:строка 30
Comments (6)
-
repo owner -
reporter Are you testing the sample apps or your own app? own Winform or wpf? wpf 32bit or 64bit? Anycpu, debug on x86 Using a reasonably updated twaindsm.dll? non updated. Can you get link on dll,then you used? Running in debug or release mode with debugger attached? Debug, yeap Sometimes release mode with debugger can have access violation exception that doesn't occur without debugger (i.e. works when running the exe directly). (((
-
repo owner I use the 2.3.0 version from http://sourceforge.net/projects/twain-dsm/. If using twaindsm doesn't work for you then you can try to use the old twain_32.dll by setting the following to false.
NTwain.PlatformInfo.Current.PreferNewDSM = false;
-
reporter put in output version 2.3.0. It did not help. (System.AccessViolationException). exception on 1 of 5-7 times
Put option.
NTwain.PlatformInfo.Current.PreferNewDSM = false;
The client does not respond
Could there be a problem (of System.AccessViolationException) in the parallel access to twain api from different domains (different instances of programs)?
-
repo owner There's no code limit in multiple app instances (from ntwain or twain dsm). The scanner driver may limit one open connection to it for obvious reasons but it shouldn't result in that exception.
-
Hi Eugene,
I've been getting the same issue and wondering if this ever got resolved. Working through the winforms sample with v2.3.0 twaindsm.dll, x86 on a 64bit machine in debug.
- Log in to comment
Would need more info. Are you testing the sample apps or your own app? Winform or wpf? 32bit or 64bit? Using a reasonably updated twaindsm.dll? Running in debug or release mode with debugger attached? Sometimes release mode with debugger can have access violation exception that doesn't occur without debugger (i.e. works when running the exe directly).