Is this a known problem? I can't find it referenced anywhere else. I get the application pausing for a while (20-30 seconds), then it sometimes crashes with the stack trace shown below. Sometimes it works fine. If it works once, it seems to work from then on (I'm not totally sure about that).
Here's a cut down snippet of my code which as far as I can tell is pretty vanilla: lucene::search::Sort* lsort=NULL; lucene::search::Hits* hits=NULL; lucene::search::BooleanQuery b; for(int v=0; v<((int)words.size())-1; v++) { lucene::index::Term* t=new lucene::index::Term(field.c_str(),words[v].c_str()); lucene::search::Query* q; q=new lucene::search::TermQuery(t); b.add(q,true,false); } const char* sort_array[3]; sort_array[0]="sort_name"; sort_array[1]="sort_address"; sort_array[2]=NULL; lsort=new lucene::search::Sort(sort_array); hits=ds->lucene_index->search(&b,lsort); <-- crashes on this line. (in another thread): ds->lucene_index=new lucene::search::IndexSearcher(fname_lucene.c_str()); The search is not made until the index load has definitely finished. I am using TCHAR set to be an 8 bit char. Because this only seems to fail on the first search, could there be some lazy loading issue that I'm running afoul of? Thanks, Roy Ward. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x646a5b90 (LWP 21579)] 0x080e774e in lucene::search::FieldSortedHitQueue::lessThan (this=0x6468a5a8, docA=0x9e5ef78, docB=0x85cc7d0) at /home/caching_server/clucene/src/core/CLucene/search/FieldSortedHitQueue.cpp:97 (gdb) backtrace #0 0x080e774e in lucene::search::FieldSortedHitQueue::lessThan (this=0x6468a5a8, docA=0x9e5ef78, docB=0x85cc7d0) at /home/caching_server/clucene/src/core/CLucene/search/FieldSortedHitQueue.cpp:97 #1 0x080e4213 in lucene::search::SortedTopDocsCollector::collect (this=0x6468a5d8, doc=899589, score=1.7330225519899432756482787754137576) at /home/caching_server/clucene/src/core/CLucene/util/PriorityQueue.h:29 #2 0x080f5c86 in lucene::search::BooleanScorer2::score (this=0x828f200, hc=0x6468a5d8) at /home/caching_server/clucene/src/core/CLucene/search/BooleanScorer2.cpp:623 #3 0x080e3a7e in lucene::search::IndexSearcher::_search (this=0x8211798, query=0x6468bbcc, filter=0x0, nDocs=100, sort=0x828bea0) at /home/caching_server/clucene/src/core/CLucene/search/IndexSearcher.cpp:281 #4 0x080e64a9 in lucene::search::Hits::getMoreDocs (this=0x85ae968, m=<value optimized out>) at /home/caching_server/clucene/src/core/CLucene/search/Hits.cpp:122 #5 0x080e6a24 in Hits (this=0x85ae968, s=0x8211798, q=0x6468bbcc, f=0x0, _sort=0x828bea0) at /home/caching_server/clucene/src/core/CLucene/search/Hits.cpp:60 #6 0x080e220f in lucene::search::Searcher::search (this=0x8211798, query=0x6468bbcc, sort=0x828bea0) at /home/caching_server/clucene/src/core/CLucene/search/SearchHeader.cpp:186 #7 0x080682e6 in app::do_query (this=0x825d848, elemque...@0x6468c9b4, o...@0x646a51ec, socket_id=14) at mycode.cpp:2364 ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ CLucene-developers mailing list CLucene-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/clucene-developers