Re: [android-developers] OnCreate does not finish

2010-08-16 Thread TreKing
On Sun, Aug 15, 2010 at 9:57 AM, kretes kretesena...@gmail.com wrote:

 so it must be that while creating the app Android System decided that there
 are not enough resources for my app.
 Is my suspicion right?


I doubt it. More than likely your app is throwing an exception between 1
and 2. I think Android tries to restart apps sometimes after they've
crashed which would explain your multiple restarts.


 How can I do sth. with this - at least catch and log such an event in a
 precise and sure way.


Wrap it in a try / catch block? Of course you'll only be masking the problem
and you'll probably crash elsewhere when the stuff you need to load in that
section is not found.

On Sun, Aug 15, 2010 at 5:02 PM, kretes kretesena...@gmail.com wrote:

 I don't know if it matters, but these are some operations - especially here
 on Preferences and on SQlite Database, so they need some small amount of
 processing.


Of course it matters - whatever you're doing in there is your problem. The
SQlite in particular should be dealt with with care.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] OnCreate does not finish

2010-08-16 Thread Tommy
are you calling super.onCreate() ? This has gotten me a few times. Otherwise
wrap it in a Try Catch like TreKing said and step through the code in debug
mode to find out where your error is being thrown.

 

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of TreKing
Sent: Monday, August 16, 2010 12:07 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] OnCreate does not finish

 

On Sun, Aug 15, 2010 at 9:57 AM, kretes kretesena...@gmail.com wrote:

so it must be that while creating the app Android System decided that there
are not enough resources for my app.
Is my suspicion right?

 

I doubt it. More than likely your app is throwing an exception between 1
and 2. I think Android tries to restart apps sometimes after they've
crashed which would explain your multiple restarts.

 

How can I do sth. with this - at least catch and log such an event in a
precise and sure way.

 

Wrap it in a try / catch block? Of course you'll only be masking the problem
and you'll probably crash elsewhere when the stuff you need to load in that
section is not found.

 

On Sun, Aug 15, 2010 at 5:02 PM, kretes kretesena...@gmail.com wrote:

I don't know if it matters, but these are some operations - especially here
on Preferences and on SQlite Database, so they need some small amount of
processing.

 

Of course it matters - whatever you're doing in there is your problem. The
SQlite in particular should be dealt with with care. 



-
TreKing http://sites.google.com/site/rezmobileapps/treking  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] OnCreate does not finish

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 11:17 AM, Tommy droi...@gmail.com wrote:

 are you calling super.onCreate() ?


I think the OP would have to be, otherwise it would crash 100% of the time.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] OnCreate does not finish

2010-08-16 Thread Tommy
Ah guess I didn't see it was only intermitent

 

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of TreKing
Sent: Monday, August 16, 2010 12:32 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] OnCreate does not finish

 

On Mon, Aug 16, 2010 at 11:17 AM, Tommy droi...@gmail.com wrote:

are you calling super.onCreate() ?


I think the OP would have to be, otherwise it would crash 100% of the time.



-
TreKing http://sites.google.com/site/rezmobileapps/treking  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] OnCreate does not finish

2010-08-15 Thread kretes
Hi,

I would like to know what is going on with my app and Android system
when the onCreate() method in Application class doesn't finish.

In  onCreate() of the MyApplication extends Application class I have:

super.onCreate()
//do sth 1
log(1)
//do sth 2
log(2)
...

Usually when Android is creating the application I see 1 , 2 in my log
entries. However a few users have an issue that for 2 days Android is
keeping on restarting the app a few times, and always there is only
1 in the log.
So the onCreate method hasn't finished.

so it must be that while creating the app Android System decided that
there are not enough resources for my app.
Is my suspicion right? How can I do sth. with this - at least catch
and log such an event in a precise and sure way.

Thanks for any help,
Tomasz Bartczak
Automatic Sleep Log.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en