Windows Vista Tips

Windows Vista Tips > Newsgroups > ActiveSync > Application exits unexpectedly and without errors

Reply
Thread Tools Display Modes

Application exits unexpectedly and without errors

 
 
Ricardo
Guest
Posts: n/a

 
      04-11-2006
Hi. I'm trying to solve a very strange problem. I have a windows forms
application that makes calls to a web service. When the web service method is
invoked, it is executed without exceptions on the web service side. When this
method returns, the application exits without exceptions. It simply closes
with error 0 (success).
Other methods of the webservice are called before this problematic method
without problems.

Another strange behaviour: if I am debugging the application, it ends on the
initialization when I call the problematic webservice method. But if I run
the executable itself (without debugging), the application starts (the
problematic method works) but it fails on another webservice method invoked
on a button click.

The windows forms application looks like this:

public void Main()
{
try
{
webService.NormalMethod1();
webService.NormalMethod2();
webService.ProblematicMethod1(); //returns a DataSet with one table
and one row
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

private void button_Click(object sender, EventArgs e)
{
try
{
webService.NormalMethod3();
webService.ProblematicMethod2(); //returns a string
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

As I said, if I am debugging, after the webService.ProblematicMethod1()
method is called the application ends. If I run the executable itself
webService.ProblematicMethod1() works and when the button is clicked,
webService.ProblematicMethod2() makes the application terminate. In both
cases, the catch block is never reached (the MessageBox is never shown). I've
created a event handler for the Application.ThreadException event but it is
never invoked.

The windows application also communicates with mobile devices through
ActiveSync. The described problem only occurs when devices running Windows
Mobile 5.0 are connected. It works fine with older devices. In my point of
view, the PDA should not affect the windows application since what's involved
in this piece of code is only the web service.

I don't know what to do and I need to solve this problem as soon as
possible. Any suggestions will be greatly appreciated.

Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59