pfshdrcalibrate 'Illegal Instruction'

9 views
Skip to first unread message

Alan Gibson

unread,
Aug 21, 2006, 9:23:16 AM8/21/06
to pfst...@googlegroups.com
ive just built pfstools-1.5 and pfscalibration-1.2 from tarballs on
sourceforge with no problems.

when i run

jpeg2hdrgen prv.*.jpg > preview.hdrgen
pfsinhdrgen preview.hdrgen | pfshdrcalibrate -v -s preview.response

pfshdrcalibrate fails with "Illegal instruction", and nothing else.

preview.hdrgen is simply

prv.img_1157.jpg 2500 8.0 0 0
prv.img_1158.jpg 625 8.0 0 0
prv.img_1159.jpg 158.73 8.0 0 0
prv.img_1160.jpg 40 8.0 0 0
prv.img_1161.jpg 10 8.0 0 0
prv.img_1162.jpg 2.5 8.0 0 0

any thoughts on what the problem might be?

thanks in advance,
alan

Grzesiek

unread,
Aug 21, 2006, 9:29:45 AM8/21/06
to pfst...@googlegroups.com
this is probably caused by my mistake in configure script - the
optimization flags contained hard coded cpu architecture. This has
been corrected in the CVS version, but the package is not yet updated.

In the configure.ac file, please change CXXFLAGS (line 15 or so) to:

CXXFLAGS="-O3 -funroll-loops -fstrength-reduce -fschedule-insns2
-felide-constructors -frerun-loop-opt -fexceptions
-fno-strict-aliasing -fexpensive-optimizations -ffast-math -pipe"

and reconfigure/recompile - should work.

hope that helps,
Grzesiek

Alan Gibson

unread,
Aug 21, 2006, 8:06:09 PM8/21/06
to pfst...@googlegroups.com
thanks for the help.. the origional problem is fixed,, but ive now run
into a new one.. with the changes you suggested,, and from CVS,, im
getting a segmentation fault..

dyssident@newdeal:~/photos/pfshdr$ pfsinhdrgen full.hdrgen |
pfshdrcalibrate -v -s full.response
pfshdrcalibrate: calibrating channels: RGB
pfshdrcalibrate: initial response: linear
pfshdrcalibrate: automatic self-calibration method: robertson
pfshdrcalibrate: sigma for Gaussian: 8
pfshdrcalibrate: interpolate missing parts of response: no
pfshdrcalibrate: save response curve to a file (do not generate HDR image)
pfshdrcalibrate: number of input levels: 256
pfshdrcalibrate: input multiplier: 255
pfshdrcalibrate: frame #1, EV=0.0004
pfshdrcalibrate: frame #2, EV=0.0015625
pfshdrcalibrate: frame #3, EV=0.00625
pfshdrcalibrate: frame #4, EV=0.025
pfshdrcalibrate: frame #5, EV=0.1
pfshdrcalibrate: frame #6, EV=0.5
pfshdrcalibrate: frame #7, EV=0.0004
pfshdrcalibrate: frame #8, EV=0.0015625
pfshdrcalibrate: frame #9, EV=0.00625
pfshdrcalibrate: frame #10, EV=0.025
pfshdrcalibrate: frame #11, EV=0.1
pfshdrcalibrate: frame #12, EV=0.5
pfshdrcalibrate: registered values: min=1 max=255
pfshdrcalibrate: camera response range: min=1 max=255
pfshdrcalibrate: recovering R channel...
Segmentation fault

i tried `export PFS_LIBS=/usr/lib/libpfs-1.2.so` before
configure/compile but it didnt help so im already out of ideas.. any
suggestions??

alan

Grzesiek

unread,
Aug 22, 2006, 3:28:17 AM8/22/06
to pfst...@googlegroups.com
this one is more complicated.

please, try first if you can preview your images with pfsview:

dyssident@newdeal:~/photos/pfshdr$ pfsinhdrgen full.hdrgen | pfsview

if this works fine, please send me a description of your system, ie
distribution, platform etc. and also if possible please provide me the
set of the exposures that lead to this segmentation fault.

you can also run pfshdrcalibrate with strace (like below) and send me
about 50 last lines of output.

dyssident@newdeal:~/photos/pfshdr$ pfsinhdrgen full.hdrgen | strace
pfshdrcalibrate -v -s full.response


/grzesiek

Alan Gibson

unread,
Aug 23, 2006, 10:03:53 PM8/23/06
to pfst...@googlegroups.com
piping to pfsview does work.

my distro is Ubuntu 6.06 Dapper Drake. Hardware is unremarkable: 1Ghz
AMD processor, 756 MB ram

you can find the failing exposures here (~13MB):
http://www.voxpopulimedia.com/pub/pfscalibration.segfault.tar.gz

stacktrace
=======================================
write(2, "robertson02", 11robertson02) = 11
write(2, ": ", 2: ) = 2
write(2, " #", 2 #) = 2
write(2, "88", 288) = 2
write(2, " delta=", 7 delta=) = 7
write(2, "9.6507e-06", 109.6507e-06) = 10
write(2, " (coverage: ", 12 (coverage: ) = 12
write(2, "99", 299) = 2
write(2, "%)\n", 3%)
) = 3
write(2, "robertson02", 11robertson02) = 11
write(2, ": ", 2: ) = 2
write(2, " #", 2 #) = 2
write(2, "89", 289) = 2
write(2, " delta=", 7 delta=) = 7
write(2, "9.6507e-06", 109.6507e-06) = 10
write(2, " <- converged\n", 14 <- converged
) = 14
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f4e000
write(3, "# Camera response curve, channel"..., 4096) = 4096
write(3, "\n -0.046294968 104 0.898"..., 4096) = 4096
write(3, "09110451\n 0.609592647 212 "..., 4096) = 4096
write(3, ".312519699\n -0.498553395 60"..., 4096) = 4096
write(3, "67 1.633021951\n 0.223669"..., 4096) = 4096
write(3, " 15 0.108786523\n -0.9231"..., 4096) = 4096
write(3, "5475622 123 0.964993477\n "..., 4096) = 4096
write(3, " 0.688207346 231 4.87761"..., 4096) = 4096
write(3, " 0.946374178 138\n 0.9360"..., 2596) = 2596
close(3) = 0
munmap(0xb7f4e000, 4096) = 0
munmap(0xb6202000, 28315648) = 0
munmap(0xb4701000, 28315648) = 0
munmap(0xb2c00000, 28315648) = 0
munmap(0xb10ff000, 28315648) = 0
munmap(0xaf5fe000, 28315648) = 0
munmap(0xadafd000, 28315648) = 0
munmap(0xabffc000, 28315648) = 0
munmap(0xaa4fb000, 28315648) = 0
munmap(0xa89fa000, 28315648) = 0
munmap(0xa6ef9000, 28315648) = 0
munmap(0xa53f8000, 28315648) = 0
munmap(0xa38f7000, 28315648) = 0
munmap(0xa1df6000, 28315648) = 0
munmap(0xa02f5000, 28315648) = 0
munmap(0x9e7f4000, 28315648) = 0
munmap(0x9ccf3000, 28315648) = 0
munmap(0x9b1f2000, 28315648) = 0
munmap(0x996f1000, 28315648) = 0
munmap(0x97bf0000, 28315648) = 0
munmap(0x960ef000, 28315648) = 0
munmap(0x945ee000, 28315648) = 0
exit_group(0) = ?
=======================================

let me know if you need any more info,

alan

Grzesiek

unread,
Aug 24, 2006, 4:22:06 AM8/24/06
to pfst...@googlegroups.com, Alan Gibson
hi alan,

I couldn't reproduce the error with your exposures. I have a question:
in your first email, it looks like the segmentation fault occured just
after starting to recover the R channel, like this:

> pfshdrcalibrate: recovering R channel...
> Segmentation fault

but from the stacktrace, I see that the recovery processed finished,
and program exited while saving the response curve to a file:

> write(2, " <- converged\n", 14 <- converged
> ) = 14
> fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7f4e000
> write(3, "# Camera response curve, channel"..., 4096) = 4096

could you try to compile the newest (CVS) version of pfscalibration in
debug mode (use "configure --enable-debug") and run it in gdb like
this (in the path where the compiled files are):

$ pfsinhdrgen full.hdrgen > exposures.pfs
$ gdb ./pfshdrcalibrate
(gdb) run -v -s t.m < exposures.pfs

and let me know, where the program crashes? (gdb will output relevant
information)

/grzesiek

Reply all
Reply to author
Forward
0 new messages