fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Segmentation Fault calling native IsPlayerAceAllowed

Open Jamesking56 opened this issue 1 month ago • 6 comments

What happened?

Sometimes, when calling IsPlayerAceAllowed on the server-side, it crashes the server with a segmentation fault:

=================================================================
        Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
        Managed Stacktrace:
=================================================================
          at <unknown> <0xffffffff>
          at WrapScriptHost:InvokeNative <0x001f2>
          at WrapScriptHost:InvokeNative <0x00209>
          at CitizenFX.Core.ScriptContext:InvokeInternal <0x00084>
          at CitizenFX.Core.ScriptContext:Invoke <0x0005a>
          at CitizenFX.Core.Native.API:InternalIsPlayerAceAllowed <0x0012a>
          at CitizenFX.Core.Native.API:IsPlayerAceAllowed <0x0004a>
          at <>c:<OurMethodTwo>b__5_0 <0x0009a>
          at WhereArrayIterator`1:ToList <0x00134>
          at System.Linq.Enumerable:ToList <0x0012f>
          at OurClassTwo:OurMethodTwo <0x00172>
          at <OurMethodOne>d__11:MoveNext <0x000a8>
          at System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start <0x000a1>
          at OurClassOne:OurMethodOne <0x001fa>
          at System.Timers.Timer:MyTimerCallback <0x001f1>
          at Scheduler:TimerCB <0x001ba>
          at System.Threading.QueueUserWorkItemCallback:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem <0x00086>
          at System.Threading.ThreadPoolWorkQueue:Dispatch <0x003da>
          at System.Threading._ThreadPoolWaitCallback:PerformWaitCallback <0x00082>
          at <Module>:runtime_invoke_bool <0x000a4>
=================================================================

Not sure why this is happening but has started happening since updating our server build to 8102

Expected result

IsPlayerAceAllowed checks aces and returns a successful response

Reproduction steps

We're calling IsPlayerAceAllowed in a ten second interval, so not sure if its related to looping the function that causes it to fail sometimes.

Importancy

Crash

Area(s)

FiveM, FXServer

Specific version(s)

FXServer 8102

Additional information

No response

Jamesking56 avatar May 15 '24 19:05 Jamesking56