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

Configuration file is overwritten with default values #54

Open
jbigler opened this issue May 1, 2022 · 7 comments
Open

Configuration file is overwritten with default values #54

jbigler opened this issue May 1, 2022 · 7 comments

Comments

@jbigler
Copy link

jbigler commented May 1, 2022

I haven't been able to determine what the cause is, but many times (though not always) when starting the daemon it overwrites the ~/.local/share/userspace_tablet_driver_daemon/driver.cfg with default values. If I stop the daemon, restore the settings file and start the daemon manually again it usually works fine.
Right now I have it launching from .xprofile .

@kurikaesu
Copy link
Owner

Hmmn that is very weird. Is there any way you can set up the launch parameters so that it will pipe the console output to a log file somewhere? I'm curious to know why it is deciding to reset to default.

@jbigler
Copy link
Author

jbigler commented May 8, 2022

Since I've started logging the console output I haven't experience the problem. Nice little Heisenbug. I'll let you know if it occurs under observation.

@jbigler
Copy link
Author

jbigler commented May 15, 2022

I will attach a log file I created. You'll notice sometimes the daemon says it could not claim the interface or device, but that doesn't seem to delete the configuration. On line 240 of the log file it just pops up a message that there is no existing config file and creates a new one.
tablet-driver.log

@kurikaesu
Copy link
Owner

Hmm, thanks for the log. I wonder if the reason why the config is being recreated is because the existing config is broken or half written and can't be deserialised correctly.

I'll have to look into this deeper when I can get my Linux computer hooked up to a monitor and keyboard. Might be able to do that tomorrow evening.

@kurikaesu
Copy link
Owner

I've made a small change to flush the config file when writing and also emit a message to know that it has done so. If you could pull the latest code and run it while logging the output again, we can see if it is indeed being able to write out the whole file or not.

@jbigler
Copy link
Author

jbigler commented Jun 26, 2022

userspace.log
Sorry for the delay, I recently moved and it took a little while to get my computer set up again. Here is an attached log file from the updated build with several instances of creating a new configuration file instead of using the existing file.

@kurikaesu
Copy link
Owner

Thanks Jeff, I am very curious to see why its getting a parse error on this line: https://github.com/kurikaesu/userspace-tablet-driver-daemon/blob/main/src/event_handler.cpp#L109

I'll need to make a small change there to print out what kind of parsing error it is but I currently don't have a Linux machine to write/test the code on. Might take me a little bit of time to get a dev machine set up again as I'm currently shuffling around my computers/servers here at home.

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