[Xapian-discuss] Omega cgi question

Jim Lynch jwl at sgi.com
Wed Sep 1 21:38:38 BST 2004


In the gui debugger, I get a Feature Unavailable exception.  I finally 
got the unknown via dbx.  Here's the trace just before the exception.  
Perhaps it will tell you more that it did me.


[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::_M_append_dispatch(const char*,const char*,__false_type):608 
+0x4,0x1001391c]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::append(const char*,const char*):565 +0x4,0x100138bc]
[4] Process 1659257 (omega.cgi) stopped at [std::operator+(const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&,const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&):1800 ,0x1000f580]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::append(const char*,const char*):436 ,0x10013884]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::append(const char*,const char*):564 ,0x1001388c]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::_M_append_dispatch(const char*,const char*,__false_type):607 
,0x100138e4]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::_M_append_dispatch(const char*,const char*,__false_type):608 
+0x4,0x1001391c]
[4] Process 1659257 (omega.cgi) stopped at 
[std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >::append(const char*,const char*):565 +0x4,0x100138bc]
[4] Process 1659257 (omega.cgi) stopped at [std::operator+(const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&,const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&):1801 ,0x1000f598]
More (n if no)?
[4] Process 1659257 (omega.cgi) stopped at [::map_dbname_to_dir(const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&):84 ,0x1000ca64]
Caught unknown exception
Process 1659257 (omega.cgi) terminated


Also I trapped a couple of variables:

[4] Process 1660636 (omega.cgi) stopped at [::main:155 ,0x1000d094]
 155  db.add_database(Xapian::Auto::open(map_dbname_to_dir(dbname)));
(dbx) s
Process 1660636 (omega.cgi) stopped at [::map_dbname_to_dir(const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> 
 >&):83 ,0x1000ca40]
  83  return database_dir + dbname;
(dbx) p database_dir
class 
basic_string__pt__58_cQ2_3std20char_traits__pt__2_cQ2_3std18allocator__pt__2_c<char,char_traits__pt__2_c<char>,allocator__pt__2_c<char>> 
{
    _M_start = 0x10051238 = "/oasis/db//"
    _M_finish = 0x10051243 = ""
    _M_end_of_storage = 0x1005124d = ""
}
(dbx) p *dbname
class 
basic_string__pt__58_cQ2_3std20char_traits__pt__2_cQ2_3std18allocator__pt__2_c<char,char_traits__pt__2_c<char>,allocator__pt__2_c<char>> 
{
    _M_start = 0x100503b8 = "default"
    _M_finish = 0x100503bf = ""
    _M_end_of_storage = 0x100503c0 = "query"
}
Here's the code:

  78  bool collapse = false;
    79 
    80  static string
    81  map_dbname_to_dir(const string &dbname)
    82  {
 *  83      return database_dir + dbname;
    84  }

Something doesn't look right to me, but I'm not a C++ expert.

Jim.
I find this kind of interesting too:

[3] Process 1661228 (omega.cgi) stopped at [::main:155 ,0x1000d094]
 155  db.add_database(Xapian::Auto::open(map_dbname_to_dir(dbname)));
(dbx) p dbname
class 
basic_string__pt__58_cQ2_3std20char_traits__pt__2_cQ2_3std18allocator__pt__2_c<char,char_traits__pt__2_c<char>,allocator__pt__2_c<char>> 
{
    _M_start = 0x100503b8 = "default"
    _M_finish = 0x100503bf = ""
    _M_end_of_storage = 0x100503c0 = "query"
}
 (That is before I step into the map_dbname_to_dir method)

Olly Betts wrote:

>On Wed, Sep 01, 2004 at 06:46:37PM +0100, Olly Betts wrote:
>  
>
>>On Wed, Sep 01, 2004 at 01:40:31PM -0400, Jim Lynch wrote:
>>    
>>
>>>Fixed.  The database directories weren't open for "other" read/execute 
>>>access. 
>>>      
>>>
>>Aha!  We should handle this case better - I'll address that.
>>    
>>
>
>Using GCC on Linux, I don't get an exception.  Instead I get "Searching
>0 documents" (not ideal, but at least cleaner).
>
>Hmm, I wonder if we're dividing by zero or similar somewhere when trying
>to use a Database object with no databases inside it.  Perhaps GCC is
>giving NaN while SGI's CC throws an exception.
>
>Are you able to run this under a debugger and find out where the
>exception originates from?
>
>  
>
>>>>What do you mean by "run it from the command line with no parameters"
>>>>exactly?  How does that differ from what you describe below?
>>>>        
>>>>
>>>No input lines at all.
>>>      
>>>
>>Oh, I see.  This may be a separate problem then.  I'll take a look.
>>    
>>
>
>Jim pointed out in a private mail that he has no default database, so
>it's probably actually the same issue.
>
>Cheers,
>    Olly
>
>_______________________________________________
>Xapian-discuss mailing list
>Xapian-discuss at lists.xapian.org
>http://lists.xapian.org/mailman/listinfo/xapian-discuss
>  
>




More information about the Xapian-discuss mailing list