Search Unity

Bug Incredible Memory Usage and Crash iOS [Unity Ads]

Discussion in 'Unity Ads & User Acquisition' started by hexdecc, Feb 21, 2022.

  1. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    Hello,when I show reward ads, memory goes incredible highly while watching the video on iOS device.

    and iOS Devices crashes due to out of memory, I have uploaded a video to dropbox please watch it you will see what's going on.

    What I am doing wrongful I dont understand, maybe it is a bug.

    Unity Version ; 2021.2.7f1
    Unity Ads Version ; 3.7.5

    Here the Video ;
    https://www.dropbox.com/s/pbl4xgu8ixd1ogw/ads_problem_unity.mov?dl=0
     
  2. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    About this issue, may you provide your device logs in a .txt file and sample codes used in this video? We will have a check.
     
  3. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
  4. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    I perceived that unity ads calls google ads, is it normal behavior?

    AircraftCarrier[21620:7141063] I/UnityAds: +[USRVApiSdk WebViewExposed_logInfo:callback:] (line:70) :: afma: event=click, data={"url":"https://googleads.g.doubleclick.net/aclk?sa=L&ai=CI0v93qAUYsnJKo2Irr4P64WCqAHe-



    Update 1:

    in my Phone device it shows google ads, however I did not install anything about google admob and when google admob reward ads showing ram goes higher,

    in my iPad it shows never Google Admob reward ads [IDFA not allowed], ram stays steady with no problem.

    Update 2 :

    I have closed IDFA in iPhone and it shows only Unity Ads but still ram goes highly!


    Also I have found a thread related to my issue
    https://forum.unity.com/threads/high-memory-usage-playing-rewarded-ads-on-ios.1198693/

    @GoldenFoxLLC @LIU_Hanyang96 @jcGrenier
     
    Last edited: Feb 22, 2022
  5. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    hello any progress? I am stucked , I cannot even downgrade the unity ads. only version 3.7.5
     
  6. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    Our SDK usually needs at least 5M RAM, but it won't request much. May you try not to initialize UnityAds SDK and check whether you have the same issue?

    Also, about your code, we recommend you use load callbacks to trigger show functions instead of using "isReady" and IEnumerator. The function "isReady" has been deprecated in the next version of SDK.

    By the way, it is normal to see some AdMob ads as we have some AdMob ads from DSP.
     
  7. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    I have solved the problem by disabling camera when video is active and making camera reactive after video is finish.
     
  8. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    I am glad that you have solved this issue.
     
  9. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    solved but still not found the problem.it is a temporary solution.
     
  10. appsscity1

    appsscity1

    Joined:
    Feb 6, 2020
    Posts:
    20
    Hey @LIU_Hanyang96

    We are also facing the same issue at our side so is there any solution for this or we just need to add patch of disabling camera like @hexdecc did?
     
  11. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    I think currently you have to pause these camera services manually like what he did.
     
  12. appsscity1

    appsscity1

    Joined:
    Feb 6, 2020
    Posts:
    20
    Hi @LIU_Hanyang96

    We have done the same and not able to reproduce crash after disabling the camera while showing ads and enabling again after ads completion.

    But what do you think that why it's happening ?
     
  13. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    Maybe it is caused by some progress conflict. I will contact our development team about this issue. However, I am not sure whether they will have a schedule to deal with this issue.
     
  14. appsscity1

    appsscity1

    Joined:
    Feb 6, 2020
    Posts:
    20
  15. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    @LIU_Hanyang96
    any solution about it?
    Even I close camera while ads running,

    it start crashing? what a poor unity.no solution.
     
  16. appsscity1

    appsscity1

    Joined:
    Feb 6, 2020
    Posts:
    20
    Hey @hexdecc

    Disabling camera just before showing ads and then enabling it again after ads completion worked for us.
     
  17. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    148
    hey it was working, but currently no.
     
  18. timbo_unity

    timbo_unity

    Joined:
    Apr 29, 2022
    Posts:
    10
    Is there a fix for this? our apps memory usage jumps by about 400 mb when a video is shown and crashes the app