Segfault

Asked by Kuzemko Aleksandr on 2008-08-15

$ cuneiform -l rus book_1.tif

Cuneiform for Linux 0.3.0
Puma initialized.
PUMA_XOpen succeeded.
The image depth is 1 at this point.
Warning: RSL said that the lines do not have to withdraw.
Segfault

Question information

Language:
English Edit question
Status:
Solved
For:
Cuneiform for Linux Edit question
Assignee:
No assignee Edit question
Last query:
2008-08-15
Last reply:
2008-08-19

GNU DDD 3.3.11 (x86_64-pc-linux-gnu), by Dorothea L(gdb) file /home/starterkit/cuneiform/cuneiform-linux/builddir/cuneiform
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/cuneiform...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -l rus book_1.tif
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Reading symbols from system-supplied DSO at 0x7fffdfbfe000...done.
Reading symbols from /home/starterkit/libusb-driver.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libpuma.so...done.
Reading symbols from /usr/lib64/libMagick++.so.1...done.
Reading symbols from /usr/lib64/libMagickCore.so.1...done.
Reading symbols from /lib64/libdl.so.2...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librfrmt.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librout.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libced.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librmarker.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librneg.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librselstr.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librstuff.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librimage.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librline.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librshelllines.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librverline.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcimage.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcfio.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librblock.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librcorrkegl.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librpic.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcpage.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libexc.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librreccom.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librpstr.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libloc.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librstr.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/liblns32.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcline.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librcutp.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libsmetric.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librbal.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libleo.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libevn32.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libpass2.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libr35.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libstd32.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libfon.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libctb32.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libmsk.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librling.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librlings.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libwindummy.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librdib.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/librsadd.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcstr.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libccom.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libmmx.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libdif.so...done.
Reading symbols from /home/starterkit/cuneiform/cuneiform-linux/builddir/libcpu.so...done.
Reading symbols from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.3.1/libstdc++.so.6...done.
Reading symbols from /lib64/libm.so.6...done.
Reading symbols from /lib64/libgcc_s.so.1...done.
Reading symbols from /lib64/libc.so.6...done.
Reading symbols from /lib64/libusb-0.1.so.4...done.
Reading symbols from /lib64/libpthread.so.0...done.
Reading symbols from /usr/lib64/libMagickWand.so.1...done.
Reading symbols from /usr/lib64/libtiff.so.3...done.
Reading symbols from /usr/lib64/libfreetype.so.6...done.
Reading symbols from /usr/lib64/libjpeg.so.62...done.
Reading symbols from /usr/lib64/libXext.so.6...done.
Reading symbols from /usr/lib64/libXt.so.6...done.
Reading symbols from /lib64/libbz2.so.1...done.
Reading symbols from /lib64/libz.so.1...done.
Reading symbols from /usr/lib64/libltdl.so.7...done.
Reading symbols from /usr/lib64/libSM.so.6...done.
Reading symbols from /lib64/libuuid.so.1...done.
Reading symbols from /usr/lib64/libICE.so.6...done.
Reading symbols from /usr/lib64/libX11.so.6...done.
Reading symbols from /usr/lib64/libxcb-xlib.so.0...done.
Reading symbols from /usr/lib64/libxcb.so.1...done.
Reading symbols from /usr/lib64/libXau.so.6...done.
Reading symbols from /usr/lib64/libXdmcp.so.6...done.
Cuneiform for Linux 0.3.0
Reading symbols from /usr/lib64/ImageMagick-6.4.2/modules-Q16/coders/tiff.so...done.
Reading symbols from /usr/lib64/ImageMagick-6.4.2/modules-Q16/coders/dib.so...done.
Puma initialized.
PUMA_XOpen succeeded.
The image depth is 1 at this point.
Warning: RSL said that the lines do not have to withdraw.
Reading in symbols for /home/starterkit/cuneiform/cuneiform-linux/cuneiform_src/Kern/pass2/src/p2_tools.c...done.

Program received signal SIGSEGV, Segmentation fault.
0x00007f72d292a921 in Lines2Raster (linerep=0x7f72ccf63fde, size=118, w=22, h=31, rec=0x7fffdfbd7430) at /home/starterkit/cuneiform/cuneiform-linux/cuneiform_src/Kern/pass2/src/p2_tools.c:149
/home/starterkit/cuneiform/cuneiform-linux/cuneiform_src/Kern/pass2/src/p2_tools.c:149:5425:beg:0x7f72d292a921
Current language: auto; currently c

yaleks (yaleks) said : #2

Using strace your can see something very strange:

open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=229307, ...}) = 0
mmap(NULL, 229307, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd1ff698000
close(3) = 0
open("/lib64/DPUMA.DLL", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/DPUMA.DLL", O_RDONLY) = -1 ENOENT (No such file or directory)
munmap(0x7fd1ff698000, 229307) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=229307, ...}) = 0
mmap(NULL, 229307, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd1ff698000
close(3) = 0
open("/lib64/SJTL.DLL", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/SJTL.DLL", O_RDONLY) = -1 ENOENT (No such file or directory)
munmap(0x7fd1ff698000, 229307) = 0
write(1, "The image depth is 24 at this po"..., 37The image depth is 24 at this point.
) = 37
brk(0x1dbe000) = 0x1dbe000
brk(0x1de6000) = 0x1de6000
brk(0x1e15000) = 0x1e15000
brk(0x1e44000) = 0x1e44000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Alex Samorukov (samm-os2) said : #3

I tried to make clean install in qemu, with debian 4/x86, gcc 4.1, and i got segfault on a test.bmp

Alex Samorukov (samm-os2) said : #4

Also tried with gcc/g++ version 3.4 - same result

Alex Samorukov (samm-os2) said : #5

i just tested version 0.2 on the same system and it works! so we have regression somewhere between 0.3 and 0.2

Alex Samorukov (samm-os2) said : #6

i just tested version 0.2 on the same system and it works! so we have regression somewhere between 0.3 and 0.2

Alex Samorukov (samm-os2) said : #7

I just found that revision 229 (checked out using bazaar) works fine, at least on x86 debian. So, regression is between 229 and 230. Hope, this will help.