Re: SIGSEGV when trying to print through CUPS



On Friday 12 September 2003 20:27, Andris Pavenis wrote:
> On Friday 12 September 2003 20:04, Andris Pavenis wrote:
> > Several libgnomeprintui test examples crashes under Linux when the
> > default printer is accessed using CUPS (I have setup CUPS to print to
> > shared windows printer on other computer). The same things happens also
> > in my own program.
> >
> > I have verified that it happens in call gnome_print_job_print().
> > There is no similar problems when:
> > 1) printing to file in both Postscript and PDF formats
> > 2) printing to the same printer using lpr (generic postscript + lpr)
> >
> > libgnomeprintui examples (eg. example[23]) behaves in the same way
> > (same traceback) but I haven't studied more detailed. example1 seems to
> > work.
> >
> > System: Pentium III, Slackware-current, GCC-3.3.1, ...
>
> forgot to mention: libgnomeprint-2.3.1, libgnomeprintui-2.3.1,
Now  libgnomeprint-2.4.0, libgnomeprintui-2.4.0

Found a workaround for this problem: 
after linking application with libcups.so it no more crashes. Here is output
from ldd:

bash-2.05b$ ldd /usr/lib/libgnomeprint-2-2.so.0.1.0
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x40457000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x4046e000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x404a1000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x404d6000)
        libdl.so.2 => /lib/libdl.so.2 (0x404da000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x404dd000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x40548000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40642000)
        libm.so.6 => /lib/libm.so.6 (0x40693000)
        libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0x406b6000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406dd000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40741000)
        libc.so.6 => /lib/libc.so.6 (0x4074f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40885000)

bash-2.05b$ ldd /usr/lib/libgnomeprint/2.4.0/modules/libgnomeprintcups.so
        libcups.so.2 => /usr/lib/libcups.so.2 (0x4001b000)
        libssl.so.0 => /usr/lib/libssl.so.0 (0x40037000)
        libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40068000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40166000)
        libgnomeprint-2-2.so.0 => /usr/lib/libgnomeprint-2-2.so.0 (0x4017b000)
        libc.so.6 => /lib/libc.so.6 (0x405bb000)
        libdl.so.2 => /lib/libdl.so.2 (0x406f1000)
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x406f5000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x4070c000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x4073f000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x40774000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x40778000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x407e2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x408dd000)
        libm.so.6 => /lib/libm.so.6 (0x4092e000)
        libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0x40951000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40978000)
        libz.so.1 => /usr/lib/libz.so.1 (0x409dc000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x409ea000)

As it is visible ldd /usr/lib/libgnomeprint/2.4.0/modules/libgnomeprintcups.so
is linked with libcups.so, but it seems to be not sufficient and unresolved 
references are not resolved when loading it. As result I'm getting SIGSEGV

I think the references should be resolved at runtime also without explicitly 
linking application with libcups.so, but it doesn't happen. I don't know, 
why.

Andris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]