Application exits without cause

Hennell

Member
Licensed User
Longtime User
I've made a text editing based app that seems to have developed a habit of suddenly exiting when I switch back to it from another program. It doesn't happen every time, and sometimes seems to happens if the device (Axim x51v) has turned off, I've yet to spot the exact pattern.

It's obviously not closing properly because it reloads the autosave file from the previous run that it deletes on form close and properly it would prompt me to save. Another app I've made seems to work fine (Was open at the same time on some of the occasions)

Is there a way to find out what might be causing this/is it a problem anyone else has had?
 

Hennell

Member
Licensed User
Longtime User
The code is attached, I'm wondering if it might be the autosave timer system but I cant see anything obviously wrong...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I didn't get this error while testing it.
This is not related to the exit problem, but the Bluetooth functions are only supported on devices with Microsoft Bluetooth stack. You should use an ErrorLabel that catches the error that will be raised on line 34:
B4X:
If hardware.BluetoothMode = 0 Then mnuBlueOff.Checked = true Else mnuBlueOn.Checked = true

In order to find the problem I recommend you to temporary remove the GotFocus / LostFocus subs (maybe there is a recursive call in these methods) and disable the timer and see if it helps.

If your device is low on memory then opening other applications may also cause all kinds of problems to your application.
 
Top