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. Can't upload my .apk to the market - minSdkVersion error every time.

Hi all, I am desperately looking for help with this! I've found many
other forums on the subject but none of the suggestions ever help!

I wrote a basic soundboard app, and it runs fine there's nothing wrong
with it. I want to upload it to the Market, but every time I try I get
an error message:

Market requires the minSdkVersion to be set to a positive 32-bit
integer in AndroidManifest.xml

That is already in there, I'm using 1.5 so I have my minSdkVersion set
at 3. I don't understand what the problem is, and I've asked a lot of
devs that never know what to tell me. I don't want to use a different
platform because my phone currently uses 1.5. Others have suggested
putting the <uses-sdk> line under the <manifest> line, but that hasn't
helped at all. Here is what my manifest looks like:

<?xml version="1.0" encoding="utf-8" ?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sav.soundboard" android:versionName="1.0"
android:versionCode="1">
- <application android:icon="@drawable/icon" android:label="@string/
app_name">
- <activity android:name=".Soundboard" android:label="@string/
app_name">
- <intent-filter>
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.LAUNCHER" />

  </intent-filter>
  </activity>
  </application>
 <uses-sdk android:minSdkVersion="3" />
 </manifest>



Does anyone know how to fix this??

-- 

2. Atas Nama LogayPektay Tolong Mod Tolong.

LogayPektay : di banned brot...
Mod tolong mod, bisa diaktifin lagi ato harus buat email baru,ini kesalahan 
dateng bukan dari settingan nama dari email,udah saya ganti jadi reza iransah. 
Tapi masalah dateng dari Windows Mobile, jadi pas kirim email nama yang 
muncul,bukan nama asli,sekarang milis udh dipindah ke android,jg udh username.

LogayPektay.
Logay itu Loba Gaya broootttt.wkwkwkkwkwk
Powered by Telkomsel BlackBerry and N1

-- 
"Indonesian Android Community [id-android]" 

3. progress?

4. Is there a way to view app memory usage in Nexus One while in authoring mode?

5. widget doesn't fresh on verizon droid, but works fine on HTC eris.

6. Tampang suhu-suhi mirink & x10 launching

7. Top of form is hidden under the Application name