|
|
|
|||||
|
Get "Assertion failed" in ConnectionMonitor.cpp, with Ice-3.0.1-VC80
I get a problem in my VC++ code:
"Assertion failed! File: .\ConnectionMonitor.cpp Line: 65 Expression: !_instance version: Ice-3.0.1-VC80 platform: Win XP SP2 compile: VS 2005 code: I want to test how many clients can my server support, In the class VDClient ======= bool VDClient::InitClient(string strMac, string strServerIP, string strPort = "10040", string strTimeout = "5000") { try { int argc = 0; //Ice::InitializationData initData; Ice::PropertiesPtr properties = Ice::createProperties(); // // Set a default value for "Hello.Proxy" so that the demo will // run without a configuration file. // m_strMac = strMac; string strVDSrvProxy = "VDSrvCtrl:tcp -h "; strVDSrvProxy += strServerIP; strVDSrvProxy += " -p " + strPort; strVDSrvProxy += " -t " + strTimeout; properties->setProperty("VDSrv.Proxy", strVDSrvProxy); properties->setProperty("Client.Endpoionts", "tcp"); //initData.properties->setProperty("Ice.ThreadPool.Client.Size", "5"); //initData.properties->setProperty("Ice.ThreadPool.Client.SizeMax", "10"); communicator = Ice::initializeWithProperties(argc, 0, properties); VDPrx = VD::VDSrvPrx::checkedCast(communicator->stringToProxy (properties->getProperty("VDSrv.Proxy"))); if(!VDPrx) { string err = "ErrorMessage"; GlobalFunc::instance()->PrintMessage(err); return false; } std::string _uuid = IceUtil::generateUUID(); ident.name = _uuid; ident.category = ""; clientAdapter = communicator->createObjectAdapter(properties- >getProperty("Client")); ptrVDClient = new VDClientProxyI(); clientAdapter->add(ptrVDClient, ident); clientAdapter->activate(); VDPrx->ice_connection()->setAdapter(clientAdapter); return true; } catch(const Ice::Exception& ex) { ostringstream ostr; ostr << ex; string s = ostr.str(); string err = "Error:" + s; VDPrx = NULL; GlobalFunc::instance()->PrintMessage(err); return false; } catch (...) { VDPrx = NULL; GlobalFunc::instance()->PrintMessage("Error"); return false; } } ========= =========== for (int i = 0; i < MaxClientNum; i++) { VDClient* pVD = new VDClient(); pVD->InitClient("8888", "192.168.101.87", "10040", "5000"); DoSomething(); delete pVD; pVD = NULL; } =========== when MaxClientNum is 1000 or larger, I get the above problem, how can i fix it, Thanks! VDSrv.ice =========== #ifndef VD_ICE_PC #define VD_ICE_PC #include <Ice/Identity.ice> #include <Ice/BuiltinSequences.ice> module MapC { dictionary<string, string> Context; }; module VD { interface VDSrv { MapC::Context RequestToServer(); void HeartBeatRegister(Ice::Identity ident); }; }; #endif ================ VDClientProxy.ice ==================== #ifndef VDClient_ICE_PC #define VDClient_ICE_PC #include <Ice/Identity.ice> #include <Ice/BuiltinSequences.ice> module VDProxy { interface VDClientProxy { void SendMessage(); }; }; #endif ================ |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Don't "Ice-3.1.1-VC71.msi " include the "slice2java.exe"? | Jason Gao | Help Center | 4 | 10-26-2006 11:23 AM |
| Debug Assertion Failed! ... Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)". | ablo_zhou | Help Center | 1 | 07-27-2006 04:05 AM |
| "Invalid UTF8 string" when transer chinese chars between cpp server and csharp client | raygo | Help Center | 8 | 03-21-2006 08:34 PM |
| "Assertion Failed" on Communicator.Destroy | DeepDiver | Help Center | 11 | 09-20-2005 03:12 AM |
| Going from "in" to "out" param, using a class as a union | catalin | Help Center | 1 | 04-05-2004 08:55 AM |