Nullpointer ......Stack overflow, expanding

by for android » Tue, 04 Nov 2008 17:09:49 GMT


Sponsored Links
 I have created a complex view layout.Whn i see the layout(in eclipse)it
appears fine .When i see the log statements also I get the statements till
the last line in the onCreate without any issues .

But at run time i get this error which is Nullpointer.What does this error
really indicate??

11-04 14:28:11.044: INFO/dalvikvm(176): Stack overflow, expanding
(0x41049200 to 0x41049000)
11-04 14:28:11.054: INFO/dalvikvm(176): Shrank stack (to 0x41049200,
curFrame is 0x4104ad4c)
11-04 14:28:11.076: DEBUG/AndroidRuntime(176): Shutting down VM
11-04 14:28:11.076: WARN/dalvikvm(176): threadid=3: thread exiting with
uncaught exception (group=0x40010e28)
11-04 14:28:11.082: ERROR/AndroidRuntime(176): Uncaught handler: thread main
exiting due to uncaught exception
11-04 14:28:11.134: ERROR/AndroidRuntime(176):
java.lang.NullPointerException
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.view.ViewRoot.draw(ViewRoot.java:992)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:829)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1103)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.os.Handler.dispatchMessage(Handler.java:88)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.os.Looper.loop(Looper.java:123)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
java.lang.reflect.Method.invokeNative(Native Method)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
java.lang.reflect.Method.invoke(Method.java:515)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-04 14:28:11.134: ERROR/AndroidRuntime(176):     at
dalvik.system.NativeStart.main(Native Method)

--~--~---------~--~----~------------~-------~--~----~



Nullpointer ......Stack overflow, expanding

by fadden » Wed, 05 Nov 2008 04:41:18 GMT


 


The interpreted stack overflowed, causing a StackOverflowException.
Something likely caught it and then failed with a
NullPointerException.  The stack trace points to a "finally" block in
ViewRoot.draw(), which means something in the associated "try" block
threw the NPE.

The likely cause is that your view hierarchy is too deep.  If you can
break on StackOverflowException in the Eclipse debugger you should be
able to see the point of the throw and the full contents of the stack.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Nullpointer ......Stack overflow, expanding

by for android » Wed, 05 Nov 2008 12:07:00 GMT


 Thanks for the response.

I have not been really able to understand what is happening.When i was
trying to debug,I started removing some views in the layuot and the null
pointer was not getting thrown,

Then again i started adding the views one after the other and the code
started working fine.


But when i took the code to a difff machine ,it started to throw the same
error..



Also i would like to know what you mean by "the view heirarchy is too
big"..I have assumed that the view heirarchy can any be as complex as it can
get.Is it a fair assumption.


Thanks Once again!







--~--~---------~--~----~------------~-------~--~----~



Nullpointer ......Stack overflow, expanding

by hackbod » Wed, 05 Nov 2008 16:06:09 GMT


 


No, calls go down the view hierarchy, so a very deep hierarchy can
overflow the stack.  You also want to keep your hierarchy as simple as
possible just for plain performance reasons.

--~--~---------~--~----~------------~-------~--~----~



Nullpointer ......Stack overflow, expanding

by for android » Wed, 05 Nov 2008 16:34:11 GMT


 So how exactly do I decide that the hierarchy is very deep or not? is it
something quantifiable?


Thanks







--~--~---------~--~----~------------~-------~--~----~



Nullpointer ......Stack overflow, expanding

by for android » Mon, 10 Nov 2008 18:15:36 GMT


 Any help??????????







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How does emulator manage to install all the applications?

Hii David,

Its nice to meet u...Can you please mail me the google maps apk file if u
have it?It will be of great help for me if anyone can share me the .apk file
of google maps application.

Thanks,
Ramakrishna.








-- 
Best Regards,
M.Rama Krishna Prasad,
ST Microelectronics,Bangalore
Ph No:09008718152

--~--~---------~--~----~------------~-------~--~----~

2. Is it possible to "clear defaults" by code? (after setting 'Use by default for this action'')

Topic.

I'm playing with the alternative Home app that comes with the SDK.

I can set this as default for 'Home' action.

I can unset this by -->Setting->Manage Application->My Alternative
Home-> "clear defaults"


Question:

How to do this "clear defaults" by code?

I've browsed the forums but cannot find an answer.

Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~

3. get the signkey of the apk

4. Decoding <content:encoded>

5. Service runs but does not react??

6. SeekBar does not reach the end

7. access parent's protected variable when override a android class