According my test.
When i using Worker on my resource and containing lua script (even empty)
server will crash
same with Nodejs worker lead server crash
follow code here
const {
Worker
} = require('worker_threads');
console.log('init calculater')
const workerString = `
const {
parentPort
} = require('worker_threads');
parentPort.postMessage('hello')
`
const worker = new Worker(workerString, {eval: true});
worker.on('message', msg => {
console.log(msg)
})
Resource Metadata
fx_version 'cerulean'
game 'gta5'
server_scripts {
"test.js",
'hello.lua'
}
or Repo resource.
WorkerTest.zip (917 Bytes)
(Server Build is 5402 Winodws)
nta
March 31, 2022, 4:11pm
2
PGONINTWITCH:
server will crash
Again, like with your past topic, it works fine here (but still crashes when restarting , but that seems unrelated):
cfx> start WorkerTest
[ c-scripting-core] Creating script environments for WorkerTest
[ script:WorkerTest] init calculater
[ citizen-server-impl] Started resource WorkerTest
[ script:WorkerTest] hello
cfx> version
[ cmd] "version" is "FXServer-master SERVER v1.0.0.5402 win32"
[ cmd] default: "FXServer-master SERVER v1.0.0.5402 win32" - flags( )
[ cmd] type: string
Are you sure you’re not missing a step?
Sorry, Now I think the problem isn’t on Lua,
But when I Start the resource and wait about 10 second. the server still been auto restart
Any move on for my issue?
nta
April 3, 2022, 6:34am
5
Not without an actual working repro, and also especially not within 3 days of you posting ‘your issue’.
Again, even leaving the server running for an hour+ doesn’t crash, here, so your reproduction steps seem incomplete.
Finally, again, even with a full repro, we don’t have any guaranteed resolution time for any report, nor do we advertise as having such.
I have same issue here, and I using the new environment. (with server artifacts 5445)
with repro resource here.
workerTest.7z (657 Bytes)
And also the server dump here.
a272a805-1153-46a6-b424-d1239efe7729.dmp (713.4 KB)
I suggest you create a new environment to test the worker.
I dont know what cause it crash.
And i also create a cluster on it, working fine.