Search Unity

The buffer size limit of detail memory profile

Discussion in 'Editor & General Support' started by rainfiel, Oct 9, 2013.

  1. rainfiel

    rainfiel

    Joined:
    Oct 19, 2012
    Posts:
    3
    When I connect to a remote windows player and try to take a detail sample of memory usage. After a little time the console output this message:

    recvBuffer.GetSize() >= m_PendingMessage.GetDataSize() "Buffer is not large enough for the message."

    It's very import for our game to profile the memory usage, but we have nothing to do.
     
  2. jimmay

    jimmay

    Joined:
    Sep 23, 2010
    Posts:
    28
    I'm having the exact same problem. It makes this tool rather useless and I really need to see the current state of memory to track down some issues.
     
  3. zibizz1

    zibizz1

    Joined:
    Oct 11, 2012
    Posts:
    17
    the same problem application uses over 300mb ram memory and i get:
    recvBuffer.GetSize() >= m_PendingMessage.GetDataSize() "Buffer is not large enough for the message."

    in bacthmode i am able to take sample(only 100mb in ram) , but i want to do that in normal mode
     
  4. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    I also have the same problem, any unity develop can answer our question ?
     
  5. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    In Editor, there is no problem, it only happen on Window player
     
  6. mattimus

    mattimus

    Joined:
    Mar 8, 2008
    Posts:
    576
    I'm receiving this same message after upgrading to Unity 4.3.3 and trying to profile an ios build. It was working on 4.2.
     
  7. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    287
    Same problem, although initially I can take a sample (before my game starts using much memory).

    Kind of defeats the purpose if it only works when you aren't using much memory...
     
  8. sdermanffs

    sdermanffs

    Joined:
    Nov 7, 2013
    Posts:
    1
    Same problem here on 4.3.4.
     
  9. OLP

    OLP

    Joined:
    Oct 19, 2012
    Posts:
    6
    I'll echo those complaints. My game uses around 300mb on iOS and the profiler is choking when trying to Take Sample.

    It also seems to kill the profiler connection entirely when it happens (editor-side; the game is spamming the XCode log with "Skipping profile frame. Receiver can not keep up with the amount of data sent").

    A memory profiler that chokes on insufficient memory when the target uses too much memory is quite ironic :)

    Using Unity 4.3.4f1 and iPad4
     
  10. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    287
    I've submitted a bug report.

    Sadly, reporting a bug that's a year old feels a bit like using a memory profiler that runs out of memory.
     
  11. Petr Benysek

    Petr Benysek

    Joined:
    Nov 8, 2012
    Posts:
    3
    I have the same problem, tried with Unity 4.3.4f1 vs. Windows and iOS players. From what the error message says, it seems to me that the problem is perhaps only in a small size of the buffer that should receive the captured data.

    Hopefully this can be fixed soon, it really makes this otherwise great tool kinda useless.


    P.S. Would be great to have an option to save the profile result to a text file, it's invaluable for comparison when you're working on optimizations.
     
  12. jlupianez_freedom

    jlupianez_freedom

    Joined:
    Mar 7, 2014
    Posts:
    3
    Same Problem here. Again, if memory is above 300MB, profiler ends up with nothing more than this message:

    recvBuffer.GetSize() >= m_PendingMessage.GetDataSize() "Buffer is not large enough for the message."
    Unity, please, fix this soon :'(
     
  13. GrahamReeves

    GrahamReeves

    Unity Technologies

    Joined:
    Apr 8, 2014
    Posts:
    30
    Hi All,

    This has been fixed in 4.5 and will appear in the next patch (which should be any moment now :) )

    Edit: we will also get this into the next 4.3 patch too
     
    David-Berger likes this.
  14. GrahamReeves

    GrahamReeves

    Unity Technologies

    Joined:
    Apr 8, 2014
    Posts:
    30
  15. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    My android app exit without any popup message when "Take Sample".
    Upgrade to 4.5.3p3 does NOT fix my problem:(

    PS: My app shows about Used Total: 100mb in simple mode.
     
    Last edited: Sep 5, 2014
  16. GrahamReeves

    GrahamReeves

    Unity Technologies

    Joined:
    Apr 8, 2014
    Posts:
    30
    Hi, could you submit a bug report with your project attached so we can look into it?
     
  17. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    I am afraid I can't. The project belongs to the company I works for.
    I will try to find how to reproduce it in a demo project.
     
  18. GrahamReeves

    GrahamReeves

    Unity Technologies

    Joined:
    Apr 8, 2014
    Posts:
    30
    That would be really useful. As a rule projects with a LOT of scene objects have caused this (large amounts of memory data), but maybe your case is different :)
     
  19. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    4.5.3p3 works for standalone build on PC, however my unity editor still freezes when too much objects in scene. I'll copy here my message from another thread, sorry for that :)

    I'm trying to profile our game in Unity editor. But unfortunately every time when I hit take sample, whole unity freezes. It looks like, that it has correlation with many objects in scene. When i disable my object pools it works (i have arond 10k game objects, and 30k objects in scene). After enabling pools i have 17k game objects, and 60k objects. I tried to wait some time (cca 10 minutes) but without success.

    So now i can profile scene with les then 10k game objects for standalone build.
     
  20. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    I find that too many objects causes this problem not memory, because my test project has only about 20-30m memory, while the object count is 33000+. In my test, the threshold of "Total Object Count" that cause the problem is
    about 32800.
    I have submit a bug report about it.
     
  21. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    Please, write number of bug report here than :)
     
  22. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    I am not using Issue Tracker. I use bug report in the editor, and I don't known number of the bug.
    http://unity3d.com/BugReportingFAQ
     
  23. Pavel Ruff

    Pavel Ruff

    Joined:
    Sep 19, 2014
    Posts:
    1
    I am reproducing the same issue with Unity 4.5.0 profiling both iPhone and Android builds
     
    Last edited: Sep 24, 2014
  24. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    This is now fixed as of 4.5.3, since we are now in 4.5.4, we won't be retroactively fixing it.
     
  25. ofusion

    ofusion

    Joined:
    Dec 5, 2013
    Posts:
    27
    What about too many objects causes detail memory profile failed?
    I have submit a bug report about it. It causes trouble for us to track memory problem.
    I wish it will be fixed soon!
     
  26. alvion

    alvion

    Joined:
    May 30, 2013
    Posts:
    8
    This is still an issue for me on Android, using Unity 4.6.5. When I make a development build for ATITC and run it on my OnePlus One this message will spam constantly, making it very difficult to read the log impossible to use the profiler since all the logging slows the game down considerably.
     
  27. ScrappyOrc

    ScrappyOrc

    Joined:
    Nov 25, 2013
    Posts:
    14
    We are seeing this issue on 5.0.4f1 on standalone and iOS. We receive the error: recvBuffer.GetSize() >= m_PendingMessage.GetDataSize() "Buffer is not large enough for the message.", and nothing is displayed in the detailed memory viewer. Are there any updates on this issue happening in Unity 5?
     
  28. ScrappyOrc

    ScrappyOrc

    Joined:
    Nov 25, 2013
    Posts:
    14
    We've submitted a sample project with reproduction steps, its bug #728104
     
  29. TheEvilRabbit

    TheEvilRabbit

    Joined:
    Aug 25, 2014
    Posts:
    26
    Same problem in 5.2
     
  30. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    That bug 728104 was closed as it was no longer reproducible in 5.2 and 5.2.0p1

    Can you try the latest version of Unity and if you can reproduce, open a new bug please.