Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Feed - download doesn't start but streaming is working

  1. #11
    Junior Member
    Join Date
    Mar 2014
    Posts
    7
    As said above: I tested again and it appears it works over my mobile connection, but not with my home connection through WiFi.
    I tested again today and it's still the case: works on mobile connection, not on WiFi.

    I'm using a Samsung Galaxy S4 (Android 4.3), and had the same issue with one of my old device, an HTC Desire (Android 2.2).

    I didn't know about the Android log, good to know.
    Here below an extract of the log.

    Indeed, the OOM happens during the parsing of the header !?

    Code:
    03-18 18:09:11.631 V/BeyondPod(25331): Enclosure Download Manager is Idle... Starting download of 1 enclosures!  (711 ms. since last trace)   [EnclosureDownloadManager]
    03-18 18:09:11.641 V/BeyondPod(25331): Starting manual download batch of 1 enclosures  (10 ms. since last trace)   [EnclosureDownloadManager]
    03-18 18:09:11.711 D/AbsListView(25331): unregisterIRListener() is called 
    03-18 18:09:11.721 V/BeyondPod(25331):   (80 ms. since last trace)   [DownloadAgent]
    03-18 18:09:11.721 V/BeyondPod(25331): >> -------------- Download of http://podcast.proxi-jeux.fr/podpress_trac/feed/5304/0/Debrief%20de%20Cannes_Final.mp3 started from pos: 0! --------------  (0 ms. since last trace)   [DownloadAgent]
    03-18 18:09:11.731 V/BeyondPod(25331): ========================= Download Service Holder is Created! =======================  (11 ms. since last trace)   [DownloadHolderService]
    03-18 18:09:11.731 V/BeyondPod(25331): >> Sending Request...  (0 ms. since last trace)   [DownloadAgent]
    03-18 18:09:11.731 V/BeyondPod(25331): ========= Download Service Holder Started!  (1 ms. since last trace)   [DownloadHolderService]
    03-18 18:09:11.781 V/BeyondPod(25331): Saving 1 enclosures to the Enclosure Download Queue...  (35 ms. since last trace)   [EnclosureDownloadManager]
    03-18 18:09:11.871 D/AbsListView(25331): unregisterIRListener() is called 
    03-18 18:09:11.951 D/AbsListView(25331): unregisterIRListener() is called 
    03-18 18:09:12.252 D/dalvikvm(25331): GC_FOR_ALLOC freed 6046K, 21% free 35894K/45260K, paused 124ms, total 125ms
    03-18 18:09:12.252 V/BeyondPod(25331): SonicPlayer woker thread finalized!  (487 ms. since last trace)   [SonicPlayer]
    03-18 18:09:12.312 D/dalvikvm(25331): GC_FOR_ALLOC freed 471K, 21% free 36021K/45260K, paused 47ms, total 47ms
    03-18 18:09:12.372 D/dalvikvm(25331): GC_FOR_ALLOC freed 802K, 22% free 36413K/46424K, paused 41ms, total 41ms
    03-18 18:09:12.382 I/dalvikvm-heap(25331): Grow heap (frag case) to 43.071MB for 2382864-byte allocation
    03-18 18:09:12.632 D/dalvikvm(25331): GC_FOR_ALLOC freed 1225K, 23% free 37577K/48752K, paused 63ms, total 63ms
    03-18 18:09:12.642 I/dalvikvm-heap(25331): Grow heap (frag case) to 44.980MB for 4765712-byte allocation
    03-18 18:09:13.333 D/dalvikvm(25331): GC_FOR_ALLOC freed 2452K, 26% free 39904K/53408K, paused 71ms, total 71ms
    03-18 18:09:13.353 I/dalvikvm-heap(25331): Grow heap (frag case) to 51.797MB for 9531408-byte allocation
    03-18 18:09:13.413 D/dalvikvm(25331): GC_CONCURRENT freed 4679K, 29% free 44559K/62720K, paused 18ms+9ms, total 64ms
    03-18 18:09:14.324 D/dalvikvm(25331): GC_FOR_ALLOC freed 229K, 29% free 44558K/62720K, paused 57ms, total 57ms
    03-18 18:09:14.344 I/dalvikvm-heap(25331): Grow heap (frag case) to 65.432MB for 19062800-byte allocation
    03-18 18:09:14.444 D/dalvikvm(25331): GC_CONCURRENT freed 9334K, 34% free 53866K/81340K, paused 35ms+11ms, total 94ms
    03-18 18:09:16.626 D/dalvikvm(25331): GC_FOR_ALLOC freed 449K, 34% free 53866K/81340K, paused 70ms, total 70ms
    03-18 18:09:16.846 I/dalvikvm-heap(25331): Grow heap (frag case) to 92.702MB for 38125584-byte allocation
    03-18 18:09:16.976 D/dalvikvm(25331): GC_CONCURRENT freed 18676K, 39% free 72486K/118576K, paused 68ms+14ms, total 126ms
    03-18 18:09:21.100 D/dalvikvm(25331): GC_FOR_ALLOC freed 888K, 39% free 72482K/118576K, paused 111ms, total 111ms
    03-18 18:09:21.100 I/dalvikvm-heap(25331): Forcing collection of SoftReferences for 76251152-byte allocation
    03-18 18:09:21.180 D/dalvikvm(25331): GC_BEFORE_OOM freed <1K, 39% free 72481K/118576K, paused 75ms, total 75ms
    03-18 18:09:21.180 E/dalvikvm-heap(25331): Out of memory on a 76251152-byte allocation.
    03-18 18:09:21.180 I/dalvikvm(25331): "Download thread: http://podcast.proxi-jeux.fr/podpress_trac/feed/5304/0/Debrief%20de%20Cannes_Final.mp3" prio=1 tid=39 RUNNABLE
    03-18 18:09:21.180 I/dalvikvm(25331):   | group="main" sCount=0 dsCount=0 obj=0x44419c48 self=0x78177638
    03-18 18:09:21.180 I/dalvikvm(25331):   | sysTid=10780 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=2022980736
    03-18 18:09:21.180 I/dalvikvm(25331):   | state=R schedstat=( 0 0 0 ) utm=221 stm=59 core=1
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.util.CharArrayBuffer.expand(CharArrayBuffer.java:~59)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.util.CharArrayBuffer.append(CharArrayBuffer.java:133)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.io.AbstractSessionInputBuffer.lineFromReadBuffer(AbstractSessionInputBuffer.java:251)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:178)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:180)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:428)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:670)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:509)
    03-18 18:09:21.190 I/dalvikvm(25331):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    03-18 18:09:21.190 I/dalvikvm(25331):   at mobi.beyondpod.downloadengine.BeyondPodHttpClient.execute(BeyondPodHttpClient.java:335)
    03-18 18:09:21.190 I/dalvikvm(25331):   at mobi.beyondpod.downloadengine.DownloadAgent.run(DownloadAgent.java:388)
    03-18 18:09:21.190 I/dalvikvm(25331):   at java.lang.Thread.run(Thread.java:841)
    03-18 18:09:21.190 I/dalvikvm(25331): 
    03-18 18:09:21.200 V/BeyondPod(25331): ######### HtmlView Activity finalized! Instances: 0 #########  (8.94 s. since last trace)   [HtmlViewActivity]
    03-18 18:09:21.200 V/BeyondPod(25331): #########== WebViewEX finalized! Remaining instances: 0 #########  (3 ms. since last trace)   [WebViewEx]
    03-18 18:09:21.200 V/BeyondPod(25331): >> Error downloading: http://podcast.proxi-jeux.fr/podpress_trac/feed/5304/0/Debrief%20de%20Cannes_Final.mp3. Reason: null  (3 ms. since last trace)   [DownloadAgent]
    03-18 18:09:21.200 V/BeyondPod(25331): >> Cleanup Started... Download thread: http://podcast.proxi-jeux.fr/podpress_trac/feed/5304/0/Debrief%20de%20Cannes_Final.mp3  (0 ms. since last trace)   [DownloadAgent]
    03-18 18:09:21.200 V/BeyondPod(25331): >> Cleanup Complete...Download thread: http://podcast.proxi-jeux.fr/podpress_trac/feed/5304/0/Debrief%20de%20Cannes_Final.mp3  (4 ms. since last trace)   [DownloadAgent]
    03-18 18:09:21.200 V/BeyondPod(25331): ===> Download Agent Exception! Reason:Exception - java.lang.OutOfMemoryError -> OutOfMemoryError, Type:Exception  (1 ms. since last trace)   [DownloadAgent]

  2. #12
    Junior Member
    Join Date
    Mar 2014
    Posts
    7
    This might be related to the following "issue" of the http client library: https://issues.apache.org/jira/browse/HTTPCORE-285
    Last edited by arnauldvm; 03-18-2014 at 05:49 PM.

  3. #13
    BeyondPod Team
    Join Date
    Feb 2012
    Posts
    1,033
    Yes, from the log it seems like the issue occurs in parsing the headers (most likely the same core issue mentioned in the Apache bug tracker).

    What is interesting is why you get this over WiFi only but not over the mobile network - given that you connect to the same site in both cases, the headers must be the same (unless your WiFi router for some reason rewrites the headers - may be due to caching or some other setting).

    I will take a look to see if the solution that is proposed in the Apache bug tracker is applicable on Android.

    Stefan

  4. #14
    BeyondPod Team
    Join Date
    Feb 2012
    Posts
    1,033
    I tried setting the line limit using CoreConnectionPNames.MAX_LINE_LENGTH, but that did not help (the Apache library now complains about the header line exceeding the limit).

    I can't test it with your feed (as it works correctly for me), but I have another one, the first link in this post, that has a similar error. From what I can tell after a bit of debugging through the client library code, in that particular case, the (last) header seem to be incorrectly separated from the response body - e.g. it does not end with CR-LF. This causes the header reads to continue into the response body resulting in Memory Overflow.

    Stefan

  5. #15
    Junior Member
    Join Date
    Mar 2014
    Posts
    7
    More information:
    - I tried to reproduce the issue with another WiFi access, but to no avail. So, it seems my specific WiFi access (or Internet Provider) is doing "something" with the HTTP response.
    - I checked the binary dump of the HTTP headers of the conversation between BeyondPod and the feed server and saw nothing unusual.
    - I also compared it with a dump taken during the reproduction (exact same HTTP request) of the conversation between curl on my Mac and the feed server, still on the same WiFi access. The only difference I found is that, in that case, the response body starts on a separate TCP packet than the HTTP header. Whereas with BeyondPod, the beginning of the response body is in the same packet as the HTTP header. But I don't see why it should make any difference.

    I'll go on with my investigation by trying to reproduce the problem, outside from BeyondPod/Android, using the Apache HTTP client library. Though I don't know yet which version is used by Android.

  6. #16
    Junior Member
    Join Date
    Aug 2015
    Posts
    3
    As stated above, programmers designed the HTTP protocol to deliver Web pages, not to serve streaming video. Nonetheless, it is one of the most common ways to deliver streaming video. HTTP requires that a Web server deliver Web pages and media, but these servers are ubiquitous on every ISP that offers Web access.
    Hey guys, I have found a new special thing, you all can find and download ringtone from here.
    You can try this free ringtone download, wish it is useful and fun, cheers.
    Last edited by YolinChew; 08-25-2015 at 08:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •