[sane-devel] Re: TWAIN SANE Interface for Mac OS X version 0.3

Mattias Ellert mattias.ellert@tsl.uu.se
Fri, 09 Jan 2004 09:31:42 +0100

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Noah Daniels wrote:
> Hi,
> I'm still having the same problem with the plustek backend that several people have reported, even using this latest build of the various SANE packages.
> Basically, sane-find-scanner finds the scanner, but scanimage -L does not. However, if I set SANE_DEBUG_PLUSTEK to a high number, the scanner DOES start working, and scans a partial low-res image before hanging. I know this behavior has been reported before, by Henrik Rintala.
> I can provide a debug log if anyone's interested... I'd love to be able to get this working (printing to a Canoscan 650).
> thanks!
> --
> Noah Daniels

Using the latest version of libusb from CVS (or the binary packages from
2004-01-05) has been reported to fix the problem that scanimage -L does
not see the scanner unless the DEBUG environment is used.

The following gdb log of the state of scanimage at the time it freezes
after a scan was provided by a user having a Canon N670U scanner that
uses the Plustek backend on MacOS X.

To me it looks like the reader process has finished and is waiting to be
killed, but the main process is still trying to read from it.

Note that the patch in the bug report

has been applied here, in order to avoid calling pthread_cancel which is
broken on MacOS X.



mattias.ellert@tsl.uu.se                           tel: +46 18 471 32 58
http://www.tsl.uu.se/~ellert/                      fax: +46 18 471 35 13

Content-Type: text/plain;
Content-Disposition: inline;
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by smtp3.cern.ch id i098YBJm006043

(gdb) info threads
2 process 799 thread 0x1c43 0x90017048 in semaphore_wait_signal_trap ()
* 1 process 799 thread 0x307 0x9000ebc4 in read ()
(gdb) thread 1
[Switching to thread 1 (process 799 thread 0x307)]
#0 0x9000ebc4 in read ()
(gdb) backtrace
#0 0x9000ebc4 in read ()
#1 0x0021ab44 in sane_plustek_read (handle=3D0xdd000, data=3D0xbfff7820 "=
xN,~K$fO*qT)f=3D$SR\"gV,", '?' <repeats 51 times>, "?=CB=AB\215uM\\E,jF4\=
237~e", '?' <repeats 113 times>..., max_length=3D32768, length=3D0xbffff8=
60) at plustek.c:2071
#2 0x00004600 in scan_it () at scanimage.c:1142
#3 0x00006078 in main (argc=3D45792, argv=3D0xa000104c) at scanimage.c:19=
(gdb) thread 2
[Switching to thread 2 (process 799 thread 0x1c43)]
#0 0x90017048 in semaphore_wait_signal_trap ()
(gdb) backtrace
#0 0x90017048 in semaphore_wait_signal_trap ()
#1 0x9000e890 in _pthread_cond_wait ()
#2 0x0021d91c in local_thread (arg=3D0x25bd1c) at sanei_thread.c:221
#3 0x900247e8 in _pthread_body ()