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

Possible issue #46

Closed
alexzk1 opened this issue Aug 17, 2021 · 5 comments
Closed

Possible issue #46

alexzk1 opened this issue Aug 17, 2021 · 5 comments

Comments

@alexzk1
Copy link

alexzk1 commented Aug 17, 2021

Well, just possible issue, maybe nothing.

https://issues.frontierstore.net/issue-detail/39579

Happened to me twice, both times it was 5+ hours of intensive playing. Both times journal files were close to 2Mb. Both times I ran new tool ed-odyssey-materials-helper/

My current idea is, "new tool" reads file too long, so game tries to write, fails and never repeats write again.

So could you recheck read code if it gets exclusive read access which may break game and/or replace with in-ram caching of whole file then parsing it from ram (to minimize time of file access).

@alexzk1
Copy link
Author

alexzk1 commented Aug 29, 2021

Ok, played many days OK without using the program. Today launched it and....Elite got broken. So chances this program breaks game by too long reading are good.
Here is my path to try, I will be trying it too couple more days.
file_processor.txt

@jixxed
Copy link
Owner

jixxed commented Aug 31, 2021

Sounds to me Elite needs to handle file access gracefully with a retry or a writelock. Can't go with reading while data is being written to the file. The read time is already very low and only triggered after a write. Will have to see how FDev resolves the issue on their end.

@alexzk1
Copy link
Author

alexzk1 commented Aug 31, 2021

Sounds to me Elite needs to handle file access gracefully with a retry or a writelock. Can't go with reading while data is being written to the file. The read time is already very low and only triggered after a write. Will have to see how FDev resolves the issue on their end.

Yeh,

  1. Other tools like EDMC python script do not break, as they do some special care.
  2. you original program runs file reading in GUI thread (Platform.runLater) which may be delayed for infinite unspecified time. That just says "do it some when later when you will have time". Also order is not guaranteed. It can collect like 50 reading request lambdas then run those 50 at once. So I would revise that.

So in fact you need something which may read once per 5 seconds, not more often for example. So watcher should set atomic flag, then separated reader thread will check it, read/clear if set, pass to process, sleep for 5 seconds. Because if game writes alot you get notify alot and on each u trigger whole file open/read.

@alexzk1
Copy link
Author

alexzk1 commented Aug 31, 2021

Additional patch to make my idea with separated thread
patch2.txt

@jixxed
Copy link
Owner

jixxed commented Oct 3, 2021

Issue expired @ frontier. Still not seen any evidence, only suspicions.

@jixxed jixxed closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants