[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: --as-needed



2008/6/8 Cyril Brulebois <kibi@debian.org>:
> It might be interesting to use a debug build, and share the backtraces,
> so that one can check whether that's the same bug, when the segfault
> happens.

Below is the backtrace from tesseract built with gcc-4.2 and
--as-needed. Repeating it without --as-needed seems to produce an
identical backtrace (apart from the addresses, of course). I also
compiled in a sid pbuilder expecting to therefore get gcc 4.3, but
that defaulted to 4.2.4-1. Why didn't I get 4.3? How do I force 4.3 in
the sid pbuilder?

Regards

Jeff

$ gdb --args tesseract page.tif page_box batch.nochop
GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...
(gdb) run
Starting program: /usr/bin/tesseract page.tif page_box batch.nochop
[Thread debugging using libthread_db enabled]
Tesseract Open Source OCR Engine
[New Thread 0xb7bc76c0 (LWP 28140)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7bc76c0 (LWP 28140)]
0x080eddac in edge_char_of (dawg=0xb7975008, node=220784,
character=97, word_end=0) at dawg.cpp:63
63	  if (edge_occupied (dawg, edge)) {
(gdb) bt
#0  0x080eddac in edge_char_of (dawg=0xb7975008, node=220784,
character=97, word_end=0) at dawg.cpp:63
#1  0x080edf1d in def_letter_is_okay (dawg=0xb7975008,
node=0xbffd3ea0, char_index=8, prevchar=0 '\0', word=0xbffd419e
"Interscia", word_end=0)
    at dawg.cpp:174
#2  0x080e4242 in append_next_choice (dawg=0xb7975008, node=220784,
permuter=5 '\005', word=0xbffd419e "Interscia",
    unichar_lengths=0xbffd455f "\001\001\001\001\001\001\001\001\001",
unichar_offsets=0xbffd40f4, choices=0x84faef0, char_index=8,
this_choice=0x84fc810,
    prevchar=0x8131462 "", limit=0xbffd4198, rating=5.59744263,
certainty=-1.4352417, rating_array=0xbffd3fac,
certainty_array=0xbffd4050, word_ending=0,
    last_word=0, result=0xbffd3f34) at permdawg.cpp:208
#3  0x080e473a in dawg_permute (dawg=0xb7975008, node=220784,
permuter=5 '\005', choices=0x84faef0, char_index=8, limit=0xbffd4198,
    word=0xbffd419e "Interscia", unichar_lengths=0xbffd455f
"\001\001\001\001\001\001\001\001\001", unichar_offsets=0xbffd40f4,
rating=0, certainty=0,
    rating_array=0xbffd3fac, certainty_array=0xbffd4050, last_word=0)
at permdawg.cpp:301
#4  0x080e49ff in dawg_permute_and_select (string=0x8136f57 "system
words:", dawg=0xb7975008, permuter=<value optimized out>,
character_choices=0x84faef0,
    best_choice=0x84fd288, system_words=1) at permdawg.cpp:361
#5  0x080e5e31 in permute_words (char_choices=0x84faef0,
rating_limit=1000) at permute.cpp:1673
#6  0x080e7a8e in permute_all (char_choices=0x84faef0,
rating_limit=1000, raw_choice=0xbffd472c) at permute.cpp:1081
#7  0x080e8012 in permute_characters (char_choices=0x84faef0,
limit=1000, best_choice=0xbffd4744, raw_choice=0xbffd472c) at
permute.cpp:1133
#8  0x080c8190 in chop_word_main (word=0x84fd108, fx=1,
best_choice=0xbffd4744, raw_choice=0xbffd472c, tester=0 '\0',
trainer=0 '\0') at chopper.cpp:443
#9  0x080c57ba in cc_recog (tessword=0x84fd108,
best_choice=0xbffd4744, best_raw_choice=0xbffd472c, tester=<value
optimized out>,
    trainer=<value optimized out>) at tface.cpp:252
#10 0x08074fd6 in recog_word_recursive (word=0x84f1a50, denorm=0x84fba64,
    matcher=0x806b0b0 <tess_default_matcher(PBLOB*, PBLOB*, PBLOB*,
WERD*, DENORM*, BLOB_CHOICE_LIST&)>, tester=0, trainer=0, testing=0
'\0',
    raw_choice=@0x84fba8c, blob_choices=0xbffd4868,
outword=@0x84fba60) at tfacepp.cpp:174
#11 0x08075a16 in recog_word (word=0x84f1a50, denorm=0x84fba64,
    matcher=0x806b0b0 <tess_default_matcher(PBLOB*, PBLOB*, PBLOB*,
WERD*, DENORM*, BLOB_CHOICE_LIST&)>, tester=0, trainer=0,
    testing=<value optimized out>, raw_choice=@0x84fba8c,
blob_choices=0xbffd4868, outword=@0x84fba60) at tfacepp.cpp:81
#12 0x0806b45c in tess_segment_pass2 (word=0x84f1a50, denorm=0x84fba64,
    matcher=0x806b0b0 <tess_default_matcher(PBLOB*, PBLOB*, PBLOB*,
WERD*, DENORM*, BLOB_CHOICE_LIST&)>, raw_choice=@0x84fba8c,
blob_choices=0xbffd4868,
    outword=@0x84fba60) at tessbox.cpp:95
#13 0x080525ef in match_word_pass2 (word=0x84fba58, row=0x83115d0,
x_height=63) at control.cpp:978
#14 0x08052e99 in classify_word_pass2 (word=0x84fba58, row=0x83115d0)
at control.cpp:768
#15 0x0805b0b6 in match_current_words (words=@0xbffd49a8,
row=0x83115d0) at fixspace.cpp:216
#16 0x0805d393 in fix_fuzzy_space_list (best_perm=@0xbffd4a58,
row=0x83115d0) at fixspace.cpp:175
#17 0x0805d968 in fix_fuzzy_spaces (monitor=0x0, word_count=1,
page_res=0x81d4bb8) at fixspace.cpp:138
#18 0x08054149 in recog_all_words (page_res=0x81d4bb8, monitor=0x0,
target_word_box=0x0, dopasses=0) at control.cpp:419
#19 0x0804b9bf in TessBaseAPI::Recognize (block_list=0xbffd4b3c,
monitor=0x0) at baseapi.cpp:478
#20 0x0804c4ce in TessBaseAPI::RecognizeToString () at baseapi.cpp:453
#21 0x0804b04c in TesseractImage (input_file=0xbffd56d6 "page.tif",
image=0xbffd4c00, text_out=0xbffd4c60) at tesseractmain.cpp:100
#22 0x0804b4b9 in main (argc=1, argv=0xbffd4d34) at tesseractmain.cpp:214


Reply to: