Issue 747 fix#777
Conversation
|
Currently experiencing crashes in SEB client. Do not merge, I will fix it. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #777 +/- ##
==========================================
- Coverage 55.25% 55.20% -0.06%
==========================================
Files 219 219
Lines 13294 13295 +1
Branches 1446 1446
==========================================
- Hits 7346 7339 -7
- Misses 5634 5640 +6
- Partials 314 316 +2 ☔ View full report in Codecov by Sentry. |
I'm unable to reproduce this crash from yesterday... LGTM :^) I investigated logs and it seems like the client executable crashed out of no where, which it doesn't do now. When the crashes happened, these were the important logs: Runtime.log: Service.log: There are no client logs, which leads me to believe the right exe might not have been found? Perhaps the original SEB service interfering with the custom build from this PR or so... |
|
Marking the PR as ready for review (@dbuechel). Description of PR @ #777 (comment) |
|
Excellent work, I'll review and merge the pull request first thing next Monday. |
dbuechel
left a comment
There was a problem hiding this comment.
Great work, that looks perfect. I'll test it locally and try to fix the issue you described, I reckon it's a trivial thing that we'll need to adapt.
registry.TryRead()shall now returnfalsewhen a registry value does not exist inside of a key. Previously this returnedtrueand made the caller check ifoutput_var != defaultto check if the value actually existed. This is a fix for #747 .I have converted existing direct calls to TryRead() as you can see in the code. I have tested this and it seems like it works correctly. Additionally, I have tested the original bug by creating
HKEY_LOCAL_MACHINE\SYSTEM\HardwareConfig\sebcrashwithout any values in it. In the old version, this caused a crash because the code didn't check if the value actually existed, and hence caused a nullptr deref exception. In the new version, the code checks if the registry value does not exist, and if so it does not continue with inspecting the value in the caller code.One possible issue I have seen is that the
StartMonitoring()andTimer_Elapsed()functions will now error if a value does not exist. Hence, we will need to think of a solution to monitor for registry value creations, since we cannot monitor for non-existing values in the current state.