Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading information in .json or .txt files #3160

Open
EleDos opened this issue Feb 16, 2025 · 1 comment
Open

Error reading information in .json or .txt files #3160

EleDos opened this issue Feb 16, 2025 · 1 comment
Assignees
Labels
bug crash triage Needs a preliminary assessment to determine the urgency and required action

Comments

@EleDos
Copy link

EleDos commented Feb 16, 2025

What happened?

After several reads of a file (.json or .txt for example), the file crashes and stops being read correctly.
For reading and writing I use (io.open(fileName, "r")) and (io.open(fileName, "w+")).
This has been happening since it was forced to have the files read within the same resource. Previously and for more than 5 years, this method had never failed even with very high read and write loads.

Expected result

The information in the files should be read correctly and not get a nil return

Reproduction steps

  1. I request reading information to the file with a specific name and extension.
  2. If the file does not exist, the file with a specific name and extension is automatically created.
  3. Reads and writes are made to this file continuously every "X" seconds.
  4. After reading and writing the file for several minutes (random time), the file breaks and becomes unreadable.
  5. If I delete that broken file, everything works fine again until the new file breakage.

Importancy

Crash

Area(s)

FiveM

Specific version(s)

FiveM 12847, Server 12906 linux

Additional information

Highlight the change in the version of the artifact that began to force the files to be located within the resource itself

@EleDos EleDos added bug triage Needs a preliminary assessment to determine the urgency and required action labels Feb 16, 2025
@github-actions github-actions bot added the crash label Feb 16, 2025
@samylart
Copy link

samylart commented Feb 22, 2025

This has been happening to me since the new versions of Artifacts. In my case, I can't read files outside my resource, which makes it difficult to work on some interconnections.

I saw this in the FiveM documentation, but in my case, I'm not trying to read a resource; I'm trying to read a path that is not a resource. Specifically: "/txData/default/data/playersDB.json"

Is there any alternative we might not be aware of?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

3 participants