In general, you try to figure out what the code was doing, and what
objects that you directly or indirectly defined/created/modified that
it might be referencing.  Then study the code that creates/modifies
those objects to see if you can intuit which values might be set to
null when they shouldn't be, or which values might be leading the code
to look at a pointer that it shouldn't try to look at.

I haven't done this a lot, but have done it a few times, and it's
usually easier than you think to intuit the cause -- you just have to
get over being intimidated by the problem.

It helps, of course, if you can actually look at the source for the
failing class to see what it was referencing at that point.

On May 3, 1:55 pm, vatsee <vat...@gmail.com> wrote:
> Hi gurus,
>
> I am working on an app that supports bidirectional audio-video
> communication. As part of that, the video GUI screen uses
> MediaRecorder for recording outgoing video & uses two surfaceView
> subclasses to display preview & incoming video.
>
> During the video call, I am seeing a (random) NPE. This trace (listed
> below) does not show any of my app code.
> I am not sure how to debug this issue.
>
> Has anybody seen anything similar to this? Appreciate if I can get
> some pointers on how to debug this issue.
>
> java.lang.NullPointerException
>         at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1366)
>         at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
>         at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
>         at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
>         at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
>         at android.view.View.draw(View.java:6743)
>         at android.widget.FrameLayout.draw(FrameLayout.java:352)
>         at com.android.internal.policy.impl.PhoneWindow
> $DecorView.draw(PhoneWindow.java:2058)
>         at android.view.ViewRoot.draw(ViewRoot.java:1432)
>         at android.view.ViewRoot.performTraversals(ViewRoot.java:1174)
>         at android.view.ViewRoot.handleMessage(ViewRoot.java:1752)
>         at android.os.Handler.dispatchMessage(Handler.java:99)
>         at android.os.Looper.loop(Looper.java:123)
>         at android.app.ActivityThread.main(ActivityThread.java:4627)
>         at java.lang.reflect.Method.invokeNative(Native Method)
>         at java.lang.reflect.Method.invoke(Method.java:521)
>         at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:858)
>         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
>         at dalvik.system.NativeStart.main(Native Method)
>
> Many thanks!

-- 
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

Reply via email to