Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

App unexpectedly closes down after PDA wakes up after standby

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2008, 01:52 PM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default App unexpectedly closes down after PDA wakes up after standby

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 by RGS : 09-18-2008 at 02:09 PM.
Reply With Quote
  #2 (permalink)  
Old 09-18-2008, 04:49 PM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default

I managed to scale the code down to:

Code:
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 ???
Reply With Quote
  #3 (permalink)  
Old 09-18-2008, 06:53 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It will probably won't help, but please try to use Hardware.ShowTodayScreen (instead of the minimizebox) to send the application to the background.
Reply With Quote
  #4 (permalink)  
Old 09-18-2008, 07:08 PM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default

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 by RGS : 09-18-2008 at 07:22 PM.
Reply With Quote
  #5 (permalink)  
Old 09-19-2008, 07:49 PM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default

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 by RGS : 09-19-2008 at 08:29 PM.
Reply With Quote
  #6 (permalink)  
Old 09-20-2008, 06:50 AM
Basic4ppc Veteran
 
Join Date: Sep 2008
Location: Brisbane, Australia
Posts: 317
Default 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
Reply With Quote
  #7 (permalink)  
Old 09-20-2008, 09:09 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I can't reproduce it too.
Does your second app also intercept SMS messages?
Reply With Quote
  #8 (permalink)  
Old 09-20-2008, 07:51 PM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default 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
Reply With Quote
  #9 (permalink)  
Old 09-21-2008, 06:07 AM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default

@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.
Reply With Quote
  #10 (permalink)  
Old 09-24-2008, 05:17 AM
RGS RGS is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Default

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i use Basic4PPC to run a program whilst a device is in 'standby' Stead Questions (Windows Mobile) 3 08-03-2009 09:50 PM
IDE just closes Cableguy Bug Reports 4 06-15-2008 07:43 PM


All times are GMT. The time now is 02:24 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0