Scanimage l ошибка сегментирования

Ошибка сегментирования

Модераторы: Warderer, Модераторы разделов

Cormorant

Сообщения: 9
ОС: Debian

Ошибка сегментирования

С некоторых пор при запуске например tilda, в консоли пишет такое сообщение.
Еще сканер настроил, пробую scanimage -L — тоже «Ошибка сегментирования».
Результат: нет любимого терминала под рукой и сканер не пашет (xsane не запускается, только с другой ошибкой).
Система Debian 5.03 lenny, gnome/openbox.
Пишу:
$ scanimage -L
Ошибка сегментирования
$ tilda
Ошибка сегментирования
$ tail /var/log/messages

Jan 12 09:08:02 MAINCOMP kernel: [ 3318.991559] scanimage[2694]: segfault at 5a18db4 ip bff9b094 sp b7f3dce0 error 4
Jan 12 09:08:12 MAINCOMP kernel: [ 3329.122793] tilda[2696]: segfault at 0 ip 0805012b sp bf952f20 error 4 in tilda[8048000+13000]

Переустановил пакет tilda — всё тоже самое.
В непонятках.

La propriete c’est le vol.

Аватара пользователя

SoaT

Сообщения: 52
ОС: Debian sid

Re: Ошибка сегментирования

Сообщение

SoaT »

Пардон, присоединюсь. У меня она вываливается при apt-get update очень часто. Приходится по несколько раз прогонять :(

noob.Debian.sid.ждиответногогудка

Аватара пользователя

Uncle_Theodore

Сообщения: 3339
ОС: Slackware 12.2, ArchLinux 64

Re: Ошибка сегментирования

Сообщение

Uncle_Theodore »

1) Проверьте память на предмет битости;
2) Попробуйте запускать вылетающую программу через strace или gdb;
3) Посмотрите в свежих багрепортах и, если не найдете, пишите свой багрепорт.

Сегфолт — это проблема в аппликации, а не в настройках. Ничего не поделать.

Аватара пользователя

44616e

Сообщения: 205
ОС: Debian testing

Re: Ошибка сегментирования

Сообщение

44616e »

Если мне не изменяет память Intel начинает тротлить уже при 69. 77 — это много. Из процессоров, которые были у меня самым горячим был P2.4 Prescott — 60.

Аватара пользователя

Bluetooth

Сообщения: 4395
Статус: Блюзовый
ОС: Debian Squeeze amd64

Re: Ошибка сегментирования

Сообщение

Bluetooth »

SoaT писал(а): ↑

12.01.2010 11:01

Скорее по-оффтопу. 77 °C камня — норма?

нет, не норма :)
Я, правда, не знаю на 100%, но lm-sensors пишут, что у моего квада хай температура — 74, а критическая — 100. Честно говоря, я не уверен, что это не взято с потолка, однако, по моему опыту, такая температура не есть здоровая. У вас ноутбук или десктоп?(вот у меня он щас на 41, при нагрузке больше 50 не нагревается)

Аватара пользователя

SoaT

Сообщения: 52
ОС: Debian sid

Re: Ошибка сегментирования

Сообщение

SoaT »

У меня десктоп. Разогнано шиной, 77-78 держит, выше 80 не поднимается даже при больших нагрузках. В биосе вроде прописано что это еще нормально :)

noob.Debian.sid.ждиответногогудка

Аватара пользователя

Bluetooth

Сообщения: 4395
Статус: Блюзовый
ОС: Debian Squeeze amd64

Re: Ошибка сегментирования

Сообщение

Bluetooth »

SoaT писал(а): ↑

12.01.2010 20:35

У меня десктоп. Разогнано шиной, 77-78 держит, выше 80 не поднимается даже при больших нагрузках. В биосе вроде прописано что это еще нормально :)

Я бы снизил разгон, или добавил бы охлаждения, чтобы довести до того, чтобы температура не поднималась выше 70. Потом поюзал бы систему. Скорее всего, все эти сегфолты пропадут.

Аватара пользователя

SoaT

Сообщения: 52
ОС: Debian sid

Re: Ошибка сегментирования

Сообщение

SoaT »

Дело в том что траблы с сигментированием пришли внезапно. Имели место, а сейчас опять пропали. Где-то какой-то пакет обновился наверное и решил вопрос, просто не заметил… надеюсь что так было дело))

noob.Debian.sid.ждиответногогудка

Sb0y

Сообщения: 17
ОС: Gentoo Linux

Re: Ошибка сегментирования

Сообщение

Sb0y »

Такая же беда. Tilda валится вот так:

Код: Выделить всё

sb0y@box ~ $ tilda -C

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(tilda:19989): Gtk-CRITICAL **: gtk_file_chooser_select_filename: assertion `filename != NULL' failed
Ошибка сегментирования

Наверно какая-то из gtk-библеотек обновилась. Знать бы ещё какая.


Description


Alexandr Shashkin



2022-09-13 16:45:53 MSK

Версия программы:
=================
hplip-3.22.6-alt1
sane-server-1.0.32-alt4

Шаги, приводящие к ошибке:
==========================
1) Настроить sane-server:
  1.1) Установить sane-server sane xinetd
  1.2) Раскомментировать строки в /etc/services, начинающиеся с sane-port.
  1.3) Создать файл /etc/xinetd.d/sane со следующим содержимым:
service sane
{
disable = no
port = 6566
socket_type = stream
wait = no
user = _saned
group = scanner
server = /usr/sbin/saned
only_from = <ВВЕСТИ IP АДРЕС КЛИЕНТА>
}
  1.4) Запустить сервис xinetd
  1.5) Подключить сканер к серверу
2) Выполнить команду scanimage -L на сервере и на клиенте, сравнить выводы
3) На сервер установить hplip и установить hp plugin с помощью команды hp-plugin
4) Снова сравнить выводы команды scanimage -L на клиенте и на сервере.

Результат:
==========
До установки плагина hp сканеры отображаются на клиенте, и на них можно проводить сканирование. После установки плагина: на клиенте при вызове команды scanimage -L возникает ошибка сегментирования. Такие программы как gimagereader-qt5 и xsane также не запускаются из-за этой ошибки.

Ожидаемый результат:
====================
Подключенные к серверу сканеры отображаются в выводе scanimage -L на клиенте. Сканирование на клиенте на сканерах с удаленного сервера проходит успешно.

Дополнительно:
==============
В P10 на таких же версиях указанных программ и в P9 на hplip-3.21.12-alt1 и sane-server-1.0.32-alt2 ошибка сегментирования не возникает: сканеры, подключенные к серверу, больше не определяются и отсутствуют в выводе команды scanimage -L, запущенной на клиенте.

I had problems with segmentation fault in Xsane with my HP4200 USB scanner after upgrading to Ubuntu 20.04 from Ubuntu 18.04.

I found many google suggestions to no avail. I configured and compiled the back end for the HP4200 and it was still crashing.

I enabled the debug messages in the source code and found that the debug messages were telling me that it was crashing always in the same place

a subroutine called do_fine_calibration in the hp4200.c file. In that subroutine memset is called and it appeared that that was where the crash occurred.

If memset is called with a null pointer it tries to access non existent memory. I tried to find if Ubuntu 20.04 did something different in memory management but found nothing.

Anyway it seemed that this code was setting up a large array called registro for which a pointer didn’t seem to exist!

I’m not a memory management guru but after some study i decided to change the registro declaration to set it to 0 when declared
(about line 1377 — int registro[30][5460 * 3] = {0}; with my change)

and then eliminate the code section (line 1496 — about 1505) that memsets the registro array to 0.

After a re ./configuration, make sudo make install and firing up scanimage for a scan, lo and behold the motor took off and began to scan again!

View previous topic :: View next topic  
Author Message
Kenji Miyamoto
Veteran
Veteran

Joined: 28 May 2005
Posts: 1452
Location: Looking over your shoulder.

PostPosted: Sat Sep 26, 2009 12:17 am    Post subject: SANE: scanimage Segfaults when Scanning Reply with quote

I just recently replaced my scanner with a new HP ScanJet G3110, and it appears that saned segfaults when I try to scan anything:

Code:
# scanimage -L

device `hp3900:libusb:001:004′ is a Hewlett-Packard Scanjet G3110 flatbed scanner

# scanimage

zsh: segmentation fault  scanimage

# dmesg

ppdev0: registered pardevice

ppdev0: unregistered pardevice

scanimage[4240]: segfault at 0 ip 00006a5fc327a7e0 sp 00007a9f2cf5c5b8 error 4 in libc-2.9.so[6a5fc3205000+140000]

grsec: From 192.168.0.2: signal 11 sent to /usr/bin/scanimage[scanimage:4240] uid/euid:0/0 gid/egid:0/0, parent /bin/zsh[zsh:4108] uid/euid:0/0 gid/egid:0/0

grsec: From 192.168.0.2: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/bin/scanimage[scanimage:4240] uid/euid:0/0 gid/egid:0/0, parent /bin/zsh[zsh:4108] uid/euid:0/0 gid/egid:0/0

# SANE_DEBUG_DLL=5 scanimage

[sanei_debug] Setting debug level of dll to 5.

[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.20

[dll] sane_init/read_dlld: processing /etc/sane.d/dll.d …

[dll] sane_init/read_dlld: done.

[dll] sane_init/read_config: reading dll.conf

[dll] add_backend: adding backend `hpaio’

[dll] add_backend: adding backend `hp3900′

[dll] sane_get_devices

[dll] load: searching backend `hp3900′ in `/usr/lib64/sane’

[dll] load: trying to load `/usr/lib64/sane/libsane-hp3900.so.1′

[dll] load: dlopen()ing `/usr/lib64/sane/libsane-hp3900.so.1′

[dll] init: initializing backend `hp3900′

[dll] init: backend `hp3900′ is version 1.0.0

[dll] load: searching backend `hpaio’ in `/usr/lib64/sane’

[dll] load: trying to load `/usr/lib64/sane/libsane-hpaio.so.1′

[dll] load: dlopen()ing `/usr/lib64/sane/libsane-hpaio.so.1′

[dll] init: initializing backend `hpaio’

[dll] init: backend `hpaio’ is version 1.0.0

[dll] sane_get_devices: found 1 devices

[dll] sane_open: trying to open `hp3900:libusb:001:004′

zsh: segmentation fault  SANE_DEBUG_DLL=5 scanimage

# SANE_DEBUG_HP3900=255 scanimage

[sanei_debug] Setting debug level of hp3900 to 255.

[hp3900] > sane_init

[hp3900] > attach_one_device(devname=libusb:001:004)

[hp3900] > _ReportDevice:

[hp3900] > sane_get_devices: 0

[hp3900] > set_ScannerModel(proposed=8, product=4305, vendor=03f0)

[hp3900]  -> Device HPG3110 ,  treating as HPG3110 …

[hp3900] > RTS_Scanner_Init:

[hp3900] > Backend version: 0.12

[hp3900] + RTS_USBType

[hp3900] 000001 CTL DI: c0 04 fe11 0100 0002

[hp3900]            BF: 03 04 — — — — — —  : 0

[hp3900] — RTS_USBType(void): USB2.0

[hp3900] 000002 CTL DI: c0 04 fe3c 0100 0002

[hp3900]            BF: 06 a7 — — — — — —  : 0

[hp3900] > Chipset_ID(): 6

[hp3900]  -> Chipset model ID: 6

[hp3900] + Chipset_Reset:

[hp3900] 000003 CTL DO: 40 04 0000 0801 0000

[hp3900]            BF: Empty buffer

[hp3900] — Chipset_Reset: 0

[hp3900] + Load_Config

[hp3900] > Load_Chipset

zsh: segmentation fault  SANE_DEBUG_HP3900=255 scanimage

Code:
# cat /etc/make.conf

CHOST=»x86_64-pc-linux-gnu»

CFLAGS=»-O2 -march=k8 -pipe -mmmx -msse -msse2 -m3dnow -mfpmath=sse»

CXXFLAGS=»${CFLAGS}»

MAKEOPTS=»-j4″

LINGUAS=»en ja»

ACCEPT_KEYWORDS=»~amd64″

SANE_BACKENDS=»hp hp3500 hp3900 hp4200 hp5400 hp5590″

# emerge —info

Portage 2.1.6.13 (hardened/amd64, gcc-3.4.6, glibc-2.9_p20081201-r2, 2.6.28-hardened-r9 x86_64)

=================================================================

System uname: Linux-2.6.28-hardened-r9-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_1214-with-gentoo-2.0.0

Timestamp of tree: Sun, 13 Sep 2009 06:15:01 +0000

app-shells/bash:     4.0_p17-r1

dev-java/java-config: 1.3.7-r1, 2.1.7

dev-lang/python:     2.4.4-r4, 2.6.2

dev-python/pycrypto: 2.0.1-r8

sys-apps/baselayout: 2.0.0

sys-apps/openrc:     0.4.3-r2

sys-apps/sandbox:    1.9

sys-devel/autoconf:  2.63-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11

sys-devel/binutils:  2.19.1-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.28-r1

ACCEPT_KEYWORDS=»amd64 ~amd64″

CBUILD=»x86_64-pc-linux-gnu»

CFLAGS=»-O2 -march=k8 -pipe -mmmx -msse -msse2 -m3dnow -mfpmath=sse»

CHOST=»x86_64-pc-linux-gnu»

CONFIG_PROTECT=»/etc /var/bind»

# for i in —version —ldflags —libs —cflags —prefix —exec-prefix; sane-config $i

1.0.20

-L/usr/lib64 -Wl,-rpath,/usr/lib64

-lsane  -ldl  -lm -ltiff -ljpeg        -lusb

/usr

/usr

I’ve verified that scanadf also crashes. I’m at a loss as to what I can do here; any suggestions?
_________________
[ Kawa-kun, new and improved!! ]

Alex Libman seems to be more of an anarchist than a libertarian.

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20726

PostPosted: Sat Sep 26, 2009 3:37 am    Post subject: Reply with quote

What is the backtrace at the time the process faults?
Back to top

View user's profile Send private message

Kenji Miyamoto
Veteran
Veteran

Joined: 28 May 2005
Posts: 1452
Location: Looking over your shoulder.

PostPosted: Sat Sep 26, 2009 11:16 pm    Post subject: Reply with quote

Well, that’s not very helpful:

Code:
# gdb scanimage

GNU gdb 6.7.1

Copyright (C) 2007 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type «show copying»

and «show warranty» for details.

This GDB was configured as «x86_64-pc-linux-gnu»…

(no debugging symbols found)

Using host libthread_db library «/lib/libthread_db.so.1».

(gdb) run

Starting program: /usr/bin/scanimage

(no debugging symbols found)

(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.

0x000072214eaa87e0 in ?? ()

(gdb) where

#0  0x000072214eaa87e0 in ?? ()

#1  0x000072214eaa8526 in ?? ()

#2  0x00000494a31d6b70 in ?? ()

#3  0x00000494a31d6c20 in ?? ()

#4  0x0000000000000001 in ?? ()

#5  0x000072214e28c79c in ?? ()

#6  0x0000000000000000 in ?? ()


_________________
[ Kawa-kun, new and improved!! ]

Alex Libman seems to be more of an anarchist than a libertarian.

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20726

PostPosted: Sat Sep 26, 2009 11:19 pm    Post subject: Reply with quote

What is the backtrace at the time an unstripped copy built with debug symbols faults?
Back to top

View user's profile Send private message

Kenji Miyamoto
Veteran
Veteran

Joined: 28 May 2005
Posts: 1452
Location: Looking over your shoulder.

PostPosted: Sat Sep 26, 2009 11:28 pm    Post subject: Reply with quote

I re-emerged it with the following relevant lines in make.conf:

Code:
CHOST=»x86_64-pc-linux-gnu»

CFLAGS=»-O2 -ggdb -march=k8 -pipe -mmmx -msse -msse2 -m3dnow -mfpmath=sse»

FEATURES=»nostrip»

And it didn’t change a thing:

Code:
# gdb =scanimage

GNU gdb 6.7.1

Copyright (C) 2007 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type «show copying»

and «show warranty» for details.

This GDB was configured as «x86_64-pc-linux-gnu»…

Using host libthread_db library «/lib/libthread_db.so.1».

(gdb) run

Starting program: /usr/bin/scanimage

Program received signal SIGSEGV, Segmentation fault.

0x00006a3059c0f7e0 in ?? ()

(gdb) where

#0  0x00006a3059c0f7e0 in ?? ()

#1  0x00006a3059c0f526 in ?? ()

#2  0x0000066c17c32b60 in ?? ()

#3  0x0000066c17c32c10 in ?? ()

#4  0x0000000000000001 in ?? ()

#5  0x00006a30593f379c in ?? ()

#6  0x0000000000000000 in ?? ()

(gdb) quit

The addresses are different due to the memory layout randomization on Hardened Gentoo.
_________________
[ Kawa-kun, new and improved!! ]

Alex Libman seems to be more of an anarchist than a libertarian.

Back to top

View user's profile Send private message

Kenji Miyamoto
Veteran
Veteran

Joined: 28 May 2005
Posts: 1452
Location: Looking over your shoulder.

PostPosted: Sun Sep 27, 2009 1:47 am    Post subject: Reply with quote

Even worse news, I just tried to extract sane-backends-1.0.20.tar.gz, run ./configure && make -j4 && make install to install it to /usr/local…, and it gave the same result:

Code:
# SANE_DEBUG_HP3900=255 gdb =scanimage

GNU gdb 6.7.1

Copyright (C) 2007 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type «show copying»

and «show warranty» for details.

This GDB was configured as «x86_64-pc-linux-gnu»…

Using host libthread_db library «/lib/libthread_db.so.1».

(gdb) run

Starting program: /usr/local/bin/scanimage

[sanei_debug] Setting debug level of hp3900 to 255.

[hp3900] > sane_init

[hp3900] > attach_one_device(devname=libusb:001:007)

[hp3900] > _ReportDevice:

[hp3900] > sane_get_devices: 0

[hp3900] > set_ScannerModel(proposed=8, product=4305, vendor=03f0)

[hp3900]  -> Device HPG3110 ,  treating as HPG3110 …

[hp3900] > RTS_Scanner_Init:

[hp3900] > Backend version: 0.12

[hp3900] + RTS_USBType

[hp3900] 000001 CTL DI: c0 04 fe11 0100 0002

[hp3900]            BF: 03 07 — — — — — —  : 0

[hp3900] — RTS_USBType(void): USB2.0

[hp3900] 000002 CTL DI: c0 04 fe3c 0100 0002

[hp3900]            BF: 06 a7 — — — — — —  : 0

[hp3900] > Chipset_ID(): 6

[hp3900]  -> Chipset model ID: 6

[hp3900] + Chipset_Reset:

[hp3900] 000003 CTL DO: 40 04 0000 0801 0000

[hp3900]            BF: Empty buffer

[hp3900] — Chipset_Reset: 0

[hp3900] + Load_Config

[hp3900] > Load_Chipset

Program received signal SIGSEGV, Segmentation fault.

0x000069469398d7e0 in ?? ()

(gdb) where

#0  0x000069469398d7e0 in ?? ()

#1  0x000069469398d526 in ?? ()

#2  0x000006d6ea4ce370 in ?? ()

#3  0x000006d6ea4ce420 in ?? ()

#4  0x0000000000000001 in ?? ()

#5  0x000069469317179c in ?? ()

#6  0x0000000000000000 in ?? ()

After that, I stopped xinetd (which launches saned), and it still segfaults:

Code:
superbob ~ # /etc/init.d/xinetd stop

* Stopping xinetd…                                                                                                                                                    [ ok ]

# scanimage

zsh: segmentation fault  scanimage

# SANE_DEBUG_HP3900=255 scanimage

[sanei_debug] Setting debug level of hp3900 to 255.

[hp3900] > sane_init

[hp3900] > attach_one_device(devname=libusb:001:007)

[hp3900] > _ReportDevice:

[hp3900] > sane_get_devices: 0

[hp3900] > set_ScannerModel(proposed=8, product=4305, vendor=03f0)

[hp3900]  -> Device HPG3110 ,  treating as HPG3110 …

[hp3900] > RTS_Scanner_Init:

[hp3900] > Backend version: 0.12

[hp3900] + RTS_USBType

[hp3900] 000001 CTL DI: c0 04 fe11 0100 0002

[hp3900]            BF: 03 07 — — — — — —  : 0

[hp3900] — RTS_USBType(void): USB2.0

[hp3900] 000002 CTL DI: c0 04 fe3c 0100 0002

[hp3900]            BF: 06 a7 — — — — — —  : 0

[hp3900] > Chipset_ID(): 6

[hp3900]  -> Chipset model ID: 6

[hp3900] + Chipset_Reset:

[hp3900] 000003 CTL DO: 40 04 0000 0801 0000

[hp3900]            BF: Empty buffer

[hp3900] — Chipset_Reset: 0

[hp3900] + Load_Config

[hp3900] > Load_Chipset

zsh: segmentation fault  SANE_DEBUG_HP3900=255 scanimage


_________________
[ Kawa-kun, new and improved!! ]

Alex Libman seems to be more of an anarchist than a libertarian.

Back to top

View user's profile Send private message

Kenji Miyamoto
Veteran
Veteran

Joined: 28 May 2005
Posts: 1452
Location: Looking over your shoulder.

PostPosted: Sun Sep 27, 2009 4:31 am    Post subject: Reply with quote

Well, if I hook it into another machine with the same version of SANE, but non-hardened and with GCC4.4, it works. I guess that’s good enough.
_________________
[ Kawa-kun, new and improved!! ]

Alex Libman seems to be more of an anarchist than a libertarian.

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20726

PostPosted: Sun Sep 27, 2009 3:29 pm    Post subject: Reply with quote

This may be a bug in the hardened mode for gcc 3.4.x. Could you try with a non-hardened gcc 3.4.x? If that works, it is definitely a hardening bug. Also, if you are feeling adventurous, try with the hardened gcc 4.4.x maintained by Xake and Zorry. The newer hardening relies more on features that went upstream and were properly debugged, whereas the gcc 3.4.x hardening has some quirks that generate incorrect machine code from unusual, but valid C code.
Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

I had problems with segmentation fault in Xsane with my HP4200 USB scanner after upgrading to Ubuntu 20.04 from Ubuntu 18.04.

I found many google suggestions to no avail. I configured and compiled the back end for the HP4200 and it was still crashing.

I enabled the debug messages in the source code and found that the debug messages were telling me that it was crashing always in the same place

a subroutine called do_fine_calibration in the hp4200.c file. In that subroutine memset is called and it appeared that that was where the crash occurred.

If memset is called with a null pointer it tries to access non existent memory. I tried to find if Ubuntu 20.04 did something different in memory management but found nothing.

Anyway it seemed that this code was setting up a large array called registro for which a pointer didn’t seem to exist!

I’m not a memory management guru but after some study i decided to change the registro declaration to set it to 0 when declared
(about line 1377 – int registro[30][5460 * 3] = {0}; with my change)

and then eliminate the code section (line 1496 – about 1505) that memsets the registro array to 0.

After a re ./configuration, make sudo make install and firing up scanimage for a scan, lo and behold the motor took off and began to scan again!

Понравилась статья? Поделить с друзьями:
  • Screen wiper ошибка рено магнум
  • Scania сканер ошибок
  • Scheidt bachmann коды ошибок трк
  • Schaub lorenz духовой шкаф ошибка
  • Scania сброс ошибок