Issue 71439 - com.sun.star.scanner.ScannerManager makes OOo to hang up from a BeanShell script
Summary: com.sun.star.scanner.ScannerManager makes OOo to hang up from a BeanShell script
Status: UNCONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-11 00:01 UTC by jmarton
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

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


Attachments
the referenced script that makes OOo to hang up deterministic upon ScannerManager.startScan(...) call (4.42 KB, application/x-bsh)
2006-11-11 00:04 UTC, jmarton
no flags Details
Java program trying to utilize the scanner API (4.32 KB, application/x-java)
2007-01-16 18:44 UTC, jmarton
no flags Details
new ScannerTest Java program (5.03 KB, text/plain)
2010-08-01 18:35 UTC, jmarton
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jmarton 2006-11-11 00:01:40 UTC
I'm facing some serious problems when trying to use the ScannerManager
service from a BeanShell script (inside OOo Draw). Maybe a reproducible deadlock
situation.

OOo version: stable, 2.0.4 (english version OOo, WinXP Prof SP2 Hun)
OOo SDK: stable, 2.0.4

I have a Logitech QuickCam Sphere webcam (driver version 9.5). As I
acquire an image from Insert/Picture/Scan/Request, the image is taken
and inserted into the drawing.

As I try to achieve the same result from a BeanShell script (attached), OOo
hangs up upon ScannerManager.startScan(...) call. Details follows:

What I want is to replace an image object (having name prefix of
"photofield_") in my OOo draw document in script-runtime.

The script I wrote is attached, but it does not work.

As I open a draw that have an image object named like "photofield_" and
try to run the script, I can select the source
(xScannerManager.configureScanner(...)). After the selection is made,
the startScan(...) call makes OOo to hang up.

It can be killed using the task manager, but after restarting OOo (but
not the OS), the menu-path (Insert/Picture/Scan/Request) also does not work.

Upgrading the Logitech webcam driver to v10 did not solve the problem. The same
behavior holds using a Canyon CNCAM21 webcam.
Comment 1 jmarton 2006-11-11 00:04:57 UTC
Created attachment 40508 [details]
the referenced script that makes OOo to hang up deterministic upon ScannerManager.startScan(...) call
Comment 2 jsc 2006-11-14 12:34:09 UTC
jsc -> ka: cl told me that you are the expert for the scanner API, i assume a
threading problem in the context of the beanshell ...
Comment 3 jmarton 2007-01-16 18:44:46 UTC
Created attachment 42202 [details]
Java program trying to utilize the scanner API
Comment 4 jmarton 2007-01-16 18:49:47 UTC
The attached PatronCard.java produces the same effect as the previously
submitted BeanShell script: makes OOo to hang up at the startScan call.

Additionally, when I try to wait for the scan to finish with the
o.wait() call at line 127, IllegalMonitorStateException is thrown.

It seems for me that the scanning thread dies (the scanner GUI disappears) and
the provided disposing method never gets called.

stack trace as follows:

java.lang.IllegalMonitorStateException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at hu.bute.vzqixx.PatronCard.PatronCard.main(PatronCard.java:127)


Comment 5 ooo 2009-07-24 13:33:15 UTC
ka->jmarton: can you still reproduce this behavior with a current release of
OOo? Please reassign to me, if you still can.
Comment 6 Mechtilde 2009-08-02 14:08:03 UTC
worksfor me -< closed
Comment 7 jmarton 2010-08-01 18:35:53 UTC
Created attachment 70913 [details]
new ScannerTest Java program
Comment 8 jmarton 2010-08-01 18:41:25 UTC
jmarton->ka: the problem still persist using OpenOffice.org 3.2.1 (OOO320m19,
Build: 9505).

I've attached a somewhat polished ScannerTest.java source to this issue which
supersedes previous test programs.

The scanner (webcam) GUI pops up upon the startScan call, but it disappears and
XEventListener.disposing() never gets called, so o.wait() never returns.

after killing the ScannerTest process, soffice.bin need also to be killed
through process explorer as it seems to hang up.
Comment 9 Marcus 2017-05-20 11:27:34 UTC
Reset assigne to the default "issues@openoffice.apache.org".