Hi, On Thu, Sep 06, 2001 at 12:34:19PM +0200, mh wrote: > when I try to scan over saned (localhost) using the net/plustek backend, the > frontend crashes with a bt like this: > > Program received signal SIGPIPE, Broken pipe. > 0x403f7004 in write () from /lib/libc.so.6 > (gdb) bt > #0 0x403f7004 in write () from /lib/libc.so.6 > #1 0x404a6408 in __DTOR_END__ () from /usr/local/lib/sane/libsane-net.so.1 > #2 0x404a45ca in flush (w=0x810f164) at sanei_wire.c:345 > #3 0x404a4614 in sanei_w_set_dir () at sanei_wire.c:345 > #4 0x404a468b in sanei_w_call () at sanei_wire.c:345 > ...
Can you provide some more lines of backtrace so we can see what sane-net is trying to achieve here? What's in line 345? Is this a modified sanei_wire.c? I'm asking because flush() starts in line 390 in the code I have. Also I don't understand #2 -> #1 -> #0 , because I don't see where write () would be involved in flush (). > static SANE_Status > do_cancel (Net_Scanner * s) > { > sleep(3); /* <--- add this line */ > s->hw->auth_active = 0; > if (s->data >= 0) > { > close (s->data); > s->data = -1; > } > return SANE_STATUS_CANCELLED; > } > > then everything seems to work fine. The scanner returns to the start position, > the whole stuff freezes for 3 seconds, but i don't get a SIGPIPE. Just a quick guess: Some sort of race between the final sane_cancel and sane_read which leads to closing the data connection before sane_read has finished? I don't know if something like that is possible. Does this also happen if you use saned in debug mode and are there any errors/warnings from saned or the plustek backend (with SANE_DEBUG_PLUSTEK=255)? Bye, Henning