[Bug] [Partially solved] Client crashes when having more than 1 C# project/dll with API code in a single resource. #305
Replies: 4 comments
|
I have a feeling that some of the testing I was doing was clouded by some cache issues. Clearing server/client caches and fully rebuilding assets seems to change the result sometimes. What I can at least consistently reproduce is the following: Have a resource with 2 C# projects, both containing at least some Cfx API calls (whether they have an entrypoint or not is irrelevant, I had for example 1 project with an entrypoint and IScript, the other without, and the one without just had 1 class with 1 random method with an API call) It's like the script is being duplicated as soon as you have 2 projects (dll's) with API code in your resource, which is causing a crash. I'd like to point out that without this fixed, making any cleanly setup resource is fairly difficult (pretty much impossible) because I can only have 1 (client) DLL/project per resource. |
|
This seems fixed now with the latest version and I also figured out that I was doing stuff wrong (probably), I moved all other DLL's to the "files" section of the fxmanifest, instead of having them all as client scripts. And that seems to have solved it. I'm not sure if this had something to do with the latest Cfx API release, or if moving all projects except one to "files" instead of client_scripts in the fxmanifest solved it. Or if that is even intended behavior or a bug, but at least I can continue working now. Leaving this thread open just in case it's still considered a bug that you can't have multiple dll's in client_scripts in a single resource. |
|
Hey! This issue has been fixed in the latest patch b123 and CitizenFX.FiveM NuGets 0.0.4-alpha. Please try again and let us know if the issue persists. Loading multiple DLLs in |
|
Confirmed working! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'm testing out the new C# API while working on vMenu for Enhanced, and I'm extremely confused by one DLL that I'm trying to load causing the following client crash to occur:
The source code for the DLL in question can be found here
Resource files can be found here
The project is called "IamAproblem", I've tried many different names, it started out with NoClip, as that's what I was working on. But something with this project is causing a crash once it's being loaded, and I don't understand why. The class it has is empty, just like the other projects in my code. There are no references to that class (so it's never being initialized). It has no references to other projects or to any CFX dependencies. It SHOULD not be loaded, yet it somehow is and causes a crash.
If you remove the dll from the server resource folder and restart the resource, everything works fine. Add the DLL back, and it's broken again. (It's registered in the fxmanifest under client_scripts).
fivem-for-gtav-enhanced.log-2026-07-28_22-01-27.log
Server info:
Issue type
Client
Repro rate
Always
Server build version
FXServer-early-access b98 win32
OS
Windows 11 Pro 25H2
CPU
Intel(R) Core(TM) i7-14700K (3.40 GHz)
GPU
NVIDIA GeForce RTX 3080
RAM
32 GB DDR5
Storage type
SSD NVMe
Connection type
Ethernet
ISP and bandwidth
1000/1000
DxDiag
Network graph
No response
Platform
Windows
OS version / distribution
Windows 11 Pro 25H2
CPU
Intel(R) Core(TM) i7-14700K (3.40 GHz)
RAM
32 GB DDR5
Using txAdmin?
Yes
Hosting provider
Self-hosted
Machine type
None
/perf endpoint output
Unauthorized.
DDoS protection
No
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
Expected Behavior
Script isn't referenced, so it shouldn't load and I should be able to simply join the server without crashing my game.
Actual Behavior
Join server, game crashes.
Evidence
Additional Context
Contact me if you need anything else.
All reactions