1

Im trying to develope a program that uses ACE library for networking. When i tried to allocate new ACE_TP_Reactor it crash (program building successfully but when it started to execute dll throw an unhandled exception)

ACE_Reactor_Impl* imp = 0;
imp = new ACE_TP_Reactor();

here is stack:

    GameServer.exe!WorldSocketMgr::StartNetwork(unsigned short port, std::basic_string<char,std::char_traits<char>,std::allocator<char> > & address) Line 103   C++

ace.dll!ACE_TP_Reactor::ACE_TP_Reactor(ACE_Sig_Handler * sh, ACE_Abstract_Timer_Queue<ACE_Event_Handler *> * tq, bool mask_signals, int s_queue) Line 102   C++ <<new ACE_TP_REACTOR

ace.dll!ACE_Select_Reactor_T<ACE_Reactor_Token_T<ACE_Token> >::ACE_Select_Reactor_T<ACE_Reactor_Token_T<ACE_Token> >(ACE_Sig_Handler * sh, ACE_Abstract_Timer_Queue<ACE_Event_Handler *> * tq, int disable_notify_pipe, ACE_Reactor_Notify * notify, bool mask_signals, int s_queue) Line 485   C++

ace.dll!ACE_Select_Reactor_Impl::ACE_Select_Reactor_Impl(bool ms) Line 134  C++

[External Code] 

ace.dll!ACE_Handle_Set::ACE_Handle_Set() Line 95    C++

it crashes when program tried to execute this->reset (); which in

ACE_Handle_Set::ACE_Handle_Set (void)
{
this->reset ();
}

here is the values of stack on ace_handle_set

-  this 0x00ed8e00 {size_=??? max_handle_=??? mask_={fd_count=??? fd_array=0x00ed8e0c {???, ???, ???, ???, ???, ...} } } ACE_Handle_Set *
  size_ <Unable to read memory> 
  max_handle_ <Unable to read memory> 
+  mask_ {fd_count=??? fd_array=0x00ed8e0c {???, ???, ???, ???, ???, ???, ???, ???, ???, ???, ???, ???, ???, ...} } fd_set

Edit: The problem is about all classes about ace for example when i tried to create a ACE_Select_Reactor, ACE_TP_Reactor and etc. it all crashed i think it can be about DLL but i used all libraries and dlls.

thanks for your help.

0sk1
  • 27
  • 1
  • 7

1 Answers1

0

You are not using the ACE Reactor correctly, look at the ACE Programmers Guide, section 7.7, that explains how to use it.

Johnny Willemsen
  • 2,942
  • 1
  • 14
  • 16
  • Thanks for reply can u give me free-internet guide? and please explain it its about ACE_TP_Reactor when i tried to malloc it, it gives a crash what is the wrong thing here? – 0sk1 Jan 06 '16 at 12:49