All went well until I press the "stitch now!" button. Here is the output
I get
nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 0 /tmp/huginpto_VVm2Mx
nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 1 /tmp/huginpto_VVm2Mx
nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 2 /tmp/huginpto_VVm2Mx
enblend --compression NONE -f5114x3948 -o neve.tif neve0000.tif
neve0001.tif neve0002.tif
Loading next image: neve0000.tif
Loading next image: neve0001.tif
Creating blend mask: 1/4 2/4 3/4 4/4
Optimizing 1 distinct seam.
Strategy 1, s0: 1/4 2/4 3/4 4/4
Strategy 2: s0
make: *** [neve.tif] Segmentation fault
make: *** Cancellazione di `neve.tif'
Then I get a warning that ask to report the problem on sourceforge.
I tried different images and different paths but I always get this message.
What could be the problem?
Thanks
Cristian
> I hope this is the right place to ask but tonight I've built Hugin
> (version 0.8.0.3563) on my ubuntu Intrepid 64 bit and tried it.
>
> All went well until I press the "stitch now!" button. Here is the output
> I get
>
> nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 0 /tmp/huginpto_VVm2Mx
> nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 1 /tmp/huginpto_VVm2Mx
> nona -z PACKBITS -r ldr -m TIFF_m -o neve -i 2 /tmp/huginpto_VVm2Mx
> enblend --compression NONE -f5114x3948 -o neve.tif neve0000.tif
> neve0001.tif neve0002.tif
> Loading next image: neve0000.tif
> Loading next image: neve0001.tif
> Creating blend mask: 1/4 2/4 3/4 4/4
> Optimizing 1 distinct seam.
> Strategy 1, s0: 1/4 2/4 3/4 4/4
> Strategy 2: s0
> make: *** [neve.tif] Segmentation fault
> make: *** Cancellazione di `neve.tif'
recompile enblend with debugging turned on and the problem will go
away. for some people compiling with -O2 instead of -O3 also worked
but i haven't tried it yet.
--alex--
--
| I believe the moment is at hand when, by a paranoiac and active |
| advance of the mind, it will be possible (simultaneously with |
| automatism and other passive states) to systematize confusion |
| and thus to help to discredit completely the world of reality. |
> Sorry for the noob question but for debugging turned on you mean
> adding '--enable-debug=yes' to the command './configure'. If so it
> didn't work.
that should do it. did you do a make clean before running configure,
and then install the new executable? just making sure...
I keep on getting this "Bus error":
Loading next image: architectural0090.tif
Creating blend mask: 1/4 2/4 3/4 4/4s0 s1gnumake: *** [architectural.tif] Bus error
Optimizing 2 distinct seams.
Strategy 1, s0: 1/4 2/4 3/4 4/4
Strategy 1, s1:
Strategy 2:
enblend: Seam s1 is a tiny closed contour and was removed after
optimization.
gnumake: *** Deleting file `architectural.tif'
This happened while processing ..90.tif, the previous time it was ..
29.tif, so it happens at different stages...
To get my images finally stitched, I tried the ImageFuser software.
(The latest version which was posted a couple of days ago) This also
crashed and in an even earlier stage:
ImageFuser, while opening the set of images:
AppleScript Error
Can't make current application into type anything. (-1700)
Does anyone have an idea how I can make a panorama?? :)
When I got to know Hugin, it was a pretty early version and slow as
hell... To get my Gigapans stitched I had to wait a couple of days,
but it worked... Always. Now I haven't published anything in months,
since everything keeps on crashing... I do have respect for all the
volunteers that contribute to this possibly wonderful piece of
software, but it never seems to work for me...
> TheerrorI got in the standard version has now changed to the following (in the latest Mac OS build):
On 11 dec 2008, 10:59, "Joris Van Dael" <jov...@telenet.be> wrote:
> I'm sorry, but I'd posted this newerrormessage in the wrong thread:
>
>
> (is the only solution still compiling enblend myself?)
>
> Loading next image: p0061.tif
> Creating blend mask: 1/4 2/4 3/4 4/4
> Optimizing 2 distinct seams.
> Strategy 1, s0: 1/4 2/4 3/4 4/4
> Strategy 1, s1:
> Strategy 2:
> enblend: Seam s1 is a tiny closed contour and was removed after optimization.
> s0 s1gnumake: *** [p.tif]Buserror
> gnumake: *** Deleting file `p.tif'
>
500 MB didn't work, so I thought I'd try 2,000 MB. Alas... Any other ideas?Thanks,JorisLoading next image: architectural0111.tifCreating blend mask: 1/4 2/4 3/4 4/4Optimizing 2 distinct seams.Strategy 1, s0: 1/4 2/4 3/4 4/4Strategy 1, s1:enblend: Seam s1 is a tiny closed contour and was removed after optimization.Strategy 2: s0 s1gnumake: *** [architectural.tif] Bus errorgnumake: *** Deleting file `architectural.tif'
Everytime I try, it's another image that triggers the crash. The "tiny closed contour" thing happens with other images too... I'll try again tonight and I bet it will crash again at yet another .tif...
J.
>----- Oorspronkelijk bericht -----
>Van
: Seb Perez-D [mailto:sbprz...@gmail.com]
>Verzonden
: donderdag
, januari
8, 2009 08:37 AM
>Aan
: hugi...@googlegroups.com
>Onderwerp
: [hugin-ptx] Re: segmentation fault when stitching
>
At the risk of sounding old-fashioned, can the command be run
under a debugger, or the core dump analysed after the fact, to give
a stack trace of the error?
BugBear
i missed most of the thread, but have you tried running enblend manually
from the commandline ?
that gnu make "bus error" looks weird
>> This seems to be a problem with enblend - not hugin. I am surprised by
>> the "Seam s1 is a tiny closed contour" which makes me think this is a
>> particular image. What happens if you remove the 0111 image ?
>
>
> At the risk of sounding old-fashioned, can the command be run
> under a debugger, or the core dump analysed after the fact, to give
> a stack trace of the error?
>
> BugBear
--
Rich
I've got this problem too.
This is caused by this particular code in createMask in enblend:
for (Segment::iterator currentVertex = snake->begin(); ; ) {
Segment::iterator nextVertex = currentVertex;
++nextVertex;
if (nextVertex == snake->end()) nextVertex = snake->begin();
if (currentVertex->first || nextVertex->first) {
// Find shortest path between these points
Point2D currentPoint = currentVertex->second;
Point2D nextPoint = nextVertex->second;
where snake->empty() is true (because of the optimization). The code is
located below comment
// Use Dijkstra to route between moveable snake vertices over mismatchImage.
So snake is empty, nextVertex is preincremented so that it doesn't
equals to snake->end() anymore and
Point2D nextPoint = nextVertex->second;
causes some nasty things. Byt maybe I'm wrong.
I've solved this problem by putting
if (snake->empty())
continue;
just after the initialization of snake variable, so the whole part now
looks like
// Use Dijkstra to route between moveable snake vertices over
// mismatchImage.
segmentNumber = 0;
for (ContourVector::iterator currentContour = contours.begin();
currentContour != contours.end();
++currentContour) {
for (Contour::iterator currentSegment = (*currentContour)->begin();
currentSegment != (*currentContour)->end();
++currentSegment) {
Segment *snake = *currentSegment;
if (snake->empty())
continue;
if (Verbose > VERBOSE_MASK_MESSAGES) {
cout << " s" << segmentNumber++;
cout.flush();
}
for (Segment::iterator currentVertex = snake->begin(); ; ) {
Segment::iterator nextVertex = currentVertex;
++nextVertex;
if (nextVertex == snake->end()) nextVertex = snake->begin();
and it enblend doesn't crash anymore with that particular error. Also I
cannot find any error in the output, so maybe it is the correct
solution.
Regards,
David Brodsky
P.S. I couldn't post line number beacause of my other changes in the
source code like debugging messages etc.
> This is caused by this particular code in createMask in enblend:
>
> for (Segment::iterator currentVertex = snake->begin(); ; ) {
> Segment::iterator nextVertex = currentVertex;
> ++nextVertex;
> if (nextVertex == snake->end()) nextVertex = snake->begin();
>
> if (currentVertex->first || nextVertex->first) {
> // Find shortest path between these points
> Point2D currentPoint = currentVertex->second;
> Point2D nextPoint = nextVertex->second;
>
> where snake->empty() is true (because of the optimization). The code is
> located below comment
i still get a core dump even with this patch applied. the only way i
can get enblend to work is to compile it with debugging symbols (it
was also suggested that compiling with -O2 instead of -O3 might also
work but i haven't tried it).
Damn - that implies the "true" fault is stack overrun.
As I've said before:
>
> In which case, I was going to recommend "hoping" for a dev
> to have access to rational Purify, which paid for itself
> (at a previous company) by finding a single bug which we'd
> spent 20 man days trying to track.
>
> However, I'm out of date, and Linux has Valgrind, which is free!
>
> http://funwithlinux.blogspot.com/2007/02/detecting-memory-leaks-in-gnulinux.html
>
> BugBear
This bug (#2121647 in the hugin tracker) doesn't seem to appear with
the fedora enblend package. The only difference I can see is the
custom fedora build flags:
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
--
Bruno
Thanks for hint, I'll try these flags, maybe some of them will make it
work. Anyway, which version of gcc is used for compiling fedora
package?
it's not the optimization level (-O2) it's the debugging symbols (-g).
try compiling it without -g and i am sure it will seg fault as well.
with -O3 and -g i get enblend to work on debian just fine.
I've tried compiling enblend with gcc 4.2.4 and it seems that enblend
works correctly. It's probably problem only with gcc 4.3.x
> I've tried compiling enblend with gcc 4.2.4 and it seems that
> enblend works correctly. It's probably problem only with gcc 4.3.x
not for me. i tried compiling it with 4.2.4 on debian and i got a
segmentation fault. running it under valgrind gives:
Invalid read of size 1
at 0x518B09: void enblend::maskBounds<vigra::CachedFileImage<unsigned char> >(vigra::CachedFileImage<unsigned char>*, vigra::Rect2D&, vigra::Rect2D&) (in /usr/local/bin/enblend)
by 0x672DB3: void enblend::enblendMain<vigra::RGBValue<unsigned char, 0, 1, 2> >(std::list<vigra::ImageImportInfo*, std::allocator<vigra::ImageImportInfo*> >&, vigra::ImageExportInfo&, vigra::Rect2D&) (in /usr/local/bin/enblend)
by 0x40944F: main (in /usr/local/bin/enblend)
Address 0x1 is not stack'd, malloc'd or (recently) free'd
Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x1
at 0x518B09: void enblend::maskBounds<vigra::CachedFileImage<unsigned char> >(vigra::CachedFileImage<unsigned char>*, vigra::Rect2D&, vigra::Rect2D&) (in /usr/local/bin/enblend)
by 0x672DB3: void enblend::enblendMain<vigra::RGBValue<unsigned char, 0, 1, 2> >(std::list<vigra::ImageImportInfo*, std::allocator<vigra::ImageImportInfo*> >&, vigra::ImageExportInfo&, vigra::Rect2D&) (in /usr/local/bin/enblend)
by 0x40944F: main (in /usr/local/bin/enblend)
are you sure you didn't compile enblend with debugging symbols on (-g)?
I've compiled it with --enable-debug=no, but maybe it turned some
debug symbols, I'll try it later. But anyway, with gcc 4.3 it
segfaults even with debugging symbols turned on.
> I've compiled it with --enable-debug=no, but maybe it turned some
> debug symbols, I'll try it later. But anyway, with gcc 4.3 it
> segfaults even with debugging symbols turned on.
not for me. compiling with --enable-debug=yes works with both gcc
4.2.4 and gcc 4.3.2 (which is the default in debian unstable). btw,
are you doing a make clean between reconfigures (and compilations)?
I'm not much experienced, but shouldn't it be a problem only if mx and
mxLeft were stored in a CPU register?
Regards
Lukas "stativ" Jirkovsky
Yes, but it works. I tried some projects, and it did not crash.
Very "nice" bug indeed.
Kornel
--
Kornel Benko
Kornel...@berlin.de
adding --param inline-unit-growth=60 to g++ compile flags makes
enblend work fine without debugging symbols. thanks for finding this.
Works for me. A test case that was segfaulting reproducibly when
compiling without debugging symbols now completes. And four to fives
times faster as well, finallz making pano stitching and blending fun
again!
Thanks for sorting this out,
Felix
And result? It really seems that segmentation fault is problem only
with GCC 4.3.* because it doesn't occur with any other compiler and
the code seems right. So even my patch could look like an ugly hack it
is probably proper solution to this bug. I hope that it'll get to the
trunk.
Anyway if I change the problematic code to something like this:
for (int x = 1; mx.x < mend.x; ++x, ++mx.x, ++mxLeft.x, ++mxUp.x) {
(*mxLeft != *mx);
std::cout << "something #0\n";
int foo = (*mxLeft != *mx);
std::cout << "something #1: foo = " << foo << "\n";
mBB |= Rect2D(x - 1, y, x + 1, y + 1);
std::cout << "something #2\n";
if (*mxLeft != *mx) mBB |= Rect2D(x - 1, y, x + 1, y + 1);
if (*mxUp != *mx) mBB |= Rect2D(x, y - 1, x + 1, y + 1);
}
enblend prints:
Creating blend mask: 1/4 2/4 3/4 4/4
Optimizing 1 distinct seam.
Strategy 1, s0: 1/4 2/4 3/4 4/4
Strategy 2: s0
something #0
Segmentation fault
So it clearly shows, that problem is really in (*mxLeft != *mx); The
first use doesn't use returned value, so it's probably missing in
generated code. But in the second use, where it's returned value is
stored in variable, it segfaults. If I comment this part out mBB |=
Rect2D(x - 1, y, x + 1, y + 1); is performed corectly.