1 | Hello! I have an exception at this point
|
---|
2 | I use VC++ 2005.
|
---|
3 | See ** line.
|
---|
4 |
|
---|
5 | This function (CTradeHourScheduler::IniFileName()) is used many time in the my code. No any errors while
|
---|
6 | programm init or while I use boost::RegEx in a programm flow.
|
---|
7 |
|
---|
8 | But, I see an exception when I create boost::RegEx while destructuor of some object is called.
|
---|
9 | "Unhandled exception at 0x00470301 in TQServerII.exe: 0xC0000005: Access violation reading location 0x00000004."
|
---|
10 |
|
---|
11 | Can I use boost::RegEx in destructon? Thank you!
|
---|
12 |
|
---|
13 | Boris.
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 | CString CTradeHourScheduler::IniFileName(){
|
---|
18 | TCHAR cTmpBuff[2000]={0};
|
---|
19 |
|
---|
20 | GetModuleFileName(NULL,cTmpBuff,2000);
|
---|
21 | CString sAppPath=cTmpBuff;
|
---|
22 |
|
---|
23 | boost::RegEx Sometest;
|
---|
24 | ** Sometest.SetExpression(CT2A(_T("^(.*)\\\\[^\\\\]+$"))); I have got an exception at this point while it is called from destructor
|
---|
25 | // std::string
|
---|
26 | CString strAppDir;
|
---|
27 | Sometest.Match(CT2A(cTmpBuff));
|
---|
28 | ....
|
---|
29 | }
|
---|
30 |
|
---|
31 | Debugger call sack is here:
|
---|
32 |
|
---|
33 | TQServerII.exe!std::_Tree<std::_Tmap_traits<unsigned long,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1> > >,0> >::_Lbound(const unsigned long & _Keyval=1049) Line 1170 + 0x8 bytes C++
|
---|
34 | TQServerII.exe!std::_Tree<std::_Tmap_traits<unsigned long,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1> > >,0> >::lower_bound(const unsigned long & _Keyval=1049) Line 987 + 0x10 bytes C++
|
---|
35 | TQServerII.exe!std::_Tree<std::_Tmap_traits<unsigned long,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::list<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *>,std::allocator<std::pair<boost::shared_ptr<boost::re_detail::w32_regex_traits_implementation<char> const >,unsigned long const *> > >::_Iterator<1> > >,0> >::find(const unsigned long & _Keyval=1049) Line 961 + 0x10 bytes C++
|
---|
36 | TQServerII.exe!boost::object_cache<unsigned long,boost::re_detail::w32_regex_traits_implementation<char> >::do_get(const unsigned long & k=1049, unsigned int max_cache_size=5) Line 92 + 0x12 bytes C++
|
---|
37 | > TQServerII.exe!boost::object_cache<unsigned long,boost::re_detail::w32_regex_traits_implementation<char> >::get(const unsigned long & k=1049, unsigned int max_cache_size=5) Line 69 + 0x11 bytes C++
|
---|
38 | TQServerII.exe!boost::re_detail::create_w32_regex_traits<char>(unsigned long l=1049) Line 554 + 0xf bytes C++
|
---|
39 | TQServerII.exe!boost::w32_regex_traits<char>::w32_regex_traits<char>() Line 573 + 0x16 bytes C++
|
---|
40 | TQServerII.exe!boost::regex_traits<char,boost::w32_regex_traits<char> >::regex_traits<char,boost::w32_regex_traits<char> >() Line 75 + 0xf bytes C++
|
---|
41 | TQServerII.exe!boost::regex_traits_wrapper<boost::regex_traits<char,boost::w32_regex_traits<char> > >::regex_traits_wrapper<boost::regex_traits<char,boost::w32_regex_traits<char> > >() Line 169 + 0xf bytes C++
|
---|
42 | TQServerII.exe!boost::re_detail::regex_data<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::regex_data<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >() Line 61 + 0x4a bytes C++
|
---|
43 | TQServerII.exe!boost::re_detail::basic_regex_implementation<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::basic_regex_implementation<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >() Line 93 + 0xf bytes C++
|
---|
44 | TQServerII.exe!boost::basic_regex<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::do_assign(const char * p1=0x0012ede0, const char * p2=0x0012edee, unsigned int f=262144) Line 525 + 0x22 bytes C++
|
---|
45 | TQServerII.exe!boost::basic_regex<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::assign(const char * p1=0x0012ede0, const char * p2=0x0012edee, unsigned int f=262144) Line 263 C++
|
---|
46 | TQServerII.exe!boost::basic_regex<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::assign(const char * p=0x0012ede0, unsigned int f=262144) Line 248 C++
|
---|
47 | TQServerII.exe!boost::basic_regex<char,boost::regex_traits<char,boost::w32_regex_traits<char> > >::set_expression(const char * p=0x0012ede0, unsigned int f=0) Line 467 C++
|
---|
48 | TQServerII.exe!boost::RegEx::SetExpression(const char * p=0x0012ede0, bool icase=false) Line 177 + 0x13 bytes C++
|
---|
49 | *** TQServerII.exe!CTradeHourScheduler::IniFileName() Line 81 + 0x3f bytes C++
|
---|
50 | TQServerII.exe!CTradeHourScheduler::SaveData() Line 28 + 0xc bytes C++
|
---|
51 | TQServerII.exe!CTradeHourScheduler::~CTradeHourScheduler() Line 25 C++
|
---|
52 | TQServerII.exe!CTradeHourScheduler::`scalar deleting destructor'() + 0xf bytes C++
|
---|
53 | TQServerII.exe!CTQServerIIApp::~CTQServerIIApp() Line 104 + 0x22 bytes C++
|
---|
54 | TQServerII.exe!`dynamic atexit destructor for 'theApp''() + 0xd bytes C++
|
---|
55 | msvcr80d.dll!doexit(int code=20, int quick=0, int retcaller=0) Line 553 C
|
---|
56 | msvcr80d.dll!exit(int code=20) Line 398 + 0xd bytes C
|
---|
57 | TQServerII.exe!__tmainCRTStartup() Line 610 C
|
---|
58 | TQServerII.exe!wWinMainCRTStartup() Line 414 C
|
---|
59 | KERNEL32.DLL!7c4e87f5()
|
---|
60 | [Frames below may be incorrect and/or missing, no symbols loaded for KERNEL32.DLL]
|
---|