java.lang.StackOverflowError
at java.lang.Thread.sleep(Thread.java:1229)
at java.lang.Thread.sleep(Thread.java:1211)
at org.tunesremote.PlaylistsFragment.onServiceConnected() (Unknown Source)
Looks like there is a recursion error situation in all 3 fragments where it
sleeps and then calls itself again. This code definitely is not safe as it
will continue to loop until it Stack Overflow happens. We need to find a a
better way to accomplish this or figure out why the Activity is NULL ever at
all.
@Override
public void onServiceConnected() {
host = (LibraryBrowseActivity) getActivity();
if (host != null) {
if (adapter.results.isEmpty()) {
host.library.readPlaylists(adapter);
}
} else {
// Not quite ready, snooze for a bit
try {
Thread.sleep(500);
onServiceConnected();
} catch (InterruptedException e) {
Log.e(TAG, "Waiting for Activity connection interrupted " + e);
}
}
}
Original issue reported on code.google.com by mellowaredev on 15 Jul 2012 at 1:28
Original issue reported on code.google.com by
mellowaredev
on 15 Jul 2012 at 1:28