A
A
Alexey Grichenko2011-05-11 06:55:39
Android
Alexey Grichenko, 2011-05-11 06:55:39

Android - long-running Activity closes itself

I don't understand at all what's going on. So far, everything is tested exclusively in the emulator. From the main activity, I launch another one, which, in turn, starts several AsyncTasks (two work with the web, and the server is rather slow and buggy, and one writes the results to the local database). The whole thing does not work very hastily, the process usually takes tens of minutes, or even hours. Naturally, I do not watch him all this time, but do other things. I return to the emulator, and there everything returned to the main activity. Silent, no error messages.

Need ideas what's going on and where to look to cure. Are there any standard reasons why an activity can be stopped?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2011-05-11
@WNeZRoS

If you're writing in Eclipse, there's a Debug tab, and a LogCat window in the tab. There, in red on white, should be written the reason for the end. I suspect that this may be a NullPointerException (the socket was closed / timeout - the data was not received from the server, but we continue to process them) or an Exception from the base.

S
SergeyGrigorev, 2011-05-11
@SergeyGrigorev

Try to trace information to find out at what point it stops. Perhaps in your code somewhere it comes out by itself, maybe the connection breaks or something else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question