Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-164281

Lighting thread and gameplay thread can desync

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 19w42a, 1.15.2, 20w15a, 1.16.2, 20w51a, 21w40a
    • None
    • Confirmed
    • Lighting
    • Normal

      The bug

      In a previous version the lighting engine was moved to a separate thread. However it appears there is nothing which prevents desync between the gameplay and the lighting thread.

      This can cause all kind of unexpected behavior, for example:

      • Being unable to plant crops in lit up caves
      • Monters spawning in lit up areas
      • Stopping the server / closing a world when the lighting thread has not caught up causes pending light updates to get lost

      How to reproduce

      1. Place a repeating command block (always active), pointing upwards
        fill ~ 255 ~ ~20 255 ~20 stone
        
      2. Place a chain command block above (always active)
        fill ~ 255 ~ ~20 255 ~20 air
        
      3. Set the time to night
        /time set night
        
      4. Open the debug screen (F3)
      5. Place a light source, e.g. a torch
        The "block" value for "Server light" does not change
      6. Reopen the world
        The area around the light source is not lit up

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            28 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: