•  
  •  
  •  
 

Application freezes after Acquire()

Last post 15 Apr 2010, 7:37 AM by Glenn. 1 replies.
Sort Posts: Previous Next
  •  14 Apr 2010, 10:30 AM 20487

    Application freezes after Acquire()

    Hello,

    Our scanning application (using DotTwain 8.0) works fine on most of our workstations running XP Pro.
    However on some workstations the app freezes after the Acquire() method.
    The CPU utilization goes up to 50% (on a dual core CPU) and does not respond anymore.
    This problem arises with some of our Fujitsu fi-5120C scanners, but not on all of them.
    We have the latest Twain drivers installed (9.21.720.0).
    The workstations where the problems occur, work fine using the WIA interface.
    The last part of the tracelog shows this:

    Atalasoft.Twain: 10:16:39:89 - TwainController: SetCapabilityValue(CAP_FEEDERENABLED), State = SourceOpen
    Atalasoft.Twain: 10:16:39:89 - TwainController: AOV, capability = CAP_FEEDERENABLED
    Atalasoft.Twain: 10:16:39:89 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:89 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:89 - TwainController: AOV, item type = TWTY_BOOL
    Atalasoft.Twain: 10:16:39:89 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue(CAP_DUPLEXENABLED), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: AOV, capability = CAP_DUPLEXENABLED
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: AOV, item type = TWTY_BOOL
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue(ICAP_SUPPORTEDSIZES), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: AOV, capability = ICAP_SUPPORTEDSIZES
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: AOV, item type = TWTY_UINT16
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SetCapabilityValue(ICAP_UNITS), State = SourceOpen
    Atalasoft.Twain: 10:16:39:90 - TwainController: AOV, capability = ICAP_UNITS
    Atalasoft.Twain: 10:16:39:90 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: AOV, item type = TWTY_UINT16
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: SetCapabilityValue(ICAP_XRESOLUTION), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: AOV, capability = ICAP_XRESOLUTION
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: AOV, item type = TWTY_FIX32
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:92 - TwainController: SetCapabilityValue(ICAP_YRESOLUTION), State = SourceOpen
    Atalasoft.Twain: 10:16:39:92 - TwainController: AOV, capability = ICAP_YRESOLUTION
    Atalasoft.Twain: 10:16:39:92 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:93 - TwainController: AOV, item type = TWTY_FIX32
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:93 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:93 - TwainController: SetCapabilityValue(ICAP_PIXELTYPE), State = SourceOpen
    Atalasoft.Twain: 10:16:39:93 - TwainController: AOV, capability = ICAP_PIXELTYPE
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:93 - TwainController: AOV, item type = TWTY_UINT16
    Atalasoft.Twain: 10:16:39:93 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:95 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:95 - TwainController: SetCapabilityValue(CAP_INDICATORS), State = SourceOpen
    Atalasoft.Twain: 10:16:39:95 - TwainController: AOV, capability = CAP_INDICATORS
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:95 - TwainController: AOV, item type = TWTY_BOOL
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand(CapabilitySet), State = SourceOpen
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:95 - TwainController: SetCapabilityValue, CapabilitySet = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:95 - TwainController: GetCapabilityValue(CAP_FEEDERLOADED), State = SourceOpen
    Atalasoft.Twain: 10:16:39:95 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceOpen
    Atalasoft.Twain: 10:16:39:97 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:97 - TwainController: GetCapabilityValue, CapabilityGetCurrent = TWRC_SUCCESS
    Atalasoft.Twain: 10:16:39:97 - TwainController: RC, capability = CAP_FEEDERLOADED, container = TWON_ONEVALUE
    Atalasoft.Twain: 10:16:39:97 - Getting ONEVALUE data
    Atalasoft.Twain: 10:16:39:97 - TwainController: GetTwainObject, 2142194, TWTY_BOOL
    Atalasoft.Twain: 10:16:39:97 - TwainController: ConvertObjectType, True to System.Boolean
    Atalasoft.Twain: 10:16:39:97 - Types: System.Boolean, System.Boolean
    Atalasoft.Twain: 10:16:39:97 - TwainController: SendCommand(UserInterfaceEnableDS), State = SourceOpen
    -- FREEZE... --

    A log from a succesfull scan on another workstation looks exactly the same, but continues after the SendCommand(UserInterfaceEnableDS) line with the following lines:

    Atalasoft.Twain: 11:47:59:34 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 11:47:59:34 - TwainController: ProcessEvent = TWRC_DSEVENT
    Atalasoft.Twain: 11:47:59:34 - TwainController: InitiateDataTransfer
    Atalasoft.Twain: 11:47:59:34 - TwainController: GetCapabilityValue(ICAP_XFERMECH), State = SourceEnabled
    Atalasoft.Twain: 11:47:59:34 - TwainController: SendCommand(CapabilityGetCurrent), State = SourceEnabled
    Atalasoft.Twain: 11:47:59:34 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 11:47:59:34 - TwainController: GetCapabilityValue, CapabilityGetCurrent = TWRC_SUCCESS
    Atalasoft.Twain: 11:47:59:34 - TwainController: RC, capability = ICAP_XFERMECH, container = TWON_ONEVALUE
    Atalasoft.Twain: 11:47:59:34 - Getting ONEVALUE data
    Atalasoft.Twain: 11:47:59:34 - TwainController: GetTwainObject, 1989898, TWTY_UINT16
    Atalasoft.Twain: 11:47:59:34 - TwainController: ConvertObjectType, 0 to System.Int32
    Atalasoft.Twain: 11:47:59:34 - Types: System.UInt16, System.Int32
    Atalasoft.Twain: 11:47:59:34 - Converting UInt16...
    Atalasoft.Twain: 11:47:59:34 - TwainController: InitiateDataTransfer, ICAP_XFERMECH = 0
    Atalasoft.Twain: 11:47:59:34 - TwainController: InitiateDataTransfer, Starting Acquire Loop
    Atalasoft.Twain: 11:47:59:34 - TwainController: SendCommand(ImageInfoGet), State = ReadyToTransfer
    Atalasoft.Twain: 11:47:59:35 - TwainController: SendCommand = TWRC_SUCCESS
    Atalasoft.Twain: 11:47:59:35 - TwainController: ProcessNativeTransfer, Starting transfer...
    Atalasoft.Twain: 11:48:02:42 - TwainController: ProcessNativeTransfer, Native transfer result = TWRC_XFERDONE
    Atalasoft.Twain: 11:48:02:42 - TwainController: ProcessNativeTransfer, TwainDataTransfer = False
    Atalasoft.Twain: 11:48:02:42 - DibToBitmap: hMem = 57213220
    -- ETC ---

    In what direction should I look for further investigation?

    TIA.

    Filed under: , ,
  •  15 Apr 2010, 7:37 AM 20494 in reply to 20487

    Re: Application freezes after Acquire()

    Based on the log it looks like we are making a call into the driver and the driver never responds.  There isn't much that can be done about that, but here are a couple things to try:

    1. Change the value of Device.ModalAcquire.  Sometimes having ModalAcquire set to true will help, but if the same driver works on other systems it probably doesn't matter.

    2. Check if TWAIN 2.0 is installed on the system.  I have a Fujitsu and some early versions of TWAIN 2.0 would cause crashing and lockups.  Look for "Windows\System32\twaindsm.dll" on the system that does not work.  If it's there, either rename it and see if that solves the problem or install the latest version of TWAIN 2.0 from here.

View as RSS news feed in XML