Closed prettyvoid closed 10 years ago
I managed to pinpoint the problem, it turned out to be in this line
spiceManager.execute(webRequestsHandler,"", DurationInMillis.ALWAYS_EXPIRED, listener);
If I supply a unique requestCacheKey for each request (instead of an empty string), the crash no longer occurs.
Because I'm using no cache, I switched to
spiceManager.execute(webRequestsHandler, listener);
It's working fine now.
I think all of this is happening because I designed my SpiceRequest to always return a string, I do the casting in the receiving listener instead of inside the SpiceRequest itself.
Sorry for the troubles
Hello, I'm using a view pager and I have a SpiceManager on the context level (activity). From two different tabs in the pager I do 2 calls at the same time:
My Main activity looks like this:
ThreadedSpiceService extends JacksonGoogleHttpClientSpiceService and returns 4 threads.
WebRequestsHandler extends GoogleHttpClientSpiceRequest
This makes my application crash on launch, if I comment one of the 2 requests above, the application runs fine.
Any idea what's wrong with my design? Why it's crashing?
Here is the log: http://i.imgur.com/zdFG8Dn.png
Thanks guys,