[GH-ISSUE #57] app crash if we download big (>300 MB) file #38

Closed
opened 2026-03-03 19:11:12 +03:00 by kerem · 17 comments
Owner

Originally created by @jsyrtsov on GitHub (Feb 10, 2021).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/57

Originally assigned to: @NghiaTranUIT on GitHub.

please add any comments here if you need more information about this issue
image

Originally created by @jsyrtsov on GitHub (Feb 10, 2021). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/57 Originally assigned to: @NghiaTranUIT on GitHub. please add any comments here if you need more information about this issue <img width="1439" alt="image" src="https://user-images.githubusercontent.com/58340627/107487753-8d500f00-6b97-11eb-9b80-522967e04aab.png">
kerem 2026-03-03 19:11:12 +03:00
  • closed this issue
  • added the
    Done
    bug
    labels
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

Sorry to hear that but I'm not sure why NetServiceTransort is not capable of sending your big file.

I suppose that I should have a save check to skip big files, such as over 100Mb to prevent the app crashes 👍

<!-- gh-comment-id:776554285 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): Sorry to hear that but I'm not sure why NetServiceTransort is not capable of sending your big file. I suppose that I should have a save check to skip big files, such as over 100Mb to prevent the app crashes 👍
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

@NghiaTranUIT thank you for fast answer!

<!-- gh-comment-id:776555228 --> @jsyrtsov commented on GitHub (Feb 10, 2021): @NghiaTranUIT thank you for fast answer!
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

@jsyrtsov if you don't mind, please use this pod:

pod 'atlantis-proxyman', :git => 'https://github.com/ProxymanApp/atlantis.git', :branch => 'bug/crash-big-files'

and share with me whether or not it fixes the crash 😄

Thank you in advance 👍

<!-- gh-comment-id:776568794 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): @jsyrtsov if you don't mind, please use this pod: ``` pod 'atlantis-proxyman', :git => 'https://github.com/ProxymanApp/atlantis.git', :branch => 'bug/crash-big-files' ``` and share with me whether or not it fixes the crash 😄 Thank you in advance 👍
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

@NghiaTranUIT give me few minutes

<!-- gh-comment-id:776570613 --> @jsyrtsov commented on GitHub (Feb 10, 2021): @NghiaTranUIT give me few minutes
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

@NghiaTranUIT I'm sorry but right now I can't test it, server with large files is not working now. But I'd like to set 50Mb limit instead of 100Mb.

<!-- gh-comment-id:776593525 --> @jsyrtsov commented on GitHub (Feb 10, 2021): @NghiaTranUIT I'm sorry but right now I can't test it, server with large files is not working now. But I'd like to set 50Mb limit instead of 100Mb.
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

@NghiaTranUIT
I've tested with 100 Mb limit, got crash. 50 Mb limit crashed too. 20 Mb limit crashed too, I have assumption that buffer is not clearing, what do you think about it ?

<!-- gh-comment-id:776603069 --> @jsyrtsov commented on GitHub (Feb 10, 2021): @NghiaTranUIT I've tested with 100 Mb limit, got crash. 50 Mb limit crashed too. 20 Mb limit crashed too, I have assumption that buffer is not clearing, what do you think about it ?
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

Thanks for getting back. Let me check the root of the problem 👍

<!-- gh-comment-id:776665436 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): Thanks for getting back. Let me check the root of the problem 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

I'm not sure but I could transfer 50Mb by Atlantis to Proxyman macOS.

Screen_Shot_2021-02-10_at_19_53_54

However, it crashes when I tried a file 150Mb 😿 Google show that there is no memory left, so it crashes the app.

@jsyrtsov:

  1. Which iPhone model are you using? I'm iPhone XR iOS 14
  2. Do you have a link of the 20Mb file that I can test on my machine?
<!-- gh-comment-id:776688327 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): I'm not sure but I could transfer 50Mb by Atlantis to Proxyman macOS. <img width="1497" alt="Screen_Shot_2021-02-10_at_19_53_54" src="https://user-images.githubusercontent.com/5878421/107512777-e04ab600-6bd9-11eb-981b-686b8aa51284.png"> However, it crashes when I tried a file 150Mb 😿 Google show that there is no memory left, so it crashes the app. @jsyrtsov: 1. Which iPhone model are you using? I'm iPhone XR iOS 14 2. Do you have a link of the 20Mb file that I can test on my machine?
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

@NghiaTranUIT
I'm running on iPhone 7 iOS 13.7 and iOS 14.4 (both of these devices are crashing. I did't try to repeat crash on any simulator, should I?
I'm downloading two big files at the same time (~30MB + ~200MB + ~300MB. it is catalog DataBases) and Atlantis is trying to send it to Proxyman almost simultaneously and got crash on second file.
I can try to find some links with big files if you need it.
Also I can just exclude domain with catalogs from Transporting to Atlantis.
Thnx in advance.

<!-- gh-comment-id:776692478 --> @jsyrtsov commented on GitHub (Feb 10, 2021): @NghiaTranUIT I'm running on iPhone 7 iOS 13.7 and iOS 14.4 (both of these devices are crashing. I did't try to repeat crash on any simulator, should I? I'm downloading two big files at the same time (~30MB + ~200MB + ~300MB. it is catalog DataBases) and Atlantis is trying to send it to Proxyman almost simultaneously and got crash on second file. I can try to find some links with big files if you need it. Also I can just exclude domain with catalogs from Transporting to Atlantis. Thnx in advance.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

Yes, please try on the Simulator too, since there is plenty of RAM. Try on 20Mb and 100Mb.

Also I can just exclude domain with catalogs from Transporting to Atlantis.

Good idea. I might support the Exclusive List 😄

<!-- gh-comment-id:776693720 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): Yes, please try on the Simulator too, since there is plenty of RAM. Try on 20Mb and 100Mb. > Also I can just exclude domain with catalogs from Transporting to Atlantis. Good idea. I might support the Exclusive List 😄
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

Okay, I'll try on simulator without limit and with different limits

<!-- gh-comment-id:776697419 --> @jsyrtsov commented on GitHub (Feb 10, 2021): Okay, I'll try on simulator without limit and with different limits
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

Look like I found the problem @jsyrtsov The bug is from JSONEncoder, not the URLStreamTask.

Since the file size is large, it might not be able to represent in the JSON Format. I'm looking for a solution to exclude in this case

<!-- gh-comment-id:776707081 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): Look like I found the problem @jsyrtsov The bug is from JSONEncoder, not the URLStreamTask. Since the file size is large, it might not be able to represent in the JSON Format. I'm looking for a solution to exclude in this case
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

oh, good news!

<!-- gh-comment-id:776708827 --> @jsyrtsov commented on GitHub (Feb 10, 2021): oh, good news!
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 10, 2021):

@jsyrtsov let check the latest commit from bug/crash-big-files branch 👍

I decide to skip the large body if it exceeds the threshold (100Mb)

Screen_Shot_2021-02-10_at_20_44_52
<!-- gh-comment-id:776716497 --> @NghiaTranUIT commented on GitHub (Feb 10, 2021): @jsyrtsov let check the latest commit from `bug/crash-big-files` branch 👍 I decide to skip the large body if it exceeds the threshold (100Mb) <img width="1605" alt="Screen_Shot_2021-02-10_at_20_44_52" src="https://user-images.githubusercontent.com/5878421/107517954-032c9880-6be1-11eb-8a8c-7fab59b6cb86.png">
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

I've got crash with 100MB limit and with 50MB limit. With 25MB limit everything is OK)

<!-- gh-comment-id:776725166 --> @jsyrtsov commented on GitHub (Feb 10, 2021): I've got crash with 100MB limit and with 50MB limit. With 25MB limit everything is OK)
Author
Owner

@jsyrtsov commented on GitHub (Feb 10, 2021):

I've tested on simulator and didn't get any crashes. But on iPhone 7 I don't get crash only if I set 25MB limit.

<!-- gh-comment-id:777024550 --> @jsyrtsov commented on GitHub (Feb 10, 2021): I've tested on simulator and didn't get any crashes. But on iPhone 7 I don't get crash only if I set 25MB limit.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 11, 2021):

Thanks. I would like to limit the big file size to 50Mb. iPhone 7 lacks available RAM, so it might be crashed

<!-- gh-comment-id:777190227 --> @NghiaTranUIT commented on GitHub (Feb 11, 2021): Thanks. I would like to limit the big file size to 50Mb. iPhone 7 lacks available RAM, so it might be crashed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#38
No description provided.