Forum: Ferret Ferret crashing ruby while highlighting

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Waters, Chris (Guest)
on 2007-07-30 21:28
(Received via mailing list)

I am having a problem where is crashing which highlighting
search results. The query string is
1519,1527,1537,1546,3389". In the debugger I can see that the crash
happens in search.c on line 907. The reason is that the excerpt->end
field is -1. I think the reason is because in this code from search.c:

            for (e_start = e_end = 0; e_start < mv->size; e_start++) {

                const int start_offset = matches[e_start].start_offset;

                if (e_start > e_end) {

                    running_score = 0.0;

                    e_end = e_start;


                while (e_end < mv->size && (matches[e_end].end_offset

                                             <= start_offset +
excerpt_len)) {

                    running_score += matches[e_end].score;




                        excerpt_new(e_start, e_end - 1, running_score));

                /* - 0.1 so that earlier matches take priority */

                running_score -= matches[e_start].score;


e_end is never being incremented beyond 0, so e_end-1 is stored as the
excerpt. However I am not sure why that is.

Anyway, thought this bug report might be useful.


Chris Waters


Network Chemistry, Inc

Email: removed_email_address@domain.invalid

Phone: (650) 858-3125 <> <>
This topic is locked and can not be replied to.