Opened 7 years ago

Last modified 3 years ago

#13644 new bug

Canon multifunction printer - Scan freezes

Reported by: vidrep Owned by: phoudoin
Priority: normal Milestone: Unscheduled
Component: Printing Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #13495
Platform: All

Description

hrev51328 x86_64

Canon MP620 Series Multifunction printer

Scanning a page with Sanity front end freezes at about 90% and stays in a loop

Attached screenshot1.png

Attached syslog

Attached listusb

Attachments (8)

screenshot1.png (776.5 KB ) - added by vidrep 7 years ago.
syslog (1.3 KB ) - added by vidrep 7 years ago.
listusb (2.6 KB ) - added by vidrep 7 years ago.
Sanity-1140-debug-07-08-2017-22-51-27.report (53.2 KB ) - added by vidrep 7 years ago.
Sanity_terminal.txt (7.6 KB ) - added by vidrep 6 years ago.
libusb_terminal.txt (524.3 KB ) - added by vidrep 6 years ago.
libusb_debug.txt (1.2 MB ) - added by vidrep 6 years ago.
Sanity-8853-debug-08-09-2021-19-17-10.report (41.4 KB ) - added by vidrep 3 years ago.

Change History (27)

by vidrep, 7 years ago

Attachment: screenshot1.png added

comment:1 by vidrep, 7 years ago

patch: 01

by vidrep, 7 years ago

Attachment: syslog added

by vidrep, 7 years ago

Attachment: listusb added

comment:2 by vidrep, 7 years ago

Below is typical output running sane_backend from the CLI:

Welcome to the Haiku shell.

~> scanimage --list-devices device `pixma:04A9172F_164654' is a CANON Canon PIXMA MP620 multi-function peripheral

~> scanimage --format=tiff --verbose --progress > test.tiff

scanimage: scanning image of size 638x877 pixels at 24 bits/pixel

scanimage: acquiring RGB frame

Progress: 93.4%

comment:3 by diver, 7 years ago

This is probably a bug in libusb?

comment:4 by pulkomandy, 7 years ago

libusb does not do much but forward things to Haiku's USB driver. So it's quite possibly on our side as well.

comment:5 by vidrep, 7 years ago

I was able to attach the debugger to Sanity and debug all but one thread. I have attached the report.

comment:6 by pulkomandy, 7 years ago

patch: 10

comment:7 by vidrep, 6 years ago

Tested hrev52212 x86_64 using usb_raw driver built from source patchset on Gerrit https://review.haiku-os.org/#/c/haiku/+/453/ and running Sanity from terminal.

With usb_raw driver blacklisted, and custom driver loaded per syslog: KERN: loaded driver /boot/system/non-packaged/add-ons/kernel/drivers/dev/bus/usb_raw

Canon multifunction detects scanner, and now produces a full scan of the document. It no longer sticks at 93.4% complete. However, after completing the scan, it gets stuck in a loop, and the "save as" button is never activated. The scanned document CAN be saved from the File->Save as... drop down menu. The printer LCD readout indicates "scanning..." in a perpetual loop. The saved document appears to be complete.

This is a positive step forward, but not a complete fix of the issue.

Sanity_terminal.txt attached

by vidrep, 6 years ago

Attachment: Sanity_terminal.txt added

comment:8 by vidrep, 6 years ago

Running scanimage from terminal results in the same as before, so maybe not better...

Welcome to the Haiku shell.

~> scanimage --list-devices device `pixma:04A9172F_164654' is a CANON Canon PIXMA MP620 multi-function peripheral ~> scanimage --format=tiff --verbose --progress > test.tiff scanimage: scanning image of size 638x877 pixels at 24 bits/pixel scanimage: acquiring RGB frame Progress: 93.4%

comment:9 by pulkomandy, 6 years ago

Now I'm confused. The driver changes are only a first step. The new ioctl is not used by anything, so at this point is is just dead code and shouldn't change anything to the result. Only when this get merged, and then I update libusb to use it, we will have visible results from this change.

As I mentionned on IRC, running LIBUSB_DEBUG=9 someCommand will get us libusb debug logs in the terminal. This may provide some hints as to what goes wrong.

comment:10 by vidrep, 6 years ago

The confusion was mine...

comment:11 by vidrep, 6 years ago

I've attached a pair of logs using libusb built from latest souce in haikuports, and running the following commands:

LIBUSB_DEBUG=9 Sanity (selecting all of the visible output in the terminal and pasting to a text file)

LIBUSB_DEBUG=9 Sanity > libusb.txt 2>&1

libusb_terminal.txt for the first instance

libusb_debug.txt for the redirected instance

by vidrep, 6 years ago

Attachment: libusb_terminal.txt added

by vidrep, 6 years ago

Attachment: libusb_debug.txt added

comment:12 by vidrep, 6 years ago

In listusb_terminal.txt "Option #1 - Option #17 load very quickly, then the process stalls for a while before Option #18 - Option #25 complete loading. Only after that is it possible to start the scan, which then freezes at about 95% complete.

Version 0, edited 6 years ago by vidrep (next)

comment:13 by vidrep, 5 years ago

I believe this is a duplicate ticket of: https://dev.haiku-os.org/ticket/13495

comment:14 by pulkomandy, 5 years ago

Blocking: 13495 added

comment:15 by vidrep, 5 years ago

Tested with latest sane_backends 1.0.27-5 (currently a push request in HaikuPorts).

The Canon scanner only exhibits the described issues when connected over USB. Network scanning is working without issues. The revised sane_backends 1.0.27-5 now has PNG support compiled in. I was able to scan to all supported formats (PNG, TIFF, JPEG, PNM) without issue over a network connection.

comment:16 by cocobean, 4 years ago

Submitted sane_backends-1.0.29 in Haikuports.

comment:17 by cocobean, 3 years ago

@vidrep - Is this fixed now in current nightly (>=hrev55102)?

comment:18 by vidrep, 3 years ago

Not fixed yet.

comment:19 by vidrep, 3 years ago

Tested with hrev55399 x86_64 on both USB 2.0 and USB 3.0 ports. Device detection is very slow, and will crash when trying to scan. Debug report attached.

Note: See TracTickets for help on using tickets.