Search Unity

The profiler has run out of samples...

Discussion in 'Editor & General Support' started by Rodolfo-Rubens, Apr 28, 2015.

  1. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    ...for this frame. This frame will be skipped.

    I'm getting this error on the console from time to time, even though I'm not using the profiler and its window it's closed.

    Bug? Should I report?
     
  2. Kim-Riber

    Kim-Riber

    Unity Technologies

    Joined:
    Feb 25, 2011
    Posts:
    25
    Hi.
    Thanks for reporting this. It has been fixed and will be in unity 5.1
    We have also added UnityEngine.Profiler.maxNumberOfSamplesPerFrame where you can control the buffer sizes for the profiler
    -Kim
     
  3. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Hey, thanks, that was fast!
     
  4. Simon-O

    Simon-O

    Joined:
    Jan 22, 2014
    Posts:
    51
    I'm getting this error in 5.1.0f3
     
  5. MGleem

    MGleem

    Joined:
    Jun 21, 2013
    Posts:
    9
    yes, I'm also getting in 5.1.0f3
     
  6. webik150

    webik150

    Joined:
    Mar 23, 2013
    Posts:
    62
    Me too
     
  7. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hey, @Kim Riber (and @Simon O @MGleem @webik150 )

    How does one apply the setting you mentioned in your post? (forgive I haven't tried it yet ... just wondering if that's why people are still seeing the problem. Just trying to help :) )
     
  8. webik150

    webik150

    Joined:
    Mar 23, 2013
    Posts:
    62
    I would guess you have to create a script with [ExecuteInEditor]. But that would just take so much work, so it's easier to just write here and hope someone will come up with something better :D
     
    Arkade likes this.
  9. Kim-Riber

    Kim-Riber

    Unity Technologies

    Joined:
    Feb 25, 2011
    Posts:
    25
    Hi
    You can add it to your startup code on f.ex. your camera
    -Kim
     
  10. Cryztalfox

    Cryztalfox

    Joined:
    Jan 6, 2014
    Posts:
    6
    Hello Kim, could you be so kind as to explain to me how I can disable your engines profiler. You see I am getting the profiler running out of samples logerror, and I am performance testing. For this I need the unity profiler to STAY OFF. Whenever I hit the play button the unity profiler auto enables it would seem and I have no way of enforcing it stay off.
    My version of unity is: 5.1.1f1 and this has not become an issue until today.

    My process is being affected in a negative manner as I now have to divert my attention from managing over 1000 unit's and their AI to this profiler bug from the engine itself... If you could get back to me on this manner I would very much appreciate it. Ty :)
     
  11. Thelo

    Thelo

    Joined:
    Sep 13, 2009
    Posts:
    98
    I am also getting this annoying error in 5.1.2f1 (Windows 32-bit editor)
     
  12. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    What is the update on this error please? I just noticed in it 5.1.1
    I open the profiler, use it for a bit and then close window - then while running the game in the editor next time it crashes/pauses with this error in the console (The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame)

    So I don't why the profile would even be running when I have closed the window...?
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Sounds like it may be this issue you are having. Its different from the original one and it still being investigated. If you think the problem is different then please submit a bug report.
     
  14. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    I just got this error in 5.3.0f4. The profiler window is closed. It was open for a while earlier in this editor session, but it has never been open during the gameplay session in which the error occurred.
     
  15. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    This is incredible annoying, if it was at least a warning log, but it's a error. Any update on this?
     
  16. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    Just ran into this now. Is the workaround to never open the Profiler to begin with??? Gads. I despise getting 99.5% of a game done and ready to get paid to have some idiot error come in and put my paycheque in the dirt right at Christmas time. Unity tech. Do a better job. Some of us rely on your apps stability to get paid on time. I will now have to mess with this and watch my fixed rate contract slowly go backwards in the dollar per hour ratio.
     
  17. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Yeah I'm getting this same error on the newest 5.3.1 or whatever it is.
     
  18. DerickTP

    DerickTP

    Joined:
    Jul 28, 2014
    Posts:
    8
    Yeah also getting this error, on startup. I do a lot thing on my script in the start function (maybe not the best idea, but I'm just prototyping map generation here). I get this error in 5.2.3f1 in mac, and windows, even after setting the max number of sample to 8 000 000. I have to check for 5.3. This really annoying, I would like to efficiently compare algorithms...
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I've had the issue throughout the dev cycle from 5.1 to 5.3 - basically I only need to use the profiler once, then while using unity editor outside of play mode, it'll spam the console from time to time, even if I'm just panning the scene view. Persists until restart. I notice it's been reported a lot, so I wonder if that part is being missed ie - happens outside of playmode some time after first using profiler in playmode.
     
  20. nikokoneko

    nikokoneko

    Joined:
    Feb 20, 2015
    Posts:
    35
    I am still getting this error in Unity 5.4.0b2, near the startup. Not using Profiler at all. Any ETA on this fix?
     
  21. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I've seen this from time to time. The problem is that closing the profiler window does not cause the profiler to stop running. You have to uncheck the "record" button before you close it.

    I'm not sure if it's consistent, I've just made it a habit to uncheck the button every time I close the profiler.
     
  22. cbailey_kt

    cbailey_kt

    Joined:
    Sep 15, 2015
    Posts:
    3
  23. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    @karl.jones, I can see that this issue is fixed in 5.4. Any chance of getting it backported to 5.3? This bug means that if I every use the profiler, I have to restart Unity or not use Error Pause in the console.
     
  24. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    I'll ask the developer if its ok to backport.

    Edit: It's ok to backport. should be available in 1-2 weeks.
     
    Last edited: Mar 30, 2016
  25. shaliniambi398

    shaliniambi398

    Joined:
    Nov 17, 2014
    Posts:
    1
    The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame

    Getting this error in 5.2.3
     
  26. OrekaIngenierie

    OrekaIngenierie

    Joined:
    Jul 6, 2012
    Posts:
    67
    Hi, still have it from time to time in 5.3.4f1, appaers dont do anything anyway but still

    EDIT : in fact does appear when unity finish all jobs and goes to another task of GI baking.
     
  27. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    still a problem....
     
  28. marihano

    marihano

    Joined:
    Jun 11, 2016
    Posts:
    1
    getting that error too
     
  29. bobmoff

    bobmoff

    Joined:
    Sep 23, 2014
    Posts:
    44
    Still having this error from time to time. Using 5.3.5p4
     
  30. El_boy

    El_boy

    Joined:
    May 23, 2013
    Posts:
    9
    This wouldn't have any effect on an actual build would it? I'm guessing anything that has to do with the Profiler wouldn't interfere in any way on builds... I'm getting the error on 5.3.1f1 Personal, I'm scared ;)
     
  31. LAustralien

    LAustralien

    Joined:
    Apr 20, 2013
    Posts:
    11
    I am getting this error and I am using Unity Pro 5.4.0f3
     
    johanneskopf likes this.
  32. johanneskopf

    johanneskopf

    Joined:
    Feb 16, 2015
    Posts:
    81
    Me too. I am using Unity 5.4.0f3 Personal.
     
  33. Dwarf-Cavern

    Dwarf-Cavern

    Joined:
    Apr 7, 2013
    Posts:
    8
    Hi all,
    I used to get this annoying error as well since my scene grew in complexity, but I followed the directions that the profiler message / error state and have used the newly implemented Profiler feature and it solved the issue immediately.

    My workflow is this:
    1. I made a "Profiler Buffer" gameobject to sit in the scene while working on the scene in the editor.
    2. Made a simple script that calls Profiler.maxNumberOfSamplesPerFrame = -1; in Start. If you consult the API documentation it states that -1 value is for enabling a dynamic buffer that scales automatically, per scenes need.
    3. Assigned the script to the "Profiler Buffer"
    4. Hit play and the message is gone.
    5. Remember to delete the object from the final scenes for the build, or do something else that you like not to have it redundant in your build.

    Personally I've never gotten it in editor mode, only when executing Awake and Start functions when hitting play, and this solved the issue completely. If you are getting the errors in Editor mode, then I guess that forcing the script to run in editor mode as well could solve the issue, but then I would be careful with the dynamic buffer, simply because I haven't tested it myself, so I don't know how it behaves.

    In case you need more details, everything is pretty clearly stated here:
    https://docs.unity3d.com/ScriptReference/Profiler-maxNumberOfSamplesPerFrame.html

    Hope this helps some of the people who had the same problem as me :)
     
  34. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    I'm seeing this issue in Unity 5.4.0p2.
     
  35. Tyrathect

    Tyrathect

    Joined:
    Jul 10, 2012
    Posts:
    38
    Me too 5.4.0p2
     
  36. Threepwood

    Threepwood

    Joined:
    Jul 23, 2009
    Posts:
    95
    Getting this in 5.4.0p2 as well. Started happening after I first used the profile the first time. Continued after profile window was closed and through restarts of Unity.
     
  37. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    I get this error in 5.4.0f3 even when profiler is closed
     
  38. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    229
    Pissing me off on 5.4.0f3
     
    hakankaraduman likes this.
  39. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    Seems like a regression @karl_jones
    When the profiler has been open then is closed this happens ~every 60 seconds, quite annoying when you have "Error pause" turned on.
    I'm seeing it in 5.3.6p4 & 5.4.0p2
     
  40. John-Citizen

    John-Citizen

    Joined:
    Nov 5, 2013
    Posts:
    11
    Still getting the error in 5.4.1.
     
  41. Wip3ou7

    Wip3ou7

    Joined:
    Mar 9, 2015
    Posts:
    41
    getting this error in 5.4.1f1
     
  42. MightyBen

    MightyBen

    Joined:
    May 1, 2015
    Posts:
    4
    Seeing this in 5.4.1p2.

    Profiler window was open, i turned off record and closed it, I still get this every 30 seconds or so while running the game. Very hard to do actual debugging since this halts everything (as I am using error pause).
     
  43. _uso212

    _uso212

    Joined:
    Jan 25, 2014
    Posts:
    9
    Getting this error in 5.4.1f1, had to copy and paste the asset folder into a new one and not open the profiler for any reason. It's not crashing on build but it's not a solution, just a workaround.
     
  44. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    Unfortunately I'm getting this frequently too in 5.4.2f1.
    I got it in the editor, and also in a build.
    It's happening quite frequently in the editor.
    I will try increasing samples, but actually I wasn't expecting the profiiler to be running at all like most of the previous posters.
     
  45. rad1c

    rad1c

    Joined:
    Feb 26, 2016
    Posts:
    21
    5.4.2f2 win x64 here, not very often but still getting this error
     
    hakankaraduman likes this.
  46. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    updated from 5.4.0 to 5.4.2f2 and same here, it goes away after restarting the computer but still annoying
     
  47. Thelo

    Thelo

    Joined:
    Sep 13, 2009
    Posts:
    98
    How it goes for me (Windows 10, Unity 5.4.2f2, though the problem has been going on for over a year) is that within a given editor session, if I open the Profiler window and start the game at any point (such that the profiler starts recording for real), then for the rest of that session the editor will be vulnerable to the "run out of samples" bug, even if I later close the Profiler window itself or stop recording with it.

    To fix it, I must stop recording with the profiler (toggle off the "Record" button in the Profiler window), then close the Profiler window, then restart the editor. This makes the editor safe once more... until the next time I open the Profiler window.

    This makes me think that the underlying problem is something where toggling "Record" to off doesn't quite turn off everything related to profiler recording, and that something does stay turned on when it shouldn't be - as evidenced by the error message about large profiler outputs. But an editor restart does turn it off.

    (That said, various people in this thread report that an editor restart does not fix the problem, so I'm not entirely sure what's going on. I wonder if these people are in fact restarting the editor with the Profiler window enabled, which would immediately trigger the problem again, since the profiler window defaults to Record = on when opened?)
     
  48. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Latest version in OS X, happens all the time.
     
  49. _M_S_D_

    _M_S_D_

    Joined:
    Nov 12, 2013
    Posts:
    511
    Annoying me since over a year, now on 5.4.2f2...
     
  50. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    This error might be connected to the bug report I sent where having the profile window Open and dragging it to the bottom right corner of the screen while in maximized play mode causes the fps go from 200 to 4000.....(turn Vsync off in Quality to uncap the 60fps)

    I noticed this when all my projects in 5.4 started capping at 200 fps even in empty scenes so adding objects doesn't show any difference which makes it very hard to spot any changes in 5.4, this was not an issue in 5.2 or Unity 4.

    I believe the entire profiler is corrupt under the hood and needs to be reworked just like Enlighten was; causing more issues then it solved.