[CS241] [CSCI2410] Possible Confirmation

Lenora Huang lenorah at cs.brown.edu
Mon Dec 17 01:42:44 EST 2007


Hi, Joseph. 
Yes, ECTree:init() and stripInit() have to be called before ECTree is used.
I added these two lines right before fcps.extract_features() is called in main of extract_features.cc. 

Lenora

-----Original Message-----
From: cs241-bounces at list.cs.brown.edu [mailto:cs241-bounces at list.cs.brown.edu] On Behalf Of Joseph Browne
Sent: Monday, December 17, 2007 1:21 AM
To: CSCI2410
Subject: [CS241] [CSCI2410] Possible Confirmation

After another crash (someone logged me off) I was able to run the program again with debug flags on.  Looking at the following stack trace, it seems that the problem is indeed in makeECTree and that, more specifically, it has to do with Eugene's SymbolMap (I think it is a static object called gst) not being initialized correctly.  Look at the function call for the third frame -- toIndex() is being called on a null pointer...

#0  0x0804ae44 in std::_Rb_tree<std::string, std::pair<std::string const, unsigned int>, std::_Select1st<std::pair<std::string const, unsigned int> >, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned int> > >::_M_begin (this=0x8)
    at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:466
#1  0x0804b2e5 in std::_Rb_tree<std::string, std::pair<std::string const, unsigned int>, std::_Select1st<std::pair<std::string const, unsigned int> >, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned int> > >::find (this=0x8, __k=@0xbfc16584)
    at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:1313
#2  0x0804b405 in std::map<std::string, unsigned int, std::less<std::string>, std::allocator<std::pair<std::string const, unsigned int> > >::find (this=0x8, __x=@0xbfc16584) at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_map.h:534
#3  0x0804d0f4 in SymbolTable::toIndex (this=0x0, s=@0xbfc16584) at SymbolTable.h:36
#4  0x08095f18 in makeECTree (other=0xb7c92350) at ECTree.C:390

I am going to try to make an addition by modifiying extract-spfeatures.cc to initialize Eugene's Tree by calling ECTree::init(false, false) in the main function... we will see if this helps.

-Joseph


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr
_______________________________________________
CS241 mailing list
CS241 at list.cs.brown.edu
http://list.cs.brown.edu/mailman/listinfo/cs241



More information about the CS241 mailing list