SEGV on startup [with old ~/.sane/xsane]

Bug #37968 reported by Darren Warner
14
Affects Status Importance Assigned to Milestone
xsane
Fix Released
Unknown
xsane (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

xsane crashes shortly after displaying the 'searching for devices' dialog. My /etc/sane.d/net.conf has saned on a remote host.

I'm running xsane 0.97-4ubuntu6 on amd64.

Here's a GDB trace:

(xsane:7350): Gtk-CRITICAL **: gtk_accel_label_new: assertion `string != NULL' failed

(xsane:7350): Gtk-CRITICAL **: gtk_misc_set_alignment: assertion `GTK_IS_MISC (misc)' failed

(xsane:7350): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed

(xsane:7350): Gtk-CRITICAL **: gtk_accel_label_set_accel_widget: assertion `GTK_IS_ACCEL_LABEL (accel_label)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912552535360 (LWP 7350)]
0x00002aaaabcfde91 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) thread apply all bt

Thread 1 (Thread 46912552535360 (LWP 7350)):
#0 0x00002aaaabcfde91 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#1 0x00002aaaabc24dd5 in gtk_menu_item_new_with_label () from /usr/lib/libgtk-x11-2.0.so.0
#2 0x000000000041f979 in preview_create_preset_area_menu (p=0x82ec00, selection=0) at xsane-preview.c:4104
#3 0x0000000000427cfd in preview_new () at xsane-preview.c:4436
#4 0x000000000045f025 in xsane_device_dialog () at xsane.c:8255
#5 0x00000000004617e7 in xsane_interface (argc=1, argv=0x7fffffbffc58) at xsane.c:8901
#6 0x000000000046274a in main (argc=1, argv=0x7fffffbffc58) at xsane.c:9126

Revision history for this message
Barry deFreese (bddebian) wrote :

I am unable to reproduce this error with an up-to-date Dapper. Was this on a Dapper install? Could have been a transitional gtk issue? Thank you.

Changed in xsane:
status: Unconfirmed → Needs Info
Revision history for this message
Darren Warner (launchpad-dazwin) wrote :

I don't see my reply here (does replying to <email address hidden> work?). Anyways...

It still happens for me on Dapper (current as of 5/3/06). It does only happen if I'm using a remote host - if I remove this line, it doesn't crash (but then, I get no devices either!).

Revision history for this message
Sanjoy Mahajan (sanjoy) wrote :

I get the same assertion failures
and then segv, on a fresh 6.06 install. Here's what debian-bug reports about the package versions:

Package: xsane
Version: 0.97-4ubuntu6
Severity: normal

-- System Information:
Debian Release: testing/unstable
  APT prefers dapper-updates
  APT policy: (500, 'dapper-updates'), (500, 'dapper-security'), (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-25-386
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)

Versions of packages xsane depends on:
ii libatk1.0-0 1.11.4-0ubuntu1 The ATK accessibility toolkit
ii libc6 2.3.6-0ubuntu20 GNU C Library: Shared libraries an
ii libcairo2 1.0.4-0ubuntu1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.3.2-1.1ubuntu12 generic font configuration library
ii libgimp2.0 2.2.11-1ubuntu3.1 Libraries necessary to Run the GIM
ii libglib2.0-0 2.10.3-0ubuntu1 The GLib library of C routines
ii libgtk2.0-0 2.8.18-0ubuntu2 The GTK+ graphical user interface
ii libieee1284-3 0.2.10-1 cross-platform library for paralle
ii libjpeg62 6b-11 The Independent JPEG Group's JPEG
ii libpango1.0-0 1.12.3-0ubuntu1 Layout and rendering of internatio
ii libpng12-0 1.2.8rel-5 PNG library - runtime
ii libsane 1.0.17-1ubuntu4 API library for scanners
ii libtiff4 3.7.4-1ubuntu3.1 Tag Image File Format (TIFF) libra
ii libusb-0.1-4 2:0.1.10a-22ubuntu1 userspace USB programming library
ii libx11-6 2:1.0.0-0ubuntu9 X11 client-side library
ii libxcursor1 1.1.5.2-0ubuntu4 X cursor management library
ii libxext6 2:1.0.0-0ubuntu4 X11 miscellaneous extension librar
ii libxfixes3 1:3.0.1.2-0ubuntu3 X11 miscellaneous 'fixes' extensio
ii libxi6 2:1.0.0-0ubuntu3 X11 Input extension library
ii libxinerama1 2:1.0.1-0ubuntu2 X11 Xinerama extension library
ii libxrandr2 1:1.1.0.2-0ubuntu4 X11 RandR extension library
ii libxrender1 1:0.9.0.2-0ubuntu2 X Rendering Extension client libra
ii xsane-common 0.97-4ubuntu6 GTK+-based X11 frontend for SANE (
ii zlib1g 1:1.2.3-6ubuntu4 compression library - runtime

Versions of packages xsane recommends:
ii amaya [www- 8.5-1.3 Web Browser, HTML Editor and Testb
ii elinks [www 0.10.6-1ubuntu3 advanced text-mode WWW browser
ii firefox [ww 1.5.dfsg+1.5.0.4-0ubuntu6.06 lightweight web browser based on M
ii galeon [www 2.0.1-1ubuntu2 GNOME web browser for advanced use
ii links2 [www 2.1pre20-2 Web browser running in both graphi
ii lynx [www-b 2.8.5-2ubuntu1 Text-mode WWW Browser
ii w3-el-e21 [ 4.0pre.2001.10.27-19 Web browser for GNU Emacs 21
ii w3m [www-br 0.5.1-4ubuntu2 WWW browsable pager with excellent

-- no debconf information

Revision history for this message
Sanjoy Mahajan (sanjoy) wrote :

Sorry, the command line that produces the hang (all one line even if the web interface breaks the line):

xsane 'hpaio:/net/Photosmart_2700_series?ip=192.168.1.10'

Revision history for this message
Thurston (thurston-eml) wrote :

I get this same bug on my (shiny new) 6.06 install.

My scanner is on my SCSI bus and no driver was loaded for it during the install.
When I tried xsane it scanned for devices and then reported that it could not find any.

Following various bits of advice on the forums I have loaded the sg module and configured a new udev rule for it in a local rules file. The scanner works fine now and I can use "scanimage" (from sane-utils) to scan from it. However xsane now breaks with the seg fault described above: it starts scanning for devices, then crashes after a second or two.

How can we make progress on this? I see that various others have had success with the newer versions of xsane, but (a) I had all this working on Gentoo with xsane 0.97, and (b) the reason I switched to Ubuntu was to avoid hours and hours of compiling everything myself...

thanks T.

Revision history for this message
Thurston (thurston-eml) wrote :

Some more info: I see that just before it segfaults xsane writes the following files in /tmp/

-rw------- 1 toby toby 0 2006-09-07 10:48 xsane-preview-level-0-epson:_dev_sg0.ppm-1000-SzgqC9
-rw------- 1 toby toby 0 2006-09-07 10:48 xsane-preview-level-1-epson:_dev_sg0.ppm-1000-aSKFiM
-rw------- 1 toby toby 0 2006-09-07 10:48 xsane-preview-level-2-epson:_dev_sg0.ppm-1000-0atVYo

I hope this helps to pin point what's happening. Toby

Revision history for this message
Thurston (thurston-eml) wrote :

Some more information after running "valgrind -v xsane".

On my system "scanimage -L" gives:

    device `epson:/dev/sg0' is a Epson Perfection1200 flatbed scanner

Since xsane runs in "slow motion" under valgrind you can see in more detail what happens as it crashes...

1. xsane box "Scanning for devices" appears
2. same box disappears after a short while (so it found the scanner ok)
3. new box pops up with the title "Histogram Perfection1200" and some rainbox bars in the middle
4. xsane terminates with a segfault.

The trace from valgrind is attached (in a zip file).

In the file you get a whole lot of these errors
    Conditional jump or move depends on uninitialised value(s)

plus a bunch of others until you get to the segfault, which looks like this:

   (xsane:6220): Gtk-CRITICAL **: gtk_accel_label_new: assertion `string != NULL' failed

(xsane:6220): Gtk-CRITICAL **: gtk_misc_set_alignment: assertion `GTK_IS_MISC (misc)' failed

(xsane:6220): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed

(xsane:6220): Gtk-CRITICAL **: gtk_accel_label_set_accel_widget: assertion `GTK_IS_ACCEL_LABEL (accel_label)' failed
==6220==
==6220== Invalid read of size 1
==6220== at 0x43D4C91: gtk_widget_show (in /usr/lib/libgtk-x11-2.0.so.0.800.20)
==6220== by 0x42F7CB5: gtk_menu_item_new_with_label (in /usr/lib/libgtk-x11-2.0.so.0.800.20)
==6220== by 0x8066CF5: (within /usr/bin/xsane)
==6220== by 0x806FD52: (within /usr/bin/xsane)
==6220== by 0x80B12F5: (within /usr/bin/xsane)
==6220== by 0x80B425F: (within /usr/bin/xsane)
==6220== by 0x80B543A: (within /usr/bin/xsane)
==6220== by 0x4874EA1: __libc_start_main (in /lib/tls/i686/cmov/libc-2.3.6.so)
==6220== Address 0xD is not stack'd, malloc'd or (recently) free'd
==6220==
==6220== Process terminating with default action of signal 11 (SIGSEGV)
==6220== Access not within mapped region at address 0xD
==6220== at 0x43D4C91: gtk_widget_show (in /usr/lib/libgtk-x11-2.0.so.0.800.20)
==6220== by 0x42F7CB5: gtk_menu_item_new_with_label (in /usr/lib/libgtk-x11-2.0.so.0.800.20)
==6220== by 0x8066CF5: (within /usr/bin/xsane)
==6220== by 0x806FD52: (within /usr/bin/xsane)
==6220== by 0x80B12F5: (within /usr/bin/xsane)
==6220== by 0x80B425F: (within /usr/bin/xsane)
==6220== by 0x80B543A: (within /usr/bin/xsane)
==6220== by 0x4874EA1: __libc_start_main (in /lib/tls/i686/cmov/libc-2.3.6.so)

Apparently we are trying to use a 0x0D as a memory address....

Hope this helps. Toby

Revision history for this message
Thurston (thurston-eml) wrote :

A quick and easy work around for this bug (as advised by the developers over in the Debian world) is to remove your ~/.sane/xsane directory.

Problem completely fixed for me once I had removed this and allowed xsane to rewrite it. The old one was from a previous Gentoo installation and sneaked into my Ubuntu set up when I restored my home directory from back up.

Lesson: don't include unnecessary .config directories in back ups of your home directory.

Toby

Revision history for this message
Joysn (chris-joelly) wrote : Re: [Bug 37968] Re: SEGV on startup

thanx for this 'work around'!

On Mon, Oct 02, 2006 at 08:00:29AM -0000, Thurston wrote:
> A quick and easy work around for this bug (as advised by the developers
> over in the Debian world) is to remove your ~/.sane/xsane directory.
>
> Problem completely fixed for me once I had removed this and allowed
> xsane to rewrite it. The old one was from a previous Gentoo
> installation and sneaked into my Ubuntu set up when I restored my home
> directory from back up.
>
> Lesson: don't include unnecessary .config directories in back ups of
> your home directory.
>
> Toby
>
> ** Summary changed:
>
> - SEGV on startup
> + SEGV on startup [with old ~/.sane/xsane]
>
> --
> SEGV on startup [with old ~/.sane/xsane]
> https://launchpad.net/bugs/37968

--
"The greatest proof that intelligent life other that humans exists in
 the universe is that none of it has tried to contact us!"

Changed in xsane:
status: Unknown → Unconfirmed
Changed in xsane:
status: Unconfirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xsane (Ubuntu) because there has been no activity for 60 days.]

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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