Hello,

 

I am having an issue using the regex library.  I am developing in VC7 and this issue occurs with both Boost 1.33.0 and 1.33.1.  I have recently tried to start retrieving capture information in the regex matches by using the match_result and sub_match classes.  In order to use these classes, the compile flag BOOST_REGEX_MATCH_EXTRA is required to be turned on (enabled in user.hpp).  With the library is built with this flag on, I will get the following trap when the method calling regex_match() returns.

 

An unhandled exception of type 'System.NullReferenceException' occurred in tg12.exe

 

Additional information: Object reference not set to an instance of an object

 

This exception appears to occur in the cleanup logic of the ~match_results() destructor.  I have yet to make any changes to the code to use the match_results object.  In other words, the code I am using worked previously without the BOOST_REGEX_MATCH_EXTRA flag enabled.  Are there any compiler options required?

 

The stack trace is below. 

 

Thanks, Marty

 

 

 

>            DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::_Tidy()  Line 797 + 0x3 C++

             DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::~vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >()  Line 389         C++

             DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::`scalar deleting destructor'()  + 0xf         C++

             DtmfGrammarManager.dll!boost::checked_delete<std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > > >(std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > > * x=0x00baadf0)  Line 34 + 0x1c          C++

             DtmfGrammarManager.dll!boost::scoped_ptr<std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > > >::~scoped_ptr<std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > > >()  Line 77 + 0xb          C++

            DtmfGrammarManager.dll!boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>::~sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>()  + 0x12    C++

            DtmfGrammarManager.dll!boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>::`scalar deleting destructor'()  + 0xf    C++

             DtmfGrammarManager.dll!std::_Destroy<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> >(boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _Ptr=0x008d8428)  Line 50          C++

             DtmfGrammarManager.dll!std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> >::destroy(boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _Ptr=0x008d8428)  Line 152 + 0x9          C++

             DtmfGrammarManager.dll!std::_Destroy_range<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >(boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _First=0x008d8428, boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _Last=0x008d8988, std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > & _Al={...}, std::_Nonscalar_ptr_iterator_tag __formal={...})  Line 226 + 0xc      C++

             DtmfGrammarManager.dll!std::_Destroy_range<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >(boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _First=0x008d8428, boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _Last=0x008d8988, std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > & _Al={...})  Line 217 + 0x28      C++

             DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::_Destroy(boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _First=0x008d8428, boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> * _Last=0x008d8988)  Line 787 + 0x11 C++

             DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::_Tidy()  Line 795           C++

             DtmfGrammarManager.dll!std::vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::~vector<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator>,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >()  Line 389         C++

            DtmfGrammarManager.dll!boost::match_results<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >::~match_results<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator,std::allocator<boost::sub_match<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::const_iterator> > >()  Line 74 + 0x3d           C++

            DtmfGrammarManager.dll!CDtmfGrammar_custom::check(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & inputData={...}, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & currentInput={...}, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * pResultValue=0x0012ea9c, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & termcharArg={...})  Line 949 + 0x19      C++

            DtmfGrammarManager.dll!CDtmfGrammarManager::inputUpdate(const char * utterancePortionArg=0x00406e2c)  Line 200 + 0x3b           C++

            mscorwks.dll!7925de73()        

            tg12.exe!feedInput(char* iArg = 0x00406e2c, char* termcharArg = 0x00406e28) Line 22 + 0x1e bytes            C++

            tg12.exe!main(__int32 argc = 1, char** argv = 0x008d8120) Line 309 + 0x10 bytes    C++

            tg12.exe!mainCRTStartup()  Line 398 + 0xe     C

 


Marty Eaves

STAFF SOFTWARE ENGINEER
CALL PROCESSING & MEDIA SERVICES

RESEARCH AND DEVELOPMENT
INTERVOICE, INC.


P: (972) 454-8348
marty.eaves@intervoice.com


Intervoice: Connecting People and Information.

 


This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are the intended recipient, you must treat the information in confidence and in accordance with all laws related to the privacy and confidentiality of such information. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies of this email, including all attachments.