According to Gabriele Bartolini:
> Ciao diggers, how are you?
> 
> Well, I tried latest cvs htdig3 and I have a core dumping with htsearch.
> 
> I've found it out, but with my LOW knowledge, I can't fix it.
> 
> The problem is in Display.cc when trying to add the variable ANCHOR.
> 
> And the core dumps just here:
> 
>       *anchor << "#" << ((String*) (*anchors)[iA-1])->get();
> 
> Any idea?

Ciao, fellow digger.  I'm fine.  :)  The following patch will prevent
core dumps at that point:

--- htsearch/Display.cc.nullanchor      Tue Mar 23 15:10:11 1999
+++ htsearch/Display.cc Thu Mar 25 09:23:06 1999
@@ -237,7 +237,7 @@ Display::displayMatch(ResultMatch *match
     if (iA > 0)             // if an anchor was found
       {
        List    *anchors = ref->DocAnchors();
-       if (anchors->Count() > 0)
+       if (anchors->Count() >= iA)
          {
            anchor = new String();
            fanchor = 1;

But the real question is why aren't there enough anchors in the
DocAnchors() list for the anchor number in DocAnchor()?  The anchor number
for the match comes from the words.db, while the anchors list comes from
the docdb, so it would seem that the two are out of sync and/or corrupt.
You'll probably need to rebuild them from scratch.

> Finally, a question: what is "addlist" macro in DocumentRef.cc for?

It's part of the Deserialize() function for reading docdb records, and
is responsible for decoding List objects from that record, namely the
descriptions and docAnchors lists.  This macro hasn't changed since
3.1.1, so I don't think it's the cause of your problem.  It should work
fine, as long as the docdb records are intact.

-- 
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
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to