<br><br><div class="gmail_quote">On Fri, Sep 21, 2012 at 4:28 PM, Timothy Krantz <span dir="ltr"><<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font> </div><br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px" dir="ltr">
<div dir="ltr" lang="en-us" align="left">
<hr>
<font face="Tahoma"><div class="im"><b>From:</b> <a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>
[mailto:<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>] <b>On Behalf Of </b>Daniel
Frey<br></div><b>Sent:</b> Friday, September 21, 2012 1:39 PM<div><div class="h5"><br><b>To:</b>
Discussion about MythTV<br><b>Subject:</b> Re: [mythtv-users] MythTV for
Android null Pointer Exception<br></div></div></font><br></div><div><div class="h5">
<div></div><br><br>
<div class="gmail_quote">On Wed, Sep 19, 2012 at 1:19 PM, Timothy Krantz <span dir="ltr"><<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><u></u>
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font> </div><br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px" dir="ltr">
<div dir="ltr" lang="en-us" align="left">
<hr>
<font face="Tahoma">
<div><b>From:</b> <a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a> [mailto:<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>] <b>On Behalf Of
</b>Daniel Frey<br></div><b>Sent:</b> Wednesday, September 19, 2012 8:00
AM
<div>
<div><br><b>To:</b> Discussion about MythTV<br><b>Subject:</b>
Re: [mythtv-users] MythTV for Android null Pointer
Exception<br></div></div></font><br></div>
<div>
<div>
<div></div>
<p><br>On Sep 18, 2012 5:10 PM, "Timothy Krantz" <<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>> wrote:<br>><br>>
<br>><br>>> ________________________________<br>>>
From: <a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a> [mailto:<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>] On Behalf Of Daniel
Frey<br>>> Sent: Tuesday, September 18, 2012 4:47
PM<br>>><br>>> To: Discussion about MythTV<br>>>
Subject: Re: [mythtv-users] MythTV for Android null Pointer
Exception<br>>><br>>><br>>> On Sep 18, 2012 3:09 PM,
"Timothy Krantz" <<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>> wrote:<br>>>
><br>>> > <br>>> ><br>>> >>
________________________________<br>>> >> From: <a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a> [mailto:<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>] On Behalf Of Daniel
Frey<br>>> >> Sent: Tuesday, September 18, 2012 2:53
PM<br>>> >><br>>> >> To: Discussion about
MythTV<br>>> >> Subject: Re: [mythtv-users] MythTV for Android
null Pointer Exception<br>>> >><br>>>
>><br>>> >> On Sep 18, 2012 2:50 PM, "Daniel Frey"
<<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>>> >>
><br>>> >> ><br>>> >> > On Sep 18, 2012
2:39 PM, "Timothy Krantz" <<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>> wrote:<br>>>
>> > ><br>>> >> > > <br>>>
>> > ><br>>> >> > >>
________________________________<br>>> >> > >> From:
<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a> [mailto:<a href="mailto:mythtv-users-bounces@mythtv.org" target="_blank">mythtv-users-bounces@mythtv.org</a>] On Behalf Of Daniel
Frey<br>>> >> > >> Sent: Tuesday, September 18, 2012
2:23 PM<br>>> >> > >> To: Discussion about
MythTV<br>>> >> > >> Subject: Re: [mythtv-users]
MythTV for Android null Pointer Exception<br>>> >> >
>><br>>> >> > >><br>>> >> >
>> On Sep 18, 2012 2:01 PM, "Timothy Krantz" <<a href="mailto:tkrantz@stahurabrenner.com" target="_blank">tkrantz@stahurabrenner.com</a>> wrote:<br>>>
>> > >> ><br>>> >> > >> > For
the last couple of days when running the latest git code I am getting
a<br>>> >> > >> > null pointer exception when
selecting a Program title from the list of<br>>> >> >
>> > program titles.<br>>> >> > >>
><br>>> >> > >> > In particular it is on line
92 of ProgramGroupFragment. Whe it tries to<br>>> >>
> >> > dereference cache, cache is null.<br>>> >>
> >> ><br>>> >> > >> > I have tried
uninstalling and reinstalling, removing all the local data
from<br>>> >> > >> > the device etc but am still
having a problem.<br>>> >> > >> ><br>>>
>> > >> > Anything I can do to help
diagnose?<br>>> >> > >> ><br>>> >>
> >> > Tim<br>>> >> > >> ><br>>>
>> > >> ><br>>> >> > >> >
_______________________________________________<br>>> >> >
>> > mythtv-users mailing list<br>>> >> > >>
> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>>> >> >
>> > <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>>>
>> > >><br>>> >> > >> Tim,<br>>>
>> > >><br>>> >> > >> Try and pull
again. Made some changes this morning.<br>>> >> >
>><br>>> >> > >> That one sounds familiar.
Might be what I fixed this morning. <br>>> >> >
>><br>>> >> > >> <br>>> >>
> >><br>>> >> > >> Did a fresh pull,
uninstall/re install etc. Same issue.<br>>> >> >
>><br>>> >> > >> <br>>> >>
> >><br>>> >> > >> Tim <br>>>
>> > ><br>>> >> > ><br>>> >>
> > _______________________________________________<br>>>
>> > > mythtv-users mailing list<br>>> >> >
> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>>> >> > >
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>>>
>> > ><br>>> >> ><br>>> >> > Can
you send me the java stacktrace from the location window?<br>>>
>><br>>> >> Also, what phone/tablet? Version of
android? <br>>> >><br>>> >>
<br>>> >><br>>> >> <br>>>
>><br>>> >> Thread [<1> main] (Suspended
(exception NullPointerException)) <br>>> >>
ProgramGroupFragment.loadPrograms(String) line: 92 <br>>>
>> RecordingsActivity.onProgramGroupSelected(String) line:
73 <br>>> >>
RecordingsFragment.onListItemClick(ListView, View, int, long) line:
245 <br>>> >>
ListFragment$2.onItemClick(AdapterView, View, int, long) line:
58 <br>>> >>
ListView(AdapterView).performItemClick(View, int, long) line:
292 <br>>> >>
ListView(AbsListView).performItemClick(View, int, long) line:
1185 <br>>> >> AbsListView$PerformClick.run() line:
2715 <br>>> >> AbsListView$1.run() line:
3476 <br>>> >>
ViewRootImpl(Handler).handleCallback(Message) line:
605 <br>>> >>
ViewRootImpl(Handler).dispatchMessage(Message) line:
92 <br>>> >> Looper.loop() line:
137 <br>>> >> ActivityThread.main(String[]) line:
4512 <br>>> >> Method.invokeNative(Object,
Object[], Class, Class[], Class, int, boolean) line: not available [native
method] <br>>> >> Method.invoke(Object, Object...)
line: 511 <br>>> >>
ZygoteInit$MethodAndArgsCaller.run() line: 978 <br>>>
>> ZygoteInit.main(String[]) line: 745 <br>>>
>> NativeStart.main(String[]) line: not available [native
method] <br>>> >><br>>> >> Interestingly it
fails on my samsung 8.9 galaxy tablet running android 4.0.4 but works on
my Galaxy S Epic phone running 2.3.6.<br>>> >><br>>>
>> <br>>> >><br>>> >> The stacktrace
above is from the failure on the Tablet.<br>>> >><br>>>
>> <br>>> >><br>>> >>
Tim <br>>> ><br>>> ><br>>> >
_______________________________________________<br>>> >
mythtv-users mailing list<br>>> > <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>>> > <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
>>
><br>>><br>>> Does the tab have an sd card mounted in
it? We are storing all resources downloaded from the backend in
cache in external storage. <br>>><br>>>
<br>>><br>>> It does. <br>><br>><br>>
_______________________________________________<br>> mythtv-users
mailing list<br>> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
></p>
<p>Strange. Some of the guys have it running on the nexus 7 with no issue.
</p>
<p>I had to go out of town on business. Will take a look in a couple days.
One of the guys was looking into this for me so keep an eye on the repo.
He might checked some changes in regarding this. </p>
<p>Is there anything else about the specs of that tablet that could be
relevant here? </p>
<p>Thanks, <br>Dan<span><font color="#0000ff" face="Arial"> </font></span></p></div></div><span>
<p><span><font color="#0000ff" face="Arial">I have been running this on the
tablet for quite a while not. Just quit working the last
few days.</font></span></p>
<p><span></span> </p>
<p><span><font color="#0000ff" face="Arial">I put some breakpoints in
ProgramGroupFragment and can say for sure that I am getting to the call of
loadPrograms at line 87 BEFORE the onCreate is called.</font></span></p>
<p><span></span> </p>
<p><span><font color="#0000ff" face="Arial">I think you will see that
from the last <span>few</span> lines of the attached logcat
capture.</font></span></p>
<p><span></span> </p>
<p><span><font color="#0000ff" face="Arial">Tim</font> </span></p>
<p><font color="#0000ff" face="Arial">09-19 13:05:03.210:
V/BannerLruMemoryCache(22914): create : enter<br>09-19 13:05:03.210:
V/BannerLruMemoryCache(22914): create : exit<br>09-19 13:05:03.210:
V/RecordingsFragment(22914): getView : banner not found in adapter
cache<br>09-19 13:05:03.210: V/RecordingsFragment(22914):
ProgramGroupRowAdapter.getView : exit<br>09-19 13:05:03.220:
V/RecordingsFragment(22914): ProgramGroupRowAdapter.getView :
enter<br>09-19 13:05:03.230: V/BannerLruMemoryCache(22914): create :
enter<br>09-19 13:05:03.230: V/BannerLruMemoryCache(22914): create :
exit<br>09-19 13:05:03.230: V/RecordingsFragment(22914): getView : banner
not found in adapter cache<br>09-19 13:05:03.230:
V/RecordingsFragment(22914): ProgramGroupRowAdapter.getView :
exit<br>09-19 13:05:03.240: V/RecordingsFragment(22914):
ProgramGroupRowAdapter.getView : enter<br>09-19 13:05:03.250:
V/BannerLruMemoryCache(22914): create : enter<br>09-19 13:05:03.250:
V/BannerLruMemoryCache(22914): create : exit<br>09-19 13:05:03.250:
V/RecordingsFragment(22914): getView : banner not found in adapter
cache<br>09-19 13:05:03.250: V/RecordingsFragment(22914):
ProgramGroupRowAdapter.getView : exit<br>09-19 13:05:03.260:
D/OpenGLRenderer(22914): Flushing caches (mode 0)<br>09-19 13:05:03.280:
V/RecordingsFragment(22914): ProgramGroupRowAdapter.getView :
enter<br>09-19 13:05:03.300: V/BannerLruMemoryCache(22914): create :
enter<br>09-19 13:05:03.310: V/BannerLruMemoryCache(22914): create :
exit<br>09-19 13:05:03.310: V/RecordingsFragment(22914): getView : banner
not found in adapter cache<br>09-19 13:05:03.310:
V/RecordingsFragment(22914): ProgramGroupRowAdapter.getView :
exit<br>09-19 13:05:03.650:
V/AbstractLocationAwareFragmentActivity(22914): onStop : enter<br>09-19
13:05:03.650: V/AbstractLocationAwareFragmentActivity(22914): onStop :
exit<br>09-19 13:05:07.060: V/RecordingsFragment(22914): onListItemClick :
enter<br>09-19 13:05:07.060: V/RecordingsFragment(22914): onListItemClick
: position=6, id=6, <a href="mailto:tag=org.mythtv.client.ui.dvr.RecordingsFragment$ViewHolder@417521c8" target="_blank">tag=org.mythtv.client.ui.dvr.RecordingsFragment$ViewHolder@417521c8</a><br>09-19
13:05:07.060: D/RecordingsActivity(22914): onProgramGroupSelected :
enter<br>09-19 13:05:07.060: V/RecordingsActivity(22914):
onProgramGroupSelected : adding program group to pane<br>09-19
13:05:07.060: V/RecordingsActivity(22914): onProgramGroupSelected :
creating new programGroupFragment<br>09-19 13:05:07.120:
V/RecordingsActivity(22914): onProgramGroupSelected : setting program
group to display<br>09-19 13:05:07.120: I/ProgramGroupFragment(22914):
loadPrograms :
enter</font> </p></span></blockquote></div><br>_______________________________________________<br>mythtv-users
mailing list<br><a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br><a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<br></blockquote></div><br>Tim,
<div><br>Can you try it again with the latest code?</div>
<div><br></div>
<div>Thanks,<br>Dan<br clear="all"><span><font color="#0000ff" face="Arial"> </font></span></div>
</div></div><div><span><font color="#0000ff" face="Arial">Dan,
yes same behaviour. But then I kinka expected that when my git pull
retrieved no new updates.</font></span></div>
<div><span></span> </div>
<div><span><font color="#0000ff" face="Arial">It
is clear that somehow I am getting a fragment instantiated but not associated
with an activity. I can not fathom how that is
happening.</font></span></div>
<div><span></span> </div>
<div><span><font color="#0000ff" face="Arial">I am
getting to the cache.get call and have not gone through the onCreate whoiich
would have initialized the variable cache.</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">If I
add code to try to initialize it in loadPrograms before line 92, I
crash somewhere else after a getActivity call returns null and the result is
used.</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">Tim</font> </span></div></blockquote></div>
<br>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<br></blockquote></div><br>Tim,<div><br></div><div>Try it again now. I think i figured out what was going on. You were on your tablet, correct? In landscape or portrait mode?</div><div><br></div><div>There are different views for tablets in its different orientations. I shouldn't have been loading the cache in the fragment, but the activity that calls it and passing it into the fragment. Try this change out. Let me know how it goes. I will try it out on my wife's tablet tonight to see how it works.</div>
<div><br></div><div>Dan<br><div><div><br></div>-- <br><a href="http://www.google.com/profiles/dmfrey" target="_blank">My Google Profile</a><br><br>
</div></div>