According to Tsai, Jin:
> I recompile htdig with -g in CFLAGS.
...
> The gdb output is listed below:
>
> Starting program: /usr/bin/htdig -i
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x40164f62 in HtDateTime::SettoNow (this=0x0) at HtDateTime.cc:469
> 469 Ht_t = time(0);
> Current language: auto; currently c++
> (gdb) % Total % Received % Xferd Average Speed Time
> Curr.
> Dload Upload Total Current Left
> Speed
> 100 309 0 309 0 0 2073 0 --:--:-- 0:00:00 --:--:--
> 0
>
> (gdb) bt
> #0 0x40164f62 in HtDateTime::SettoNow (this=0x0) at HtDateTime.cc:469
> #1 0x0805ca37 in String::operator= () at String.cc:113
> #2 0x0804f418 in String::operator= () at String.cc:113
> #3 0x0805b766 in String::operator= () at String.cc:113
> #4 0x080550f3 in String::operator= () at String.cc:113
> #5 0x0805e427 in String::operator= () at String.cc:113
> #6 0x40314627 in __libc_start_main (
> main=0x805d4a0 <String::operator=(char const *)+62652>, argc=2,
> ubp_av=0xbffffad4, init=0x804d19c <_init>, fini=0x8062e00 <_fini>,
> rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffacc)
> at ../sysdeps/generic/libc-start.c:129
> (gdb)
OK, now we're getting somewhere. The backtrace itself doesn't make a
lot of sense, but the first few line gdb gave after the error point in
the right direction. Sigh! This is yet another in the long and sordid
history of unallocated HtDateTime pointers. I can't for the life of me
understand why Gabriele chose to use HtDateTime _pointers_ instead of
_objects_ in the Transport class, but this has been an endless source
of frustration because half the time they end up being used before the
objects are allocated, and sometimes the pointers get changed without the
objects being properly deleted causing memory leaks.
Anyway, try finding the following line in htdig/ExternalTransport.cc:
_Response->_access_time->SettoNow();
and just before this line, but after the Reset(), add the following line
to allocate the object:
_Response->_access_time = new htDateTime();
Please let us know how it goes.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html