Access Control Error

Started by king idiot 3 posts 75 views

Reply on sbox.game
  1. #1
    king idiot 760
    [PackageLoader/GameMenu] Couldn't load package.local.graveyard_shift - access control error

    I suddenly started seeing this error when opening my project, and all of my components are missing. The project still builds but the editor does not know of any components I make. 

    Other projects seem to open fine. Any idea why this happened?
  2. #2
    garry Facepunch 2,270
    It should say what's causing the access control error? Does it show any more information?
  3. edited Sep 2025 #3
    king idiot Started this 760
    I moved the code over to a fresh project and got this log: https://pastebin.com/x7qeMptX

    Looks like the build was failing because of this code: 

    using System.Threading.Tasks;
    
    ...
    
    protected override void OnStart()
    {
    	Task<bool> task = StartDressing( dresser );
    	task.Start();
    }
    
    private async Task<bool> StartDressing( Dresser d )
    {
    	if ( !dresser.IsValid() ) { return false; }
    	d.Source = Dresser.ClothingSource.LocalUser;
    	await d.Apply();
    	IsDressed = true;
    	return true;
    }

    It complies with this code but my changes aren't reflected in game. I realize now this code isn't doing anything anyway but it's still weird.
    edited:
    If I uncomment this line specifically, the project breaks and I get a few messages in the console.
    task.Start();
     10:18:39   PackageLoader/GameMenu Whitelist Error: System.Private.CoreLib/System.Threading.Tasks.Task.Start()
     10:18:39   PackageLoader/GameMenu Couldn't load package.local.graveyard_shift - access control error
     10:19:00   engine/RenderSystem returning error texture resource for "" in CTextureManagerVK::GetTextureResource
     10:19:00   engine/RenderSystem Texture manager doesn't know about texture "" when setting "" - returning error texture in CTextureManagerVK::GetImageView