App unexpectedly closes down after PDA wakes up after standby

RGS

Member
Licensed User
I have developed an app which uses the outlook dll. It intercepts text messages and stores them in a pimcollection in order to be stored with contacts.

I use the following components SMSinterceptor, Formlib, SMS, Contact and Pimcollection.

This application just runs smoothly, does what it should do and is supposed to run in the "background". The strange thing is that as soon as I switch on my PDA decice (after it went to sleep mode or was switched off manuallly) and re-active the window of my application it just closes unexpectedly.

Is this known behaviour or an existing problem? Or is the OS trying to shut down apps?

Thanks for you help in advance.
 
Last edited:

RGS

Member
Licensed User
I managed to scale the code down to:

B4X:
Sub Globals

   
End Sub

Sub App_Start
   FLib.New1("frmMain",B4PObject(1))
   FLib.MinimizeBox = True
   Sms.New2
   Intercept.New1
   Contact.New1
   ContactsCollection.New1("Contacts")
   frmMain.Show
End Sub

Sub Intercept_MessageReceived
   Sms.Value = Intercept.ReceivedMessage
End Sub

- The PDA switches off to stand by (automatically after 1 minute)
- I manually switch it back on
- From task manager I bring the app back to foreground
- And the the app closes ???
 

RGS

Member
Licensed User
I don't actually minimize the application but just start other applications on the foreground so I don't even use the minimize option/button. I'll do some testing without the Formlib (in the hope that I can isolate the problem).
 
Last edited:

RGS

Member
Licensed User
Hi Erel,

Have you managed to reproduce this problem. I'm hoping to get it solved because is holds me from finalizing this application.

EDIT:I'm also working on another software product and it shows the same problem! It is easily reproducible:
- Start the application
- PPC switches off (after 1 min)
- I manually switch
- Bring application to foreground by using the std Taskmanager

and bang, the application just closes. Is this a general problem with basic4ppc or its libraries or .NET? In this way it is not possible to develop robust applications.
I hope I'm wrong.

Richard
 
Last edited:

Ricky D

Well-Known Member
Licensed User
Longtime User
i can't reproduce

Hi.

I tried doing this with my taxi app....

It has several Formlibs and Context menus.

I start it.

I open one of my data tables.

I then run Word

goto the standard Running Programs in Memory in Settings

Activate my app and it shows.

Maybe you should try taking out 1 component at a time to test and see which one is causing this behavior.

regards, Ricky
 

berndgoedecke

Active Member
Licensed User
Longtime User
Is it the database connection??

Hello together,
I have the same proble with the SQLite-application I wrote, but there, the error is produced by canceling the Database connection while the PPC is sleeping.
If i had a wake-up indicator, i woud memorize the actual SQLite Querry and initialyze it new by waking up the ppc?
All your applications are using databases as well. Is there a connection to your problem?

best regards

bernd goedecke
 

RGS

Member
Licensed User
@Erel
>Does your second app also intercept SMS messages?
No it doesn't but it is an SQLlite DB application as berndgoedecke suggested

I'm trying to run the application without other applications running but until now it is very unpredictable.

I'll get back as soon as I pinpointed the problem.
 

RGS

Member
Licensed User
I've narrowed down the problem.

For development I keep a copy of alle sources, dll and exe on my storage card on \Storage Card\DevWM\<programname>. A release is installed on my internal memory in \Program Files\<programname>.

When I start the application from the development directory on my storage card, then this problem encounters. All works fine when the application is started from the internal disk.

Seems like one of the libraries is having trouble with running from storage card.
 
Top