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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry settings cannot be read or get deleted #2438
Comments
|
System language is en_us. Well possible that it's an issue with how floats are serialized (converted to strings and unconverted). |
Build gad2e770 Crashed too. |
Build g4a2f915
So, no more weird tree. I'll try to modify settings now.
I'll keep this registry and try to modify the FOV value again.
FOV value in TrenchBroom preferences differs from the registered value in Registry.
FOV value in TrenchBroom preferences is now well retrieved from the Registry. 馃 |
馃憤 So yeah, at this moment, no more error 6 reported. Last commit seems to have fixed the issue. But, sometimes FOV value in Preferences differs from the registered one present into Registry. |
I'm convinced it's a wxWidgets bug, or at least the registry access is failing inside wxWidgets somehow. I made a branch where all config access is via absolute paths, and I still get this error on commit 40578eb (it's random but happens on around 40% of launches. Seems to happen only when a Release build exe is launched via double clicking the .exe in Windows Explorer). This reproduces @jonathanlinat 's last post. I verified that we're calling the wxConfig API with "\TrenchBroom\Controls\Camera\Field of vision" and that key exists in the registry, but the error shows that there was an attempt to access "\TrenchBroom\Field of vision" for some reason.
All I can think of now is stop using the wx registry code. I still have no idea what changed between RC1 and RC2 that caused this, and I've had no luck debugging it because i can only reproduce it in Release builds :-/ |
Maybe if we rename that key to "FOV" it will help? But I'd rather switch to a file based config at this point. |
Oh and while we're destroying people's preferences, we should also switch to writing / reading typed values instead of serializing / deserializing with strings. |
I posted on discord but it turns out the fly mode thread is accessing preferences from a background thread which is probably breaking everything. Call stack looks like:
Yes, if we switch to JSON this would make sense. If we stick with the INI format that wxFileConfig uses, it doesn't make a difference, since INI doesn't distinguish strings from numbers. For 2.1.0 I suggest we stick with the registry, get rid of any preference accesses from background threads, stick |
Aha, good find! So we need to synchronize access from the fly mode thread, or rewrite fly mode as we discussed to processing events on the main thread. I vote for the latter. |
System Information
TrenchBroom V2.1.0-RC2 on Windows 10
The text was updated successfully, but these errors were encountered: