process.start gives stackoverflowexception.

  • Thread starter Thread starter archana
  • Start date Start date
A

archana

Hiall

i have derived class from process class and implemented one method in
that i am starting process using this.start.

Its giving me stackoverflowexception. Can anyone tell me why?

please help me asap.

thanks in advance.
 
Can you post any code at all? Specifically around the Start() method?
Are you calling the Start() method, etc? Anything like this?

I'm not convinced that this class is really intended to be inherited;
the only virtual methods it exposes come from Component - what are you
trying to do here?

Marc
 
archana said:
i have derived class from process class and implemented one method in
that i am starting process using this.start.

Its giving me stackoverflowexception. Can anyone tell me why?

Not without seeing your code - other than that it's very likely that
your method is either calling itself or calling another method which is
calling back to your method.
 
i am starting process using this.start.

does it look like this, perchance?

public void Start() { // might be declared "new"
// something
this.Start();
// something
}

This will explode with a stack overflow. Either call base.Start() or
pick another name. Or better - *contain* a Process, don't *inherit*
from one - i.e. have a wrapper object that internally uses a Process
instance.

Marc
 
Hi marc,

thanks for reply.

I am using same code which u have given. thanks for giving
alternative. I will try calling base.start.

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top