06-07-2010 05:04 AM
This is my first post here, so sorry for anything wrong in advance.
We're developing a GPS tracking application which will start at device startup, and supposed to stop never. However, there is a point that application crashes and this crash only occurs on some of the devices in the field. i can't reproduce the problem on my testing devices, so i can't provide an exact solution. Instead i've created two spy applications: an application that sends email when the main application stops. and an aplication that runs the application when it stops
so there are 3 applications: gps, mailer, starter
all of them uses the event log to be able to catch the actual error. unfortunately the devices that causes error are usually in a 1 hour distance from our technical support. so when we receive a mail that says "the application has stopped", error logs dissappear until we get there.
i think there is a limit for the event logs. so what i want is to increase that limit (remove if i can) so that we are able to see what's happening.
any help will be appreciated.
some other information about the situation:
- we're developing for only BlackBerry Bold devices - BlackBerry OS 4.6
- the application is pushed via BES
- we're in a test phase, the application is pushed to ~500 devices, 40-60 of them stops sending gps position after a week.
- development environment is the blackberry plugin for eclipse (i think the details for this are not important at the moment)
- all applications are registered to run at startup (7th tier)
- all applications schedule themselves to run after two minutes. and every minute they delay this schedule one minute more, (so that if the application crashes, device will run them again in two minutes)
06-07-2010 05:22 AM
hello and welcome to the forums.
you cannot influence the eventlog unfortunately. all that can be done programatically is show the log.
you could try to implement some own logging into a persistant object - if you surround everything with try/catch it should get most errors (but not all).
or you could let your customers use javaloader to dump the eventlog after an error occured.
06-07-2010 06:42 AM
thanks for the quick response.
the cause of the application crash probably is a system log, which my application doesn't handle. i know that i can't read the event log content. but is there a way to make the BB device mail or redirect those logs to another location?
06-07-2010 06:54 AM
06-08-2010 03:39 AM - edited 06-08-2010 03:39 AM
Another (albeit quite imperfect) way is to log less. For example, RIM suggest you use very short abbreviated strings in your log messages and/or switch to the VIEWER_NUMBER mode for your log messages where a message is just a 32-bit integer which is then rendered as four characters in the log (that's what most of RIM's own logging appears to be using).