Weird error messeges in console

I just went back and looked at the vMenu original post and i noticed that they have comments stating its been fixed.

Can you link one of them

Sure here is the link for the original post. if you go to the end of the comments over the last like 48 hours people have been talking about this issue. people have suggested they believe its a fivem issue . That is what leads me to think server artifact, and the cfx-server-data. and now im not having the issues . vMenu hope you figure it out.

i’m on build 3270, I’ll just keep a watch for updates from fivem and vespura.

I kept having these problems too and after trying stopping vMenu while the error happened, I can now confirm that vMenu is causing the problem.
I think the error should tell us the resource name and the script instance name.

Btw, in my experience, that error is most likely caused by something like:

foreach (var item in collection)
{
    collection.Remove(item);
}

Easy fix that works most of the times:

foreach (var item in collection.ToList()) // assuming System.Linq was imported
{
    collection.Remove(item);
}

Hey! I’m having the same issue, you should make a PR into the vMenu repo.

I’m also having this problem.

So I was investigating the cause to this error spam on the console and appears to be vMenu Script error. I still don’t have a solution to the fix Ill try and reinstall vMenu into the FiveM

Image:

I was convinced it was a vMenu problem, however, I now experienced this problem also without vMenu but with other C# scripts, some already existing such as FivePD, and others I made from scratch, of which I’m sure they’re not causing that error.

My conclusion is that it must be a FiveM problem related to C# scripts. If the thrown error was a bit more specific it would be a lot easier to fix and send a PR.

duh.

are any of these using the super-deprecated networkcallbackdelegate?

Alternately since you can build it and apparently can repro it, you can remove this line to get a ‘more specific’ error:

I don’t get why you always get defensive when anyone points out something that might be wrong about FiveM, to be honest. I was trying to add some info to the thread. Anyway, my resource doesn’t use NetworkCallbackDelegate, and, I am unable to reproduce the error, but I know that it randomly happens after a while the server has been running with a loaded C# resource.

not sure where you’re seeing any ‘defensiveness’ since a ‘duh’ is rather accepting the fact and not being defensive at all, however there’s clearly a lack of useful info and effort being put in these complaints, and since it isn’t reproducible for me it’s something the people who do have these issues have to put some effort into

in addition, if it were ‘a vmenu problem’ a stack would be shown and not be filtered to contain no stack frames at all.

yeah, that’s why I’m asking you or whoever does have this happen to remove that line to get an unstripped error

this was attempted to be fixed already but apparently an incorrect guess since I’m unable to get a server to be loaded enough to get it to happen (a merely idle server with vMenu running will not cause this):

assumption was related to that code path since people hadn’t reported this with vmenu until the fix for bigmode support, which is why a question about networkcallbackdelegate was asked.

1 Like

Unsure if this is of any help, but with rebuilding clrcore removing the filter for stack trace, I got:

SCRIPT ERROR in tick: System.InvalidOperationException: Operations that change non—concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
> void ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported() (@vMenu/mscorlib.dll:0)
> int System.Collections.Generic.Dictionary<int, System.Threading.Tasks.Task>.FindEntry(int key) (@vMenu/mscorlib.dll:0)
> bool System.Collections.Generic.Dictionary<int, System.Threading.Tasks.Task>.ContainsKey(int key) (@vMenu/mscorlib.dll:0)
> void CitizenFX.Core.BaseScript.SheduleTick(TickHandler callWrap) (@vMenu/CitizenFX.Core.dll:0)
> void CitizenFX.Core.BaseScript.SheduleRun() (@vMenu/CitizenFX.Core.dll:0)
> void CitizenFX.Core.InternalManager.Tick() (@vMenu/CitizenFX.Core.dll:0)

I don’t have a repro for this, I was just reliant on this happening randomly. So, if @Sasino97 would be able to share his repro, that’d be great.

cc @nta

Hello, I rely on it happening randomly too. I’m not sure about the conditions that make it happen.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.