By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,070 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,070 IT Pros & Developers. It's quick & easy.

Application just run on development-system

P: n/a
Hi,

I just wrote a small simple C# application with a small gui. I was testing
the application continous on my development system. Now i tried to let it
run on another system but it doesn't.
On my system, i start the appl.exe file and the gui appears. there are 4
threads running as the taskmanager shows me. then i click on the start
button and the application starts reading data from a mysql database. the
thread count is going up to 5 and when the connection to the mysql server
happens it goes up to 12. and everything is working normally :-)

On the system on that the application should run i start the appl.exe file.
the gui appaers also with a thread count of 4 in the taskmanager. the the
click on the same button. the thread count goes up to 5 for a short time and
returns to 4. nothing happens anymore. the gui is not frozen, so i can move
it around and so on. some text messages telling me, that the application is
stopping somewhere when it should create a normal object (like Client c =
new Client() ).... What's wrong? Where do i have to search for the problem?
What is the problem?

Thanks for any idea and help

Greetz,
Pascal
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
One option (and often my favorite) is to use remote debugging to connect to
the process on the other machine and be able to step through code on your
development machine to see where things are going.

A far quicker option is to simply throw in some message boxes here and
there, reporting the current location and state of the applications
execution, giving you a high level overview of where the application might be
hanging up. As you learn which paths it is taking and where it is probably
breaking down, you can remove some of the older message boxes and throw in
some new ones.

I would however suggest remote debugging if that is an option for you.

See
http://msdn.microsoft.com/library/de...bugMonitor.asp for some info on how to set it up.

Brendan
"Pascal Frey" wrote:
Hi,

I just wrote a small simple C# application with a small gui. I was testing
the application continous on my development system. Now i tried to let it
run on another system but it doesn't.
On my system, i start the appl.exe file and the gui appears. there are 4
threads running as the taskmanager shows me. then i click on the start
button and the application starts reading data from a mysql database. the
thread count is going up to 5 and when the connection to the mysql server
happens it goes up to 12. and everything is working normally :-)

On the system on that the application should run i start the appl.exe file.
the gui appaers also with a thread count of 4 in the taskmanager. the the
click on the same button. the thread count goes up to 5 for a short time and
returns to 4. nothing happens anymore. the gui is not frozen, so i can move
it around and so on. some text messages telling me, that the application is
stopping somewhere when it should create a normal object (like Client c =
new Client() ).... What's wrong? Where do i have to search for the problem?
What is the problem?

Thanks for any idea and help

Greetz,
Pascal

Nov 17 '05 #2

P: n/a
The problem is solved :-)

at the point where i was creating an instance of the client Client c = new
Client() the thread got an exception, because inside the Client class i was
triying to define some mySQL specific variables like "MySqlConnection". And
on the target machine the library (.dll) was missing.

public class Client {
privavte MySqlConnection con = null;
...
public Client() {}
...

There will be thrown an Exception on the "new()"

Thanx for helping
"Brendan Grant" <Br**********@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
One option (and often my favorite) is to use remote debugging to connect
to
the process on the other machine and be able to step through code on your
development machine to see where things are going.

A far quicker option is to simply throw in some message boxes here and
there, reporting the current location and state of the applications
execution, giving you a high level overview of where the application might
be
hanging up. As you learn which paths it is taking and where it is probably
breaking down, you can remove some of the older message boxes and throw in
some new ones.

I would however suggest remote debugging if that is an option for you.

See
http://msdn.microsoft.com/library/de...bugMonitor.asp
for some info on how to set it up.

Brendan
"Pascal Frey" wrote:
Hi,

I just wrote a small simple C# application with a small gui. I was
testing
the application continous on my development system. Now i tried to let it
run on another system but it doesn't.
On my system, i start the appl.exe file and the gui appears. there are 4
threads running as the taskmanager shows me. then i click on the start
button and the application starts reading data from a mysql database. the
thread count is going up to 5 and when the connection to the mysql server
happens it goes up to 12. and everything is working normally :-)

On the system on that the application should run i start the appl.exe
file.
the gui appaers also with a thread count of 4 in the taskmanager. the the
click on the same button. the thread count goes up to 5 for a short time
and
returns to 4. nothing happens anymore. the gui is not frozen, so i can
move
it around and so on. some text messages telling me, that the application
is
stopping somewhere when it should create a normal object (like Client c =
new Client() ).... What's wrong? Where do i have to search for the
problem?
What is the problem?

Thanks for any idea and help

Greetz,
Pascal

Nov 17 '05 #3

P: n/a
hi,

obviously it/s a problem with the 5th thread :)

Probably you are getting an exception but as it happens in a worker thread
your app does not finish cause of it.

first of all, use a try/catch in that thread, then either create a log with
this piece of code:
catch( Exception ex)
{
using ( EventLog e= new EventLog("Application",".","CTPWeb") )
{
e.WriteEntry("Error : " + ex.Message + " ST : " + ex.StackTrace,
EventLogEntryType.Error);
}
}

or maybe display it in the gui ( remember to use Control.Invoke )

probably you have issues connecting to the SQL server
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Pascal Frey" <sk*****@earthling.net> wrote in message
news:42**********************@news.sunrise.ch...
Hi,

I just wrote a small simple C# application with a small gui. I was testing
the application continous on my development system. Now i tried to let it
run on another system but it doesn't.
On my system, i start the appl.exe file and the gui appears. there are 4
threads running as the taskmanager shows me. then i click on the start
button and the application starts reading data from a mysql database. the
thread count is going up to 5 and when the connection to the mysql server
happens it goes up to 12. and everything is working normally :-)

On the system on that the application should run i start the appl.exe
file. the gui appaers also with a thread count of 4 in the taskmanager.
the the click on the same button. the thread count goes up to 5 for a
short time and returns to 4. nothing happens anymore. the gui is not
frozen, so i can move it around and so on. some text messages telling me,
that the application is stopping somewhere when it should create a normal
object (like Client c = new Client() ).... What's wrong? Where do i have
to search for the problem? What is the problem?

Thanks for any idea and help

Greetz,
Pascal

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.