Hi all,

I cannot begin to describe how much I hate trying to debug cups
backend and filter issues. I've done it before, but its *alway* a
harrowing trip through the fires of hell.

>From the cups error_log I found this the crash was happening in
/usr/lib/cups/filter/hpcups. I then did the following:


* Installed the debug version of the hplip program, hplip-dbg, even
  though the hpcups binary comes from the printer-driver-hpcups
  package.

* Copied /usr/lib/cups/filter/hpcups to /usr/lib/cups/filter/hpcups.bin

* Created a shell script at /usr/lib/cups/filter/hpcups that captured
  its stdin (the print job) to a file, printed all the environment 
  variables to a file in /tmp usung "env > /tmp/hplip-env.txt", captued
  the command line arguments to the same file and then exec-ed the
  hpcups.bin binary.

* Looking the output hplip-env.txt file I could see all the environment
  variables and command line parameters being passed the hplip.bin.
  Using that data I wrote a new shell script to set up then environment
  and run hplip.bin. Running that shell script as used 'lp' resulted in
  a segfault!

* I then added 'gdb --args ' in front previous command, ran it again.
  When it dropped me to the gdb prompt I ran it, it segfaulted again
  and I managed to capture the following backtrace.

#0  ModeJbig::compress (this=this@entry=0x80bbcc8, 
plane_number=plane_number@entry=0)
    at /usr/include/i386-linux-gnu/bits/string3.h:52
#1  0x08051068 in ModeJbig::processZJStream (this=this@entry=0x80bbcc8, 
input=input@entry=0x80bbcdc)
    at prnt/hpcups/ModeJbig.cpp:244
#2  0x0805110e in ModeJbig::Process (this=0x80bbcc8, input=0x80bbcdc) at 
prnt/hpcups/ModeJbig.cpp:208
#3  0x0805e6e2 in Process (raster=0x80bbcdc, this=0x80abd88) at 
prnt/hpcups/Pipeline.cpp:72
#4  Pipeline::Execute (this=0x80abd88, InputRaster=0x80bbcdc) at 
prnt/hpcups/Pipeline.cpp:79
#5  0x0805e739 in Pipeline::Execute (this=0x80b3820, InputRaster=0x80abae4) at 
prnt/hpcups/Pipeline.cpp:83
#6  0x0805e739 in Pipeline::Execute (this=0x80aacd0, InputRaster=0x80aba8c) at 
prnt/hpcups/Pipeline.cpp:83
#7  0x0804ca1f in HPCupsFilter::processRasterData (this=this@entry=0x80a5dc0, 
cups_raster=cups_raster@entry=0x80a9d40)
    at prnt/hpcups/HPCupsFilter.cpp:707
#8  0x0804d369 in HPCupsFilter::StartPrintJob (this=this@entry=0x80a5dc0, 
argc=argc@entry=7, 
    argv=argv@entry=0xbffff7c4) at prnt/hpcups/HPCupsFilter.cpp:544
#9  0x08049e6a in main (argc=7, argv=0xbffff7c4) at 
prnt/hpcups/HPCupsFilter.cpp:51

I'd love for someone to have a look at that, and I'm happy to
test any fixes or do more debugging.

Cheers,
Erik
-- 
Erik de Castro Lopo <er...@mega-nerd.com>


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to