|
«_Superman_» wrote: Antiviruses will target this as a malicious application.
Totally depend upon, what system resource it using!, if it just interacting with some DB, antivirus will do nothing!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Its not interacting with any DB.
"95 processes are started and 96th is not getting started."
Is that related to antivirus? That means antivirus will allow 95 processes and will restrict up to 95?
|
|
|
|
|
No its not related to any antivirus.
Each process will take up a lot of resources.
You're probably running out of it.
Take a look at this blog entry - Pushing the Limits of Windows: Processes and Threads[^]
What I meant about the antivirus is that such behavior is seen mostly in malicious applications and so antiviruses could target such applications.
And so I would never recommend or approve such a design.
|
|
|
|
|
«_Superman_» wrote: Are all processes the same?
If they are the same, you really shouldn't be doing this
I am slightly disagree with this, i am not sure about capibility of Windows 2008 Server r2 and never spawn 100 same process from service.
However, I working/designing an architecture, that will scale Up/Down according workload demand, basically instead on creating thread for each process, I have a controller service, which will spawn the process, to
work independently and process the wrok accordingly.
Basically idea behind the design is intead of stessing on multithreaded architecture, use multiprocess architecture!, if one application crash due some reason, you have atleast same type of application doing similiar work.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I agree with you, but I would be suspicious if 200 processes are created.
It is going to take up too much resources.
|
|
|
|
|
«_Superman_» wrote: I agree with you, but I would be suspicious if 200 processes are created.
It is going to take up too much resources.
yeap i agree, too many process will take too many resources.Also, it's depend how you write your process. Simpler design approch would be, the application should be console based (so we get rid of hugh GDI resources from our progams).
Should have clean architecture and should utilize deadlock prevention techniques!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Cvaji wrote: I am creating 200 process simultaneously
Hi,
Some humble comments:
1.) I would recommend redesigning your application so that it does not require 200 processes to be created. I cannot think of many reasons why this would be necessary. I can think of hundreds of reasons why this would be undesirable.
2.) The number of processes is mostly limited by the amount of RAM available to the OS. Adding more RAM will probably allow more threads/processes.
3.) You should investigate some of the linker options such as "/STACK" and "/HEAP" to minimize application resource usage. Try to minimize the amount of GDI objects and file descriptors used by your application.
4.) If your process is multi-threaded utilize the STACK_SIZE_PARAM_IS_A_RESERVATION creation flag when you create a thread.
Thats all I can think of for now.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi!
When running my application, it suddenly crashes and goes to this line:
m_pBackButton->draw(); . The variable m_pBackButton 's address is:
0x04ea5608. If I set a data break point at this address, the following are the contents:
0x04EA5608 ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee fe ee îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþî
How to run my application without crash?
|
|
|
|
|
T.RATHA KRISHNAN wrote: m_pBackButton->draw();
Are you sure the m_pBackButton is a valid pointer?
|
|
|
|
|
Looks like m_pBackButton is not initialized.
|
|
|
|
|
No. I've initialised inside another function like this:
m_pBackButton = pManager->getGUIEnvironment()->addButton(recti(0,400,192,432), m_pCreditsImage, CREDITS_BACK_BUTTON, L"Back");
|
|
|
|
|
No information here that I can help you with.
I would recommend putting a breakpoint in the addButton function and debugging the code.
Looks like addButton is failing to return a valid pointer.
|
|
|
|
|
If I hover over m_pBackButton during debugging, it has this value :0x0516b488.
|
|
|
|
|
If you put a breakpoint at draw() are you able to step into it?
|
|
|
|
|
If I press F10 0r F11, it just goes to the next line not to the draw() function definition.
|
|
|
|
|
Are you debugging the Release mode?
Otherwise make sure to disable optimization in Project -> Properties -> Configuration Properties -> C/C++ -> Optimization -> Optimization .
|
|
|
|
|
Did u mean Full optimization i.e /Od? There's no Optimization in this Project -> Properties -> Configuration Properties -> C/C++ -> Optimization ->
If I set this, I got the following error:
Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible
|
|
|
|
|
I meant optimization should be /Od.
If optimization is disabled and you're in debug mode, you should be able to step into the draw function by pressing F11 unless the draw function is in another DLL or library.
|
|
|
|
|
I'm in debug only. I misunderstood ur prev. post. It's Irrlicht Engine's function. I can't step into this by pressing F11. If I press F11, control moves to the next line. It's a virtual function and is defined in a file called IGUIElement.h like this:
virtual void draw()
{
if ( isVisible() )
{
core::list<IGUIElement*>::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->draw();
}
}
|
|
|
|
|
Is this the final version?
I mean have you overloaded it?
You could put a breakpoint inside this function and try to debug.
|
|
|
|
|
Not overloaded. I'm calling it with a derived class's object. All the Buttons and other elements are derived from IGUIElement.
|
|
|
|
|
T.RATHA KRISHNAN wrote: When running my application, it suddenly crashes and goes to this line:
You always forget to supply important information while asking a question. A really important information in this case is the exact error message. What does it say exactly ?
|
|
|
|
|
Is it possible you've deleted your pointer elsewhere? If so, NULL your pointer every time you delete it, so you can find this bug more easily.
Or the function that created the pointer did it badly, and returned a pointer to a stack variable. If so, it might work for a while, until the memory got re-used...
The 0x4ea5608 looks like a legitimate pointer value - so it was probably correct, even if only briefly.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Hi,
The data located at your m_pBackButton pointer address is the magic number 0xFEEEFEEE which is used by the MSVC debug heap and this would imply that your m_pBackButton has been deleted.
Best Wishes,
-David Delaune
|
|
|
|
|
Hello,
I am getting this error :
0x80040111 ClassFactory cannot supply requested class
I already done regsvr32 for the C++ ATL dll file.
When I check the registry, I can find the entry at HKEY_CLASSES_ROOT\CLSID.
InProcServer32 has the dll path as the default while threading model is Apartment.
I verified that there are entries in regedit for :
- clsid
- typelib
- event
- interface.
I called the CoInitialize as below :
HRESULT hr_init = ::CoInitialize(NULL);
if (FAILED(hr_init))
{
return E_FAIL;
}
HRESULT hr_init2 = m_spIEventFiringObject.CreateInstance(__uuidof(EventFiringObject_OD));
if (FAILED(hr_init2))
{
return E_FAIL;
}
m_pIEventFiringObjectEventHandler = new IEventFiringObjectEventHandler(*this, m_spIEventFiringObject, &CManualTest::OnEventFiringObjectInvoke);
When I run debug, CWinApp::InitInstance() was successful.
It fails at _AtlModule.DllGetClassObject(rclsid, riid, ppv);
When I run the client software, it fails with ClassFactory cannot supply requested class error.
Your guidance on solving this problem is very much appreciated.
Thanks,
Goutam
|
|
|
|