PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Application gone after power on
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Application gone after power on
![]() |
Application gone after power on |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I'm having a strange and almost undebuggable program. During my
development, my PDA (a Socket SoMo, and previously an HP) is generally sitting in the cradle and it's powered through the night, so when I come back in the morning the application is still running and everything is fine. However, our sales people take out the PDAs now and the product is beginning to sell. Customers and salesfolk are finding that occasionally (once every 50 times or so) when the PDA is powered down, they power it up and find that the application is just not there. No exception or anything. It's just gone. Since the application disables the taskbar and it starts up automatically, this generally means they are sitting at the today screen and can't do anything. As a temporary fix, I will write a secondary application that keeps checking every 5 seconds (or on power up) that the primary application is running and restarts it if it isn't.. but does anyone know how I can try to track this problem, or if it has been seen before. Any help would be appreciated. Taha |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Try adding logging to the application. Persist any shut down or exceptions
to file. Make sure you write the stack strace for exceptions, then when you experience this issue, you should be able to track it down. Regards, Rick D. "ataha" wrote: > I'm having a strange and almost undebuggable program. During my > development, my PDA (a Socket SoMo, and previously an HP) is generally > sitting in the cradle and it's powered through the night, so when I > come back in the morning the application is still running and > everything is fine. > > However, our sales people take out the PDAs now and the product is > beginning to sell. Customers and salesfolk are finding that > occasionally (once every 50 times or so) when the PDA is powered down, > they power it up and find that the application is just not there. No > exception or anything. It's just gone. Since the application disables > the taskbar and it starts up automatically, this generally means they > are sitting at the today screen and can't do anything. As a temporary > fix, I will write a secondary application that keeps checking every 5 > seconds (or on power up) that the primary application is running and > restarts it if it isn't.. but does anyone know how I can try to track > this problem, or if it has been seen before. > > Any help would be appreciated. > Taha > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Where is the EXE stored? I don't know anything about those particular
devices, but, if you're storing the application in the RAM filesystem, of course, if the battery dies, it's gone. That would be my first guess. You might also check, perhaps by writing some values to the registry, whether the registry is also going away at the same time. Paul T. "ataha" <ataha13@gmail.com> wrote in message news:c084a952-17fc-4f38-8d22-0a77a082ed0d@8g2000hsu.googlegroups.com... > I'm having a strange and almost undebuggable program. During my > development, my PDA (a Socket SoMo, and previously an HP) is generally > sitting in the cradle and it's powered through the night, so when I > come back in the morning the application is still running and > everything is fine. > > However, our sales people take out the PDAs now and the product is > beginning to sell. Customers and salesfolk are finding that > occasionally (once every 50 times or so) when the PDA is powered down, > they power it up and find that the application is just not there. No > exception or anything. It's just gone. Since the application disables > the taskbar and it starts up automatically, this generally means they > are sitting at the today screen and can't do anything. As a temporary > fix, I will write a secondary application that keeps checking every 5 > seconds (or on power up) that the primary application is running and > restarts it if it isn't.. but does anyone know how I can try to track > this problem, or if it has been seen before. > > Any help would be appreciated. > Taha |
|
|
|
#4 |
|
Guest
Posts: n/a
|
I have seen this on older devices (older Windows Mobile devices). Not sure
why the OS seems to change the Z order, this is probebly a bug or an application on the device causing it. You'll probebly find it is still running but just hidden, is this the case? and what ver of Windows Mobile do you have. You've put the device model but I can't be arsed to look it up to find out what version it is. -- Simon Hart Visual Developer - Device Application Development MVP http://simonrhart.blogspot.com "ataha" wrote: > I'm having a strange and almost undebuggable program. During my > development, my PDA (a Socket SoMo, and previously an HP) is generally > sitting in the cradle and it's powered through the night, so when I > come back in the morning the application is still running and > everything is fine. > > However, our sales people take out the PDAs now and the product is > beginning to sell. Customers and salesfolk are finding that > occasionally (once every 50 times or so) when the PDA is powered down, > they power it up and find that the application is just not there. No > exception or anything. It's just gone. Since the application disables > the taskbar and it starts up automatically, this generally means they > are sitting at the today screen and can't do anything. As a temporary > fix, I will write a secondary application that keeps checking every 5 > seconds (or on power up) that the primary application is running and > restarts it if it isn't.. but does anyone know how I can try to track > this problem, or if it has been seen before. > > Any help would be appreciated. > Taha > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
On Apr 16, 11:16 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote: > Where is the EXE stored? I don't know anything about those particular > devices, but, if you're storing the application in the RAM filesystem, of > course, if the battery dies, it's gone. That would be my first guess. You > might also check, perhaps by writing some values to the registry, whether > the registry is also going away at the same time. > > Paul T. > > "ataha" <atah...@gmail.com> wrote in message > > news:c084a952-17fc-4f38-8d22-0a77a082ed0d@8g2000hsu.googlegroups.com... > > > I'm having a strange and almost undebuggable program. During my > > development, my PDA (a Socket SoMo, and previously an HP) is generally > > sitting in the cradle and it's powered through the night, so when I > > come back in the morning the application is still running and > > everything is fine. > > > However, our sales people take out the PDAs now and the product is > > beginning to sell. Customers and salesfolk are finding that > > occasionally (once every 50 times or so) when the PDA is powered down, > > they power it up and find that the application is just not there. No > > exception or anything. It's just gone. Since the application disables > > the taskbar and it starts up automatically, this generally means they > > are sitting at the today screen and can't do anything. As a temporary > > fix, I will write a secondary application that keeps checking every 5 > > seconds (or on power up) that the primary application is running and > > restarts it if it isn't.. but does anyone know how I can try to track > > this problem, or if it has been seen before. > > > Any help would be appreciated. > > Taha Paul: I don't mean a total power drainage of the device, I mean just a simple power off, power on, sometimes with a few days in between. Does the ability of the PDA to reload the running application somehow degrade with time? Or does it depend on how much the device gets knocked around? The registry settings are still intact, because I set some of them in the application and they seem fine even after the program has been restarted. Rick: I have given thought to the logfile. It was infact going to be my next step. I'm not sure it would pinpoint the problem, but it would at least point me in the right direction. Taha |
|
|
|
#6 |
|
Guest
Posts: n/a
|
The folks having the problem have installed the EXE on a card - right?
Hilton "ataha" <ataha13@gmail.com> wrote in message news:c084a952-17fc-4f38-8d22-0a77a082ed0d@8g2000hsu.googlegroups.com... > I'm having a strange and almost undebuggable program. During my > development, my PDA (a Socket SoMo, and previously an HP) is generally > sitting in the cradle and it's powered through the night, so when I > come back in the morning the application is still running and > everything is fine. > > However, our sales people take out the PDAs now and the product is > beginning to sell. Customers and salesfolk are finding that > occasionally (once every 50 times or so) when the PDA is powered down, > they power it up and find that the application is just not there. No > exception or anything. It's just gone. Since the application disables > the taskbar and it starts up automatically, this generally means they > are sitting at the today screen and can't do anything. As a temporary > fix, I will write a secondary application that keeps checking every 5 > seconds (or on power up) that the primary application is running and > restarts it if it isn't.. but does anyone know how I can try to track > this problem, or if it has been seen before. > > Any help would be appreciated. > Taha |
|
|
|
#7 |
|
Guest
Posts: n/a
|
On Apr 17, 1:03 am, "Hilton" <nos...@nospam.com> wrote:
> The folks having the problem have installed the EXE on a card - right? > > Hilton Hilton: No it's installed on the device itself. > I have seen this on older devices (older Windows Mobile devices). Not sure > why the OS seems to change the Z order, this is probebly a bug or an > application on the device causing it. You'll probebly find it is still > running but just hidden, is this the case? and what ver of Windows Mobile do > you have. You've put the device model but I can't be arsed to look it up to > find out what version it is. Simon: I'm using Windows Mobile 5.0 on a Socket Mobile SoMo 650. I hadn't thought that it might still be there. I suppose it might. I'll try to make a call to SetForegroundWindow after I detect power on and see if that helps. Sometimes when this happens, the screen that is shown is the File Explorer, and I can restart the application right away. However, it is quite possible that the new app detects that the old app is already running, gives it the foreground and quits (so that only one copy of the app is running). I'll see if that is the case. Thanks Taha |
|
|
|
#8 |
|
Guest
Posts: n/a
|
The RAM filesystem and the registry storage are essentially the same. It's
possible, I guess, that the OS is telling your application to exit to save battery when the device is suspended (I doubt that the power is actually off, ever), and you aren't handling that properly. Paul T. "ataha" <ataha13@gmail.com> wrote in message news:7312dd43-a4f5-493b-bc10-5bd5f0629ebc@s50g2000hsb.googlegroups.com... > On Apr 16, 11:16 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT > no instrument no spam DOT com> wrote: >> Where is the EXE stored? I don't know anything about those particular >> devices, but, if you're storing the application in the RAM filesystem, of >> course, if the battery dies, it's gone. That would be my first guess. >> You >> might also check, perhaps by writing some values to the registry, whether >> the registry is also going away at the same time. >> >> Paul T. >> >> "ataha" <atah...@gmail.com> wrote in message >> >> news:c084a952-17fc-4f38-8d22-0a77a082ed0d@8g2000hsu.googlegroups.com... >> >> > I'm having a strange and almost undebuggable program. During my >> > development, my PDA (a Socket SoMo, and previously an HP) is generally >> > sitting in the cradle and it's powered through the night, so when I >> > come back in the morning the application is still running and >> > everything is fine. >> >> > However, our sales people take out the PDAs now and the product is >> > beginning to sell. Customers and salesfolk are finding that >> > occasionally (once every 50 times or so) when the PDA is powered down, >> > they power it up and find that the application is just not there. No >> > exception or anything. It's just gone. Since the application disables >> > the taskbar and it starts up automatically, this generally means they >> > are sitting at the today screen and can't do anything. As a temporary >> > fix, I will write a secondary application that keeps checking every 5 >> > seconds (or on power up) that the primary application is running and >> > restarts it if it isn't.. but does anyone know how I can try to track >> > this problem, or if it has been seen before. >> >> > Any help would be appreciated. >> > Taha > > Paul: I don't mean a total power drainage of the device, I mean just a > simple power off, power on, sometimes with a few days in between. Does > the ability of the PDA to reload the running application somehow > degrade with time? Or does it depend on how much the device gets > knocked around? The registry settings are still intact, because I set > some of them in the application and they seem fine even after the > program has been restarted. > > Rick: I have given thought to the logfile. It was infact going to be > my next step. I'm not sure it would pinpoint the problem, but it would > at least point me in the right direction. > > Taha |
|
|
|
#9 |
|
Guest
Posts: n/a
|
On Apr 17, 11:05 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote: > The RAM filesystem and the registry storage are essentially the same. It's > possible, I guess, that the OS is telling your application to exit to save > battery when the device is suspended (I doubt that the power is actually > off, ever), and you aren't handling that properly. Hi Tobey. Thanks for your reply. That is an interesting notion. If we assume that your theory is correct and the OS is telling the app to exit, is there any way to prevent my app from exiting? Or should I just try to use something run like cerunappatevent and launch a small application each time at power up that will see if my app is running and start it if it is not? Taha |
|
|
|
#10 |
|
Guest
Posts: n/a
|
I'm not a Windows Mobile expert, except to the extent that it overlaps the
underlying OS, Windows CE. None of our devices, which are used in industrial situations where they are always-on, suspend, so I'm not the best guy to answer this. The log file is the right way to answer the question, I think. Of course, if you can just check the running programs list when the device comes up and appears to be gone, that will tell you something (if there were three apps running, including yours, before the suspend, and now there are none, it's reasonable to assume that at least a soft reboot has occurred; if you're the only one missing, your code is broken and a log is going to be required, I'd think). Read through the information about suspend in the appropriate Windows Mobile SDK and see what you can find. Paul T. "ataha" <ataha13@gmail.com> wrote in message news:5ed48617-5471-4748-aa3f-40e154fd9ad1@b1g2000hsg.googlegroups.com... > On Apr 17, 11:05 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT > no instrument no spam DOT com> wrote: >> The RAM filesystem and the registry storage are essentially the same. >> It's >> possible, I guess, that the OS is telling your application to exit to >> save >> battery when the device is suspended (I doubt that the power is actually >> off, ever), and you aren't handling that properly. > > Hi Tobey. > > Thanks for your reply. That is an interesting notion. If we assume > that your theory is correct and the OS is telling the app to exit, is > there any way to prevent my app from exiting? Or should I just try to > use something run like cerunappatevent and launch a small application > each time at power up that will see if my app is running and start it > if it is not? > > Taha |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

