Having to restart the emulator

S

Stuart Celarier

I am pretty certain that I use to launch the emulator for a PPC app by
running my app from VS.NET 2003 (F5 or Ctrl+F5). Then I would close the
app in the emulator, change some code in the app, run again from VS.NET
and have the new app download and run in the emulator.

Now when I try that, the first run works fine. Then I close the app in
the emulator, change some code in the app, and try to run. The VS.NET
Output window displays

Build: 1 succeeded, 0 failed, 0 skipped
Deploy: 0 succeeded, 1 failed, 0 skipped

No deploy, no app, no fun.

I have to turn off the emulator (saving state won't do), and then I can
run the app which restarts the emulator. That is getting to be a pain.

One thing that's changed in my environment is that I've installed Norton
Internet Security 2005 (antivirus, firewall, etc.), but I haven't been
able to make a direct connection between that and my problem.

Ring any bells?

Cheers,
Stuart Celarier, Fern Creek
 
J

Jan Yeh_eMVP

Hi, Stuart

Can you confirm if there is a sentence "share violation" shown
above "Build: 1 succeeded, 0 failed, 0 skipped" ?

If it's share violation, that means your application was not completely
terminated. Sometimes it's because you have some hidden forms, or
running worker thread... , and what you did is just close the visible form.
That becames no visible forms available, but program is still running...

Then you can inspect your code to see if any resource is not released
or closed when you close the application.

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh
 
S

Stuart Celarier

Nope, no share violation. It would be helpful if VS.NET reported
anything about why the deployment failed.

Cheers,
Stuart Celarier, Fern Creek

-----Original Message-----
From: Jan Yeh_eMVP [mailto:[email protected]]
Posted At: Friday, December 10, 2004 10:43 AM
Posted To: microsoft.public.dotnet.framework.compactframework
Conversation: Having to restart the emulator
Subject: Re: Having to restart the emulator

Hi, Stuart

Can you confirm if there is a sentence "share violation" shown
above "Build: 1 succeeded, 0 failed, 0 skipped" ?

If it's share violation, that means your application was not completely
terminated. Sometimes it's because you have some hidden forms, or
running worker thread... , and what you did is just close the visible
form.
That becames no visible forms available, but program is still running...

Then you can inspect your code to see if any resource is not released
or closed when you close the application.

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh
 
J

Jan Yeh_eMVP

Hi, Stuart

You can try to use CE Process Viewer (CEPVIEW.EXE) to monitor if your
program really terminated after your first closing the app.

If you still see your application name in the process list, that means what
I
mentioned in last mail. There must be a hidden form or unterminated thread
are still working.

Let us know what is the result...

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh

Stuart Celarier said:
Nope, no share violation. It would be helpful if VS.NET reported
anything about why the deployment failed.

Cheers,
Stuart Celarier, Fern Creek

-----Original Message-----
From: Jan Yeh_eMVP [mailto:[email protected]]
Posted At: Friday, December 10, 2004 10:43 AM
Posted To: microsoft.public.dotnet.framework.compactframework
Conversation: Having to restart the emulator
Subject: Re: Having to restart the emulator

Hi, Stuart

Can you confirm if there is a sentence "share violation" shown
above "Build: 1 succeeded, 0 failed, 0 skipped" ?

If it's share violation, that means your application was not completely
terminated. Sometimes it's because you have some hidden forms, or
running worker thread... , and what you did is just close the visible
form.
That becames no visible forms available, but program is still running...

Then you can inspect your code to see if any resource is not released
or closed when you close the application.

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh


Stuart Celarier said:
I am pretty certain that I use to launch the emulator for a PPC app by
running my app from VS.NET 2003 (F5 or Ctrl+F5). Then I would close the
app in the emulator, change some code in the app, run again from VS.NET
and have the new app download and run in the emulator.

Now when I try that, the first run works fine. Then I close the app in
the emulator, change some code in the app, and try to run. The VS.NET
Output window displays

Build: 1 succeeded, 0 failed, 0 skipped
Deploy: 0 succeeded, 1 failed, 0 skipped

No deploy, no app, no fun.

I have to turn off the emulator (saving state won't do), and then I can
run the app which restarts the emulator. That is getting to be a pain.

One thing that's changed in my environment is that I've installed Norton
Internet Security 2005 (antivirus, firewall, etc.), but I haven't been
able to make a direct connection between that and my problem.

Ring any bells?

Cheers,
Stuart Celarier, Fern Creek
 
S

Stuart Celarier

Jan said:
You can try to use CE Process Viewer (CEPVIEW.EXE) to monitor if your
program really terminated after your first closing the app.

Is it possible to use cepview on a Pocket PC application running in the
emulator? I couldn't figure it out. Show me the way.

Here are more detailed steps to reproduce.

Start VS.NET 2003, create new C# project with the Smart Device
Application template. Select Pocket PC and Windows Application. Don't
modify the code. Compile and Start Without Debugging (Ctrl+F5). When the
emulator starts and the application executes, close the application with
the X button. In VS.NET 2003, press Ctrl+F5 again to start a second
time. The output window displays a deployment error:

Build: 1 succeeded, 0 failed, 0 skipped
Deploy: 0 succeeded, 1 failed, 0 skipped

The situation cannot be cleared except turning off the emulator (don't
save state).

Alternate sequence: Instead of Starting Without Debugging, Start the
application (F5), then close the application with the X button. In
VS.NET, the application is still shown as executing, according to the
Debug toolbar. I can select Stop Debugging from the toolbar, and then
press F5 or Ctrl+F5 to restart the application. However, once Ctrl+F5 is
used, the deploy error will occur on all subsequent tries to Start or
Start Without Debugging.

Any more clues?

Cheers,
Stuart Celarier, Fern Creek
 
S

Stuart Celarier

Update: multiple Start Without Debugging works just fine on a Window CE
WinForms app in the Windows CE .NET Emulator. It fails on a Pocket PC
WinForms app in the Pocket PC 2002 Emulator. This is a pretty new
reinstall of VS.NET etc., do I have the latest Pocket PC emulator?

-----Original Message-----
From: Stuart Celarier [mailto:[email protected]]
Posted At: Tuesday, December 14, 2004 10:41 PM
Posted To: microsoft.public.dotnet.framework.compactframework
Conversation: Having to restart the emulator
Subject: Re: Having to restart the emulator
You can try to use CE Process Viewer (CEPVIEW.EXE) to monitor if your
program really terminated after your first closing the app.

Is it possible to use cepview on a Pocket PC application running in the
emulator? I couldn't figure it out. Show me the way.

Here are more detailed steps to reproduce.

Start VS.NET 2003, create new C# project with the Smart Device
Application template. Select Pocket PC and Windows Application. Don't
modify the code. Compile and Start Without Debugging (Ctrl+F5). When the
emulator starts and the application executes, close the application with
the X button. In VS.NET 2003, press Ctrl+F5 again to start a second
time. The output window displays a deployment error:

Build: 1 succeeded, 0 failed, 0 skipped
Deploy: 0 succeeded, 1 failed, 0 skipped

The situation cannot be cleared except turning off the emulator (don't
save state).

Alternate sequence: Instead of Starting Without Debugging, Start the
application (F5), then close the application with the X button. In
VS.NET, the application is still shown as executing, according to the
Debug toolbar. I can select Stop Debugging from the toolbar, and then
press F5 or Ctrl+F5 to restart the application. However, once Ctrl+F5 is
used, the deploy error will occur on all subsequent tries to Start or
Start Without Debugging.

Any more clues?

Cheers,
Stuart Celarier, Fern Creek
 
J

Jan Yeh_eMVP

Hi, Stuart

You said that you press the X button at the upper right corner.
That's the point...
The X button is "Minimize" in PPC, and "Close" in WinCE.
So, you have to set the Form.MinimizeBox = false, then
you will see "ok" at the upper right corner, where will close
your program instead of minimize it.

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
Web - http://www.mobilemind.com.tw , Blog - http://blog.mvpcn.net/janyeh
 

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

Top