Misleading "Media tray empty!" message when imagetops crashes #660

Closed
michaelrsweet opened this Issue Mar 28, 2004 · 5 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Mar 28, 2004

Version: 1.1.20
CUPS.org User: craig.lawson.alum.mit

After an hour of frustration trying to appease the God of Media Trays, because the CUPS web printer status page claimed the media tray was empty, I discovered this in my cups error log:

I [27/Mar/2004:23:30:08 -0800] Started filter /usr/lib/cups/filter/imagetops (PID 2049) for job 120.
...
W [27/Mar/2004:23:30:08 -0800] [Job 120] Media tray empty!
E [27/Mar/2004:23:30:13 -0800] PID 2049 crashed on signal 6!

Trying to view the document, a PNG image, on my monitor resulted in some garbage and then a Gnome applet crash. The file was corrupt.

Yet the media tray was not empty, despite my many attempts to refill it, restart the printer, unplug the USB, restart CUPS and reboot my OS.

After regenerating the file so it viewed correctly on my monitor, cups printed the file without complaint and the "Media tray empty" message vanished from the web status page.

So the bug is: the wrong message is being displayed.

Versions:
cups 1.1.20
hpijs 1.1.4
Linux kernel 2.4.22 SMP (Gentoo)

Collaborator

michaelrsweet commented Mar 29, 2004

CUPS.org User: mike

Bump your log level to "debug" to see what the USB status bits are from the backend. 1.1.20 changed the USB backend to use the correct status bits for the standard Linux kernel drivers, and it sounds like perhaps your kernel is not reporting correctly (or the printer doesn't support them...)

Signal 6 is the "abort" signal; this means that abort() was called or the OS killed the process for some reason. Please attach the file that failed to print for us to fix the failure (so you get an error message instead... :)

Collaborator

michaelrsweet commented Mar 29, 2004

CUPS.org User: craig.lawson.alum.mit

Concerning the USB bits, I found this in the log:

D [27/Mar/2004:23:40:06 -0800] [Job 122] Printer using device file "/dev/usb/lp0"...
D [27/Mar/2004:23:40:06 -0800] [Job 122] LPGETSTATUS returned a port status of 18...
W [27/Mar/2004:23:40:06 -0800] [Job 122] Media tray empty!

Funny thing is, the only time the "Media tray empty" message appeared is when I was trying to print a corrupt file. At other times, nothing had changed with the printer. Is there some reason LPGETSTATUS would return a different code because of the input file? Maybe a race condition?

Collaborator

michaelrsweet commented Mar 29, 2004

CUPS.org User: craig.lawson.alum.mit

Concerning the corrupt file, I don't have it anymore. I deleted the offensive thing!

Next time I won't.

At least you know the signal number and where it came from.

Collaborator

michaelrsweet commented Mar 30, 2004

CUPS.org User: mike

Change line 250 of backend/usb.c to read:

if (status & LP_POUTPA)

to fix the "media tray empty" warning message.

If you get another PNG file that crashes the image filter, please submit a new STR with the file attached.

Thanks!

Collaborator

michaelrsweet commented Mar 30, 2004

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment