Search Unity

Feedback Calling EndWrite before BeginWrite

Discussion in 'Editor & General Support' started by t-ley, Apr 21, 2023.

  1. t-ley

    t-ley

    Joined:
    Mar 6, 2017
    Posts:
    77
    Anyone know what this is
    Why doesn’t Unity gives something like what their errors mean
    Seems like are making it harder with these errors not easier
    The thing is it happens after it’s been made and played not like right away like an error on a script these are like hidden treasure found but are they really a treasure or a curse
     
    sd_trent likes this.
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,930
    Maybe post the full error? Rather than just some rambling, cryptic message doesn't give any meaningful details.
     
  3. t-ley

    t-ley

    Joined:
    Mar 6, 2017
    Posts:
    77
    There u go
    no type of reference
    So what does it mean

    Any clue
     

    Attached Files:

  4. t-ley

    t-ley

    Joined:
    Mar 6, 2017
    Posts:
    77
    Hello
    Do u know
    It would be good if u know what it means
     
    sd_trent likes this.
  5. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,930
    Nice dirty screen. It's 2023, it's not hard to take a screenshot these days.

    Well, is your own code causing this? A package (Asset store or otherwise)? Does it happen on a fresh project?

    It should be pretty straight forward to eliminate the causes and figure out what's throwing this error.
     
  6. t-ley

    t-ley

    Joined:
    Mar 6, 2017
    Posts:
    77
    Ya we smoke a lot I live in Denver, co
    Bla bla
    Anyway I had the project pretty much done
    With no errors the day before yesterday didn’t do anything different than the error pops up all of a sudden yesterday
    And I don’t use Unity web site on my pc
    So why start now
    back and forth from unity to the web is a wait time so I avoid it
    And we have more than just a pc to take a photo like most people
    So how do I find the asset causing it
    But ya could be an asset I have enter exit with the racing game starter kit with damage scripts
    To the opponent ai with the asset simple turret, and homing Missle asset , and npc script from urban city by I think Alex mobile ragdoll to run them over
    And FPS weapons from 3D Mason but is deprecated
    Maybe to much
    But thanks for asking with the errors I get there ain’t to many responses
     
    Last edited: Apr 25, 2023
    VOXELIUM, cyanstoves and methos1387 like this.
  7. Ripple196

    Ripple196

    Joined:
    Jun 14, 2017
    Posts:
    7
    I noticed getting the same error starting with 2022.2.15f in a scene that was finished already. Now when I return to the scene this error appears in the console without any reference to where it comes from. It seems to be an editor only thing, if I restart Unity it disappears and randomly appears again after reloading the scene a few times
     
  8. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    Happens to me randomly. I did edit some prefabs, but no idea if related.

    Definitely not easy to eliminate since there's absolutely no other information about the error.

    Using Unity 2022.2.18

    Just text:

    "Calling EndWrite before BeginWrite"
     
    VOXELIUM likes this.
  9. Bersaelor

    Bersaelor

    Joined:
    Oct 8, 2016
    Posts:
    111
    Same happening here, after updating our project from 2021 to 2022.2 .
     
  10. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    This "Calling EndWrite before BeginWrite" message is also appearing in Unity 2021.3.25. It did not appear in 2021.3.24 or earlier. There are no stacktraces or other indication about what the issue is. It seems to be more frequent when editing prefabs.

    Bug report: CASE IN-41273
     
    Last edited: May 31, 2023
  11. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    I noticed that inspector "Range" was not working. I changed values in the inspector using the range-slider thing but my changes were lost once I clicked away from the object.

    Code (CSharp):
    1. [Range(0, 100)]
    2. public float testValue;
    I removed these from my code.

    ...and today I have not encountered this bug.

    absolutely no idea if related or not.

    I'll report back if I start getting those errors again.
     
  12. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    Another shoutout that after removing "[Range(0, 100)]" type of code from inspector, I have not experienced "Calling EndWrite before BeginWrite". This is Unity 2022.2.18f1.

    So in case somebody happens to google their way here, this is one trick to try. No idea if it actually works for you.
     
    greg-harding likes this.
  13. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    384
    bumping this, as its quite annoying:

    upload_2023-6-2_14-44-46.png

    This happens after upgrading to 2022.3.0 LTS and just selecting different prefabs
     
    VOXELIUM likes this.
  14. tughanalpaslan

    tughanalpaslan

    Joined:
    Jul 25, 2020
    Posts:
    50
    Hey guys, I have the same problem and I didn't write a single line of code yet in the project. I couldn't find the solution yet but it happens only if I choose one particular asset, which I purchased from a reputable seller on asset store and never had problems with the same asset before.
     
    barrycook likes this.
  15. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    I have not touched unity in years, but this could be related to compute buffers. This was a new gfx api a few yrs back and requires call order…we used to wait 3 frames or so to be save…instead of checking with asyncgpureadback….
     
    ncr100 likes this.
  16. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    Unity just closed my case as they cannot repro this issue. If anyone here can file a bug or repro project to help out that would be appreciated. I have been referencing this thread and my bug report is Case IN-41273 if you want to reference it in your bug report.
     
    VOXELIUM, quieye and t-ley like this.
  17. Ripple196

    Ripple196

    Joined:
    Jun 14, 2017
    Posts:
    7
    Got the same issue.. Seems to appear randomly until I restart the editor..
     
  18. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    32
    To build on this idea, the language is the same as is found in the Compute Buffers source:

    https://github.com/Unity-Technologi...Export/Shaders/ComputeBuffer.bindings.cs#L292

    I see it when running demo scenes from More Mountains' Top-Down Engine, the Loft3D scene in Unity 2021.3.25f1.git.6876972 (2021.3/staging 68ef2c4f8861) on MacOS Editor.

    Calling BeginWrite before EndWrite
    Calling EndWrite before BeginWrite​
     
    Last edited: Jun 15, 2023
  19. curkas

    curkas

    Joined:
    Jun 17, 2019
    Posts:
    8
    Any update on this? It just randomly appears with no context. The editor will also crash some times when saving in Shader Graph or even when deleting objects. I get no crash logs either. Super frustrating.
     
  20. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    No, my case was closed and I reopened it. Unity QA weren't very interested until someone can submit a stack trace or something. I don't have one, can't reliably repro the issue, and I'm using VS Code so I don't have a debugger I can easily attach at the moment. If you can trap the issue then please submit a bug report and reference my case number.
     
  21. MichaelHeiml82

    MichaelHeiml82

    Joined:
    Nov 2, 2009
    Posts:
    30
    Same issue here since several 2022.3.x versions using Silicon Editor.
     
    quieye and sumiew like this.
  22. xindexer2

    xindexer2

    Joined:
    Nov 30, 2013
    Posts:
    78
    I was able to reproduce it just now - I have a folder full of Prefabs, when I view any of the prefabs, then I would get that error continuously, if I closed the prefab - it would go away. I restarted the editor and it no longer happens. I have been renaming and changing the prefab names and the attached script names this morning. Maybe an internal reference to the prefabs is getting messed up?
     
    ilmario and VOXELIUM like this.
  23. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    49
    I also get this error. I noticed that this is related to prefabs, BUT not always.
    When I view or edit something in a prefab and then go to the main scene. BUT not always.
     
  24. Speedy3700

    Speedy3700

    Joined:
    May 23, 2021
    Posts:
    19
    Exact thing happens to me. All of my prefabs are giving this error continuously, even ones that were objects without any scripts attached. This makes me think that there's not much I can do since nothing I made seems to be the problem. I also found that closing and restarting the editor solves this, but I have no idea what is causing it.
     
  25. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    372
    Happening to me in Unity 2021.3.27f1 using Silicon Editor.
     
  26. a_yanovski

    a_yanovski

    Joined:
    Feb 1, 2022
    Posts:
    9
    Yup. Happening for me on 2022.3.2f1 in Silicon Editor
     
  27. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Got that bug too in Unity 2022.2.15f1. It corrupted a whole prefab. Everytime I'd enter the prefab's hierarchy, selecting any of its elements including the parent would generate this error. And this would happen with many other prefabs.
    To top that, the prefab cannot be instantiated anymore. It seems to have happened after I modified a Button property on some element and pressed CTRL/CMD + Save.
    I tried to close Unity and it started to make the machine lag, with no closure coming. I had to force quit Unity.
    Then upon relaunching it, I started to have other bugs.

    Code (CSharp):
    1. unity Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Insecure connection not allowed
    Times many. I wouldn't fiddle with the HTTP option. So I Library to solve this but the issues remained.
    I saved the lates scenes I had produced to another folder on the computer, then I nuked the whole project and restarted from a recent backup, put the new scenes into it and that's it. No more problems.