Issue 5697 - Twain Module Hangs
Summary: Twain Module Hangs
Status: CLOSED OBSOLETE
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC5
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: crash, oooqa
: 13407 15392 20679 24324 24836 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-06-10 16:50 UTC by mmweber
Modified: 2017-05-20 10:11 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mmweber 2002-06-10 16:50:44 UTC
When scanning directly into a document, the scanner's twain module hangs. This
does not happen with any other application. 

How to reproduce: 

1. Open new text document
2. Choose "Einfügen"->"Grafik"->"Scannen"->"Anfordern" 
   In English probably "insert"->"graphics"->"scan"->"request"
3. The scanner dialog opens, makes it's prescan and tries to start the real scan.
   Nothing happens then. 

Scanner is an Epson Perfection 1650. Scanning Software Epson Twain 5.
Comment 1 Rainer Bielefeld 2003-06-04 16:38:02 UTC
I tried with 1.0.3. german version WIN98SE, "ALDI-LIFETEC"- Printer.
Scan worked without problem, but now, when I wanted to do a second
scan, OOo hangs 
Comment 2 Rainer Bielefeld 2003-06-25 09:02:13 UTC
Any relation to issue 12126 ?
Comment 3 Rainer Bielefeld 2003-07-25 04:55:06 UTC
Hi reporter, 

Does this problem still exist in OOo 1.0.3?

If it does, please supply more detailled information (exact scanner
type, driver version ...)

If I will not see any further action as votes, attachments or
confirmations in this issue, I will have to close this issue
2003-08-31 as WFM.

CU

Rainer


Comment 4 mmweber 2003-07-25 11:48:36 UTC
I just tested it in 1.0.2. The Problem still exists. I gonna download
1.0.3 and test it.
Comment 5 stefan.baltzer 2003-07-25 13:33:57 UTC
The most interesting would be the findings in OOo1.1RC as this is the
version we currently work on. Please verify with the youngest version
you can access. Thx.
Comment 6 mmweber 2003-07-25 13:55:46 UTC
I tested it with 1.0.3.1 . These are the findings: 

- "Einfügen"->"Grafik"->"Scannen"->"Anfordern": Epson's Twain Module
opens as it should
- When you hit the scan button of the scanner interface nothing happens. 
- After closing the scanner interface, it isn't possible to reopen it
using: "Einfügen"->"Grafik"->"Scannen"->"Anfordern"

Another side effect: After done this, you can't scan, wether directly
from the epson scanner interface, nor any other program. The scanner
stays blocked. 

Once some open openoffice process crashed, some time after I had
closed oo and at once the scanner worked again. I don't remember the
exact name of the process, but it had to do something with twain. 

Perhaps this could be a hint: I got a dual athlon machine, perhaps
there's something in the twain code, that is not thread-safe?
Comment 7 mmweber 2003-07-25 14:24:52 UTC
Tests with oo 1.1rc1

1.1rc1 shows exactly the same behaviour as 1.0.3.1, except, that after
a scanning attempt, openoffice itself cannot be closed. The program
itself, as 1.0.3.1 does not crash.
Comment 8 mmweber 2003-07-25 14:26:29 UTC
It seems to be exactly the same problem as described in issue 12126 ?
Comment 9 dankegel 2003-07-26 23:57:15 UTC
Different enough from issue 12126 to possibly be a different
problem.

Marcel, can you disable one of your CPUs and see if the
problem goes away?  May at least test your dual-CPU theory.

Rainer, let's keep this one open.  I think it's serious.
Comment 10 Rainer Bielefeld 2003-09-05 15:14:23 UTC
Hi Dan,

ACK! I leave it opeen ane will look again  2003-12-31

Rainer
Comment 11 alex.thurgood 2003-09-12 14:45:13 UTC
Hi,

Linux Mandrake 9.1 OOo 1.1 RC1
Scanning works fine from XSane and Gimp with my HP OfficeJet G85
Multifunction scanner.

Tried Inserting an image into a Writer document from the scanner. 
OOo gives me access to the setup dialog where I can select the zone to
scan (no preview is available though), choose the ADF if I want and
set the scan resolution. THen when I want to scan the image, the
scanner starts, takes a long time to do anything, eventually scans the
image (it took more than 15 mins to scan a business card at 600 dpi),
and then when OOo comes to copying the image from memory into the
page, OOo freezes. No further interaction is possible. No keys combos
or mouse clicks work within the OOo window. A kill is necessary on the
process to release the program.

Since I'm on qa, I suppose I could confirm this problem and set the qa
flag. Since this is a functionality adn stability problem, I'm upping
the priority to P1, because it really ought to be fixed before GA. If
you don't agree with me, I'd like to know why.

I've also changed the platform representation to all.

It is also reported as being in Linux RC4 by Gerard Delafond, a Linux
developer.

Alex
Comment 12 stefan.baltzer 2003-09-12 15:48:10 UTC
SBA: Target set to OOo 2.0
Comment 13 utomo99 2003-09-15 07:58:50 UTC
Please somebody change it to 1.1 Rc4 theversion, and hope we can
consider this for 1.1.1. 
because Twain is used by many people. I think many people will facing
similiar problem before 2.0
Comment 14 stefan.baltzer 2003-09-22 15:08:02 UTC
SBA->JW: Please have a look. 

SBA->Marcel: Please try Dan's proposal (disable one of your CPUs) and
comment. Thx.

SBA->All: To me it looks like we should make a strict seperation by
platforms concerning the scanner/twain module issues. The findings
(and probably the core problems) of Windows and Linux are not the
same. Please keep this in mind and don't mix the findings on different
platforms. 

=> Please only report Windows findings in THIS issue.

SBA: Priority changed to P2, Version changed to 1.0.3 according to
Marcels findings. OS changed to WinME according to Rainers Findings
(Marcel did't tell his platform yet...) Reassigned to Jack.
Comment 15 jack.warchold 2003-09-23 15:28:59 UTC
*** Issue 15392 has been marked as a duplicate of this issue. ***
Comment 16 andreschnabel 2003-10-04 13:08:21 UTC
*** Issue 13407 has been marked as a duplicate of this issue. ***
Comment 17 mmweber 2003-10-06 11:45:25 UTC
Hi

I did not try yet to disable one of the two CPUs as I do not like
removing one of them. And changing the Windows 2000 Kernel to
uniprocessor has it's caveats, too. 

Some more information about my system: 

Dual AMD Athlon MP
Scanner Epson Perfection 1650

Windows 2000 Professional German SP4 with latest hotfixes
OOo 1.1 German (latest RC)
Latest Epson Twain 5 Module (5.54G)

I'm working with local administrator rights on windows 2000.

Interesting is also the following findings:

Using OOo on Linux (Debian SID with OOo 1.1 RC) and the built in OOo
scanner driver, I get the same issues. OOo hangs when scanning a
document. 

Actually I do not think that it is SMP Problem, as the same issue
happens on WinME, which does not support SMP. So it's not that the
code wouldn't be thread safe. I rather think, that the issue has
something to do with inserting the picture into the document (after
the scanning took place).

Here again reproducing the error:

- I create a new text document
- I choose "Einfügen -> Grafik -> Scannen -> Anfordern". The epson
twain module opens
- If you hit scan nothing happens (Even the dialogue "Scanning
picture" does not appear)
- If you close the twain module interface an try to do "Einfügen ->
Grafik -> Scannen -> Anfordern" again, nothing happens. 

Besides this, OOo works mor or less as expected even after the
scanning attempt. Except this: You cannot close OOo but you have to
kill it from the task manager. Is it possible that some hidden process
keeps running after the attempt that should be closed? I watched the
task managers process list, but I could not find anything.

Interesting is also this: Even after killing OOo, I am able to scan
from other applications via the Twain Module.

This issue can be reproduced several times in the way documented above. 

I will retry the same thing as soon the german final 1.1 Version of
OOo can be downloaded.
Comment 18 mmweber 2003-10-06 11:53:08 UTC
I changed the OS flag to Windows 2000
Comment 19 jack.warchold 2003-10-30 11:34:16 UTC
reassigend to ka.

Comment 20 utomo99 2003-11-05 09:03:30 UTC
*** Issue 20679 has been marked as a duplicate of this issue. ***
Comment 21 jack.warchold 2004-01-16 11:58:47 UTC
additional

i had two scanners attached but i could not choose one in the select source list 
because this dialog does not open before the first scan, after scanning and try 
to open the dialog again it opens. this behavior allways occurs after a fresh 
restart of OOo, so you could only scan with the last activ scanner. 
today i attached a new scanner and could not choose it because the dialog does 
not open, so i just clicked on the request button and OOo just quits without any 
error message.
Comment 22 ooo 2004-01-26 10:48:06 UTC
Taking a look...
Comment 23 ooo 2004-01-26 10:48:56 UTC
.
Comment 24 jack.warchold 2004-02-10 15:03:49 UTC
*** Issue 24836 has been marked as a duplicate of this issue. ***
Comment 25 jack.warchold 2004-02-10 15:06:02 UTC
*** Issue 24324 has been marked as a duplicate of this issue. ***
Comment 26 wolframgarten 2004-04-26 15:28:46 UTC
Set to new target "Office later".
Comment 27 dirkruijne 2006-11-04 20:47:39 UTC
L.S.,

Same problem with my twaincompatible scanner Brother DCP-110C in OpenOffice.org
2.04.
OS Windows 98 SE

Dirk
Comment 28 yuko 2008-12-18 08:49:53 UTC
I got the following issues and suggestion from our Japanese customer.

Tested machine: Windows
Scanner: CanoScan LiDE100, CanoScan LiDE200

Issue 1: When scanning the TWAIN driver (ScanGear made by Cannon), OOo freezes
after scanning.

Steps of Issue 1:
1. Install the scanner driver
2. Connect the scanner to the machine
3. Run OOo 3.0
4. Choose [File] > [New] > [Text Document]
5. Choose [Insert] > [Picture] > [Scan] > [Select Source] and select the scanner
6. Choose [Insert] > [Picture] > [Scan] > [Request]
   The scanner driver started.
7. Click the preview button of the scanner driver
   The preview image appeared.
8. Click [Scan] button
   The image was delivered to OOo.
9. Choose [Insert] > [Picture] > [Scan] > [Request]
   The scanner driver started.
10. Click [Scan] button
    The image was dellivered to OOo, but OOo freezed.
    At this point, the scanner driver already terminated.


Issue 2: When clicking the close button of the TWAIN driver, sometimes the
driver is not closed.

Steps of Issue 2:
1. Install the scanner driver
2. Connect the scanner to the machine
3. Run OOo 3.0
4. Choose [File] > [New] > [Text Document]
5. Choose [Insert] > [Picture] > [Scan] > [Select Source] and select the scanner
6. Choose [Insert] > [Picture] > [Scan] > [Request]
   The scanner driver started.
7. Click the close button of the scanner driver
   Sometimes the driver is not closed.


Possible cause of Issue 2 and suggestion:
OOo behavior does not seem to comply with the TWAIN specification.
According to the TWAIN specification, after the application starts the TWAIN driver,
the application must send MSG_PROCESSEVENT to the driver periodically.
However, OOo does not seem to send MSG_PROCESSEVENT to the driver.

Please see "DG_CONTROL/DAT_EVENT/MSG_PROCESSEVENT" on page 162 in "TWAIN
Specification Version 1.9a"
and the sample code on page 28-30 in "TWAIN Specification Version 1.9a".


We do not know the cause of Issue 1, but it might be fixed by the above
suggestion of Issue 2.
Could you investigate the suggestion and fix this issue, please?
Comment 29 rafaella.braconi 2009-01-07 09:40:49 UTC
Unfortunately, we don't have resources available to work on this issue. However,
if you provide a patch with the fix we will be integrating it. Thx!
Comment 30 naoyuki 2009-11-25 02:21:24 UTC
CCed: naoyuki
Comment 31 Rainer Bielefeld 2014-06-05 13:40:34 UTC
WIN 2000 no longer supported.
Latest Version form DUPs: WIN XP, no longer supported by MS

Please feel free to open a new issue report if the problem appears with a current AOO version and a not outdated OS.