lj.so blob init error (or not?)

Bug #498023 reported by Krzysztof Kotlenga
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

cups 1.4.2
hpcups 3.9.12, "lj.so" in place
LaserJet m1120N MFP

Problem:
prnt/hpcups/ModeJbig.cpp:138:if (!HPLJSoInit || (HPLJSoInit && !HPLJSoInit (1)))

The above test succeeds -> ModeJbig::Init() returns PLUGIN_LIBRARY_MISSING -> printer doesn't work.
HPLJSoInit() returns 0. What value is it supposed to return? Because changing this logic a bit:

- if (!HPLJSoInit || (HPLJSoInit && !HPLJSoInit (1)))
+ if ((HPLJSoInit == NULL) || (HPLJSoInit (1) != 0))

surprisingly results in a working printer. Is the logic broken or HPLJSoInit() fails when it shouldn't?

Revision history for this message
Krzysztof Kotlenga (pocek) wrote :

Oops. I mean "lj.so", obviously.

description: updated
summary: - lp.so blob init error (or not?)
+ lj.so blob init error (or not?)
Revision history for this message
Krzysztof Kotlenga (pocek) wrote :

First, the hack above is obviously wrong.

It looks like HPLJSoInit() will check if DEVICE_URI environment variable (passed from cups) starts with 'hp:' and fail otherwise. It's very unfortunate, because cups will automatically detect and set up the cups-native 'socket' protocol. 'hp' protocol doesn't work for me for unknown reasons, so here's the new hack to make the socket protocol working:

Create a wrapper for /usr/lib/cups/filter/hpcups:

#!/bin/sh
export DEVICE_URI="hp:/whatever"
exec /usr/lib/cups/filter/hpcups.orig "$@"

(don't forget to mv hpcups hpcups.orig first)

And it will work! Hurray! Thank you HP for making my live hard.

Revision history for this message
Sanjay Kumar (sanjay-kumar14) wrote :

Marking it as invalid because the issue occurs on very old release.

Changed in hplip:
status: New → Invalid
Changed in hplip:
status: Invalid → New
Revision history for this message
Krzysztof Kotlenga (pocek) wrote :

Not really, last checked with hplip 3.12.2.

The fix would be to allow 'socket' protocol in "lj.so" or to remove that check entirely (even better - because I don't think "lj.so" has _ANY_ knowledge to decide whether given printer/protocol is supported or not, so it's most likely wrong half of the time, making hpcups filter exit with oh-so-informative error 48).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.